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

Register custom fonts from font-face rules with AWT #42

Closed
czaurel opened this issue Oct 30, 2017 · 2 comments
Closed

Register custom fonts from font-face rules with AWT #42

czaurel opened this issue Oct 30, 2017 · 2 comments

Comments

@czaurel
Copy link
Contributor

czaurel commented Oct 30, 2017

AFAIK, the @font-face rules are only parsed but not used for actually doing anything with the font files. A basic implementation, which uses the font-family and src parts to call GraphicsEnvironment.registerFont could be pretty useful for using custom TTFs.

@czaurel
Copy link
Contributor Author

czaurel commented Oct 30, 2017

For the RuleFontFace properties, see radkovo/jStyleParser#78.

@radkovo
Copy link
Owner

radkovo commented Nov 2, 2017

It seems that font face rules are more complex. Mainly, there may be multiple sources (including local fonts etc.) I have reworked your implementation to correspond to the specification and I have moved the AWT-related part to VisualContext (to make things consistent). See the last few commits in both CSSBox and jStyleParser.

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