mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 22:02:24 -06:00
[GH-ISSUE #138] Add attributed strings from libui-node 0.2.0 #84
Labels
No labels
bug
documentation
enhancement
libui issue
pull-request
question
wait for libui implementation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/proton-native#84
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kusti8 on GitHub (May 19, 2018).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/138
https://github.com/parro-it/libui-node/blob/master/docs/attributedstring.md
@mischnic commented on GitHub (May 19, 2018):
They can only be drawn inside an Area (see https://github.com/parro-it/libui-node/blob/master/examples/text.js).
My thoughts: There should be an
Area.Textelement but also anFancyTextelement (a better name is to be found) which creates an area internally (if there is no parentFancyText).The attributes get inherited and specified like in react native (https://facebook.github.io/react-native/docs/text.html).
Attributes:
fontSize, color, fontWeight, textAlign (only possible for top level), fontFamily, underline (+color), background color, bold/italic
@kusti8 commented on GitHub (May 19, 2018):
Sounds good. Then
FancyTextwould just be a wrapper forAreaon the outer, and thenArea.Text.@mischnic commented on GitHub (May 19, 2018):
EDIT: Yes
I misread your post
Yes, but this has be prevented:
@mischnic commented on GitHub (May 20, 2018):
Proof of concept at https://github.com/mischnic/proton-native/tree/font: