Skip to content

fix: dont default to Font.default#8401

Merged
vtrifonov merged 9 commits into
NativeScript:masterfrom
Akylas:font_properties
Apr 3, 2020
Merged

fix: dont default to Font.default#8401
vtrifonov merged 9 commits into
NativeScript:masterfrom
Akylas:font_properties

Conversation

@farfromrefug
Copy link
Copy Markdown
Collaborator

@farfromrefug farfromrefug commented Mar 2, 2020

This would cause a font to be set for any label even when using default system font.
This will also cause a typeface creation which is pretty long

This PR also add a new optional behavior. In my nativescript-htmllabel the textSize is handled by the component and not using Font. To make things faster i would need the fontSizeProperty not to create a fontInternal as it would create native typeface.
So this PR checks for handleFontSize property on the View.
If you prefer it done another way i am happy to change it.

This would cause a font to be set for any label even when using default system font.
This will also cause a typeface which is pretty long
@cla-bot cla-bot Bot added the cla: yes label Mar 2, 2020
@vtrifonov
Copy link
Copy Markdown
Contributor

@farfromrefug can you please update your branch? Thanks!

@vtrifonov
Copy link
Copy Markdown
Contributor

@farfromrefug can you please fix the following linter errors:

18:53:42 ERROR: /Users/nsbuilduser/workspace/pr-tns-core-modules/nativescript-core/ui/styling/style-properties.ts:1173:11 - missing whitespace
18:53:42 ERROR: /Users/nsbuilduser/workspace/pr-tns-core-modules/nativescript-core/ui/styling/style-properties.ts:1173:19 - view is deprecated: use `viewRef` instead.
18:53:42 
18:53:42 The `ViewBase` object associated with the Style!
18:53:42 ERROR: /Users/nsbuilduser/workspace/pr-tns-core-modules/nativescript-core/ui/styling/style-properties.ts:1173:24 - ' should be "

@NativeScript NativeScript deleted a comment from vmutafov Mar 19, 2020
@vtrifonov
Copy link
Copy Markdown
Contributor

ping @farfromrefug , can you update your branch and fix the linter errors :)

@vtrifonov
Copy link
Copy Markdown
Contributor

@farfromrefug can you check the following PR - Akylas#2

@farfromrefug
Copy link
Copy Markdown
Collaborator Author

@vtrifonov awesome. Sorry about that :s

@vtrifonov
Copy link
Copy Markdown
Contributor

@farfromrefug one more PR to merge Akylas#3 :)

fix: Used default bold for TabView
@farfromrefug
Copy link
Copy Markdown
Collaborator Author

@vtrifonov what test is that that showed the bold font error for tabs? Maybe i could run that on my side and save you some time ...

@vtrifonov vtrifonov merged commit ad9daa8 into NativeScript:master Apr 3, 2020
NathanWalker pushed a commit that referenced this pull request Aug 7, 2020
* fix: dont default to Font.default

This would cause a font to be set for any label even when using default system font.
This will also cause a typeface which is pretty long

* lint: lint fixes

* fix: added null font guards

* fix: Used default bold for TabView

Co-authored-by: Vasko <v.trifonov@gmail.com>
NathanWalker pushed a commit that referenced this pull request Aug 7, 2020
* fix: dont default to Font.default

This would cause a font to be set for any label even when using default system font.
This will also cause a typeface which is pretty long

* lint: lint fixes

* fix: added null font guards

* fix: Used default bold for TabView

Co-authored-by: Vasko <v.trifonov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants