Page 1 of 1

Multiple problems with text fonts

Posted: 15 Sep 2021, 22:38
by krupitskas
Hey there, we have multiple problems with fonts:

1) Fonts that do not support cyrillic (I suppose) can't be found:
I have two fonts: Montserrat and AlexBrush. In my macos Montserrat shows Russian letters as preview and AlexBrush default latin.
I've tried also more fonts, all, which supports cyrrilic - works.
Works means that in the function of FontProvider::FamilyExists(...) it returns true.

2) Dynamically created text doesn't change font-family:
Also I've tried
text_block.SetFontFamily(Noesis::MakePtr<Noesis::FontFamily>("bundles/font_bundle", "#Forum"));
No success. It's not even jumping into the
I've debugged place where RegisterFont is happening and used same uri and font family name.

Re: Multiple problems with text fonts

Posted: 20 Sep 2021, 16:57
by sfernandez

1) Could you please open a ticket and attach a font file that doesn't work for you? How are you referencing the font in XAML? As explained in our Text tutorial, if you don't specify a folder before the '#' sign it will try to find the font in the operating system. Are you testing this in macOS?

2) All the code examples create a FontFamily that searches for that font in the operating system. If Forum is not installed it won't work.
To load a font from your FontProvider you have to specify a local path before the # sign:
Please let me know if that works for you.

Re: Multiple problems with text fonts

Posted: 21 Sep 2021, 17:54
by krupitskas

1) Done:
2) Thanks, that did the job!