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

Android integration #14

Open
matprec opened this issue Oct 6, 2017 · 2 comments
Open

Android integration #14

matprec opened this issue Oct 6, 2017 · 2 comments

Comments

@matprec
Copy link
Owner

matprec commented Oct 6, 2017

The font loading and parsing logic is implemented in java. They parse a simple xml file which contains all the infos, so replicating shouldn't be a problem.

Parsing by third party apps is NOT supported, see source, which means we'll have to specialize for android releases, in case they change behaviour. Also unchecked, which Android version is the earliest we could supported with this?

@christolliday
Copy link

Might be helpful to look at what servo is doing here: https://github.com/servo/servo/blob/master/components/gfx/platform/freetype/android/font_list.rs

Looks like they support from API 17 (Android 4.2) on, which seems reasonable to be the earliest supported version. Also, apparently there is an API for querying fonts available in Android O (API 26), but I don't think servo supports it yet.

@matprec
Copy link
Owner Author

matprec commented Oct 6, 2017

Thanks for the servo hint, didn't thought on that one! Having working reference code is a nice addition.

I'm concerned that we can't trivialy implement the query interface, because they store no metadata about those fonts. Therefore, we would have to load the files and index them on our own i guess.

Just leaving this as a reminder for future me: https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts.html

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

No branches or pull requests

2 participants