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

Add font-kit support #2

Open
cbrewster opened this issue Jan 14, 2020 · 2 comments
Open

Add font-kit support #2

cbrewster opened this issue Jan 14, 2020 · 2 comments

Comments

@cbrewster
Copy link
Owner

Continued from #1

Right now fonts are accessed via hard-coded paths. This is not portable, we should look into using fontkit.

@rofrol
Copy link
Contributor

rofrol commented Jan 15, 2020

Plan

Remove usage of https://doc.rust-lang.org/std/macro.include_bytes.html with:

  1. Load system monospace font with font-kit.
  2. Convert it to wgpu_glyph::Font (compiler shows rusttype::Font).

Use this examples

Documentation

Other Examples

Concerns/Alternatives

On my Windows box, font-kit takes just over a minute to compile and over 800k release code size. That seems high for something that's just loading fonts, but on the other hand I don't see any good way to get this down.

@cbrewster
Copy link
Owner Author

I prefer to avoid adding large dependencies, but for now this is probably the easiest approach to get the editor much more portable.
It may be worth revisiting this later as we probably won't be using everything font-kit has to offer.

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