Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFirst part of font refactoring. These changes simplify a few things #2751
+212
−467
Conversation
but don't do much on their own, they just make it easier to implement the work to come (web fonts, performance improvments in terms of font loading and memory usage). - Font identifier on Linux/Android is now the font file path. This is a temporary measure, but simplifies things a lot for now. - Remove FontListHandleMethods trait in favour of free functions. - FontList::refresh() has no knowledge of FontFamily etc. Instead it takes a closure that the caller provides. - FontList::load_variations_for_family no longer creates the font handle. Instead it takes a closure and provides the name of the font identifier for the variations it finds. - Remove path_from_identifier() - it's no longer required. - create_font_from_identifier() takes an Option<Style>, allowing it to be used to create fonts for family matching purposes where the font size is not important. Tested on Linux + Mac. Builds on Android but not able to confirm it's working correctly.
hoppipolla-critic-bot
commented
Jul 2, 2014
|
Critic review: https://critic.hoppipolla.co.uk/r/1952 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
highfive
commented
Jul 2, 2014
This comment has been minimized.
This comment has been minimized.
larsbergstrom
commented on 51bd334
Jul 3, 2014
|
r+ |
larsbergstrom
added a commit
that referenced
this pull request
Jul 3, 2014
First part of font refactoring. These changes simplify a few things
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
glennw commentedJul 2, 2014
but don't do much on their own, they just make it easier to
implement the work to come (web fonts, performance improvments
in terms of font loading and memory usage).
This is a temporary measure, but simplifies things a lot for now.
a closure that the caller provides.
handle. Instead it takes a closure and provides the name of the font
identifier for the variations it finds.
used to create fonts for family matching purposes where the font size is
not important.
Tested on Linux + Mac. Builds on Android but not able to confirm it's working correctly.