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

Adds A Config Option To Provide a FontPath Substitution Map #399

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thorbenprimke
Copy link

@thorbenprimke thorbenprimke commented Jun 29, 2017

Summary:
In order to A/B test fonts, this adds an option to the
CalligraphyConfig to provide a fontPath substitution map.
This enables dynamically changing fonts at run time and requires
no changes to XML files.
The logic to substitute the fontPath is in the TypefaceUtils.
The reason the map is set on the TypeFaceUtils class instead of the
TypefaceUtils checking the CalligraphyConfig is that this way
it doesn't require constant invocations of CalligraphyConfig.get().

Test Plan:

  • Verified with sample app that the new config option works as expected.

Summary:
In order to A/B test fonts, this adds an option to the
CalligraphyConfig to provide a fontPath substitution map.
This enables dynamically changing fonts at run time and requires
no changes to XML files.
The logic to substitute the fontPath is in the TypefaceUtils.
The reason the map is set on the TypeFaceUtils instead of the
TypefaceUtils to checked the CalligraphyConfig is that this way
it doesn't require constant invokations to CalligraphyConfig.get().

Test Plan:
- Verified with sample app that the new config option works as expected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant