-
-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add attributed strings from libui-node 0.2.0 #138
Comments
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 <FancyText style={{color: "red"}}>
Some red text
<FancyText style={{fontSize: 5}}>
Some smaller red text
</FancyText>
</FancyText> Attributes: |
Sounds good. Then |
EDIT: Yes I misread your post Yes, but this has be prevented: <FancyText style={{color: "red"}}>
Some red text
<FancyText style={{fontSize: 5}}>
Some smaller red text
</FancyText>
</FancyText>
---->
<Area>
<Area.Text style={{color: "red"}}>
Some red text
<Area> !!!!
<Area.Text style={{fontSize: 5}}>
Some smaller red text
</Area.Text>
</Area> !!!!
</Area.Text>
</Area> |
Proof of concept at https://github.com/mischnic/proton-native/tree/font: class Example extends Component {
render() {
return (
<App>
<Window
title="Proton Native Rocks!"
size={{ w: 300, h: 300 }}
menuBar={false}
margined
>
<Box>
<Area>
<Area.Text x="10" y="30" style={{ color: 'red' }}>
<Area.Text style={{ fontSize: 20 }}>
Hi!
</Area.Text>
{'\n'}
Test{'\n'}
<Area.Text style={{ color: 'black', fontFamily: 'Arial' }}>
Sans serif
</Area.Text>
</Area.Text>
</Area>
</Box>
</Window>
</App>
);
}
} |
https://github.com/parro-it/libui-node/blob/master/docs/attributedstring.md
The text was updated successfully, but these errors were encountered: