-
-
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
[WIP] Font #141
[WIP] Font #141
Conversation
Ok, its hard to get a component to know its parents. I sort of did something like that here https://github.com/kusti8/proton-native/blob/yoga/src/components/View.js, where I used the parent component and then basically chained function calls all the way up to the root. Default font should be Arial either 12pt or 14pt. Currently 12pt is pretty standard so that should be good. I'll work on |
👍
Everything from the libui api should be implemented (except for OpenTypeFeatures which can for example be used to turn on/off ligatures). |
I added |
This needs to be adjusted to accept StyledText: (bottom of components/Area.js) Area.Text.propTypes = {
children: PropTypes.oneOfType([areaProp, PropTypes.arrayOf(areaProp)]),
}; |
Looks like this is done. I'll merge if that's good with you @mischnic |
src/components/Area.js
Outdated
|
||
const font = new libui.FontDescriptor( | ||
'Arial', | ||
14, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is done. I'll merge if that's good with you @mischnic
👍
You might want to change this to 12
for the default font (that's also the default font size of the font button on macOS).
That
FancyText
(not sure about the name) isn't implemented yet-> How can a React.Component determine the type of it's parents?
@kusti8 What should the default font family and size be (currently Arial 14pt)?
Closes #138
Some libui bugs: