Skip to content
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

First part of font refactoring. These changes simplify a few things #2751

Merged
merged 1 commit into from Jul 3, 2014

Commits on Jul 2, 2014

  1. First part of font refactoring. These changes simplify a few things

    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.
    gw3583 committed Jul 2, 2014
You can’t perform that action at this time.