how to use generated font in UI editor

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to use generated font in UI editor

1,679件の閲覧回数
bobl51
Contributor I

I generated a custom font, MontserratMedium-60, with only digits 0-9, to save memory space. It creates file generated/guider_customer_fonts/lv_customer_font_montserratMedium_60.c

How can I get the UI editor to show and use this generated font in the style selection for a new label widget and in the generated C code for the widget? It does not show up as a possible selection in the Attributes panel under Fonts.

0 件の賞賛
返信
3 返答(返信)

1,612件の閲覧回数
StarryKnight04
Contributor I

If you've already imported the font and it's showing up in the guider_customer_fonts folder, make sure you've assigned it to a widget in the UI editor. After that, regenerate the code so it gets included properly. Also, double-check that the font includes all the characters you need—sometimes missing glyphs can cause issues. If it's still not showing up, try restarting GUI Guider or check the user guide for font setup steps.

0 件の賞賛
返信

1,654件の閲覧回数
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @bobl51,

Please follow the instructions as seen on the following section of the user guide: GUIGUIDERUG: GUI Guider User's Guide | NXP Semiconductors

BR,
Edwin.

0 件の賞賛
返信

1,642件の閲覧回数
bobl51
Contributor I

Thank you for your response, but it does not address my problem. Perhaps I was unclear, or perhaps GuiGuider can not do what I expected. Import font can only import .ttf files.

Maybe this is a clearer example:

I import a free font from Google : Roboto_Medium.ttf. I can use this font in GuiGuider UI Editor and all looks fine on the preview display.

But I need to display some large digits, say 72 points. I can assign Roboto_Medium, size 72 in the Attribute panel for my number text label in UI Editor. The preview looks fine. When I generate C code, it creates generated/guider_fonts/lv_font_Roboto_Medium_72.c. My application works, but the generated font .c file is >1MB in size, because the text is so large.

I only need digits from this font, so I generate a custom font, with only numeric digits. The generated font file lv_customer_font_Ronoto_Medium_72.c is only 50KB - 95% smaller. I want to use this font file in the final application, and not use the 1MB file. 
I cannot find a way to specify this custom font for my text label using UI Editor to generate the C code.  

I can write custom app code to overwrite the font set by UI Editor, but I still have the 1MB file linked in my app.

I can try to not use Roboto_Medium/72 in the UI Editor and thus not include the 1MB file, but then my preview looks wrong. 

Am I stuck?

0 件の賞賛
返信