-
Notifications
You must be signed in to change notification settings - Fork 568
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
Unable to load a font and use it in a label (Windows) #1622
Comments
@SecondFlight hmm. Maybe try some This will be easier to debug if you don't have many text objects active. |
It seems to, yes. Thanks for the pointer; by adding a println!("{:?}", descriptor.family.clone()); This prints the following:
I've also tested this against piet#406 with no change, though I haven't yet tried verifying piet#406 against what it was actually meant to fix. |
println!("{}", family);
println!("{:?}", range); This prints:
Gave the same treatment to println!("{:?}", self.names); Which prints:
|
With my very limited Direct2D knowledge, it does seem like everything is going as expected. The font loads (or at least RegisterFontCollectionLoader gives back All the pieces appear to be functioning and in play in this example. The Direct2D samples include some custom fonts and they work, so it's not like |
It would be nice to know if this is a problem somewhere in piet, or if it's a problem somewhere in druid. For instance: it's possible that in druid we're loading this font into a particular What I would check here is in |
Tested on Windows 10 with the latest master (3661030).
Repo: https://github.com/SecondFlight/druid-font-repro
I include a font (Noto Sans Mono in this case) with
I then load it into the environment in my parent widget, like so:
Then, in a child widget, I try to use the font:
I expect the first label to have a monospace font, but it has the same font as the second label.
The text was updated successfully, but these errors were encountered: