![]() I don’t think anybody is allowed to comment on specifics like future release dates. Exported to PDF - same issue - font is distorted - see attached.Īfter posting this, I’ve done a little more experimenting and have discovered that anything that follows a TAB character in a text box gets distorted when exported to a PDF file. I opened Layout and created a new blank document - added a text box and several lines of text. I’ve tried changing my export resolution to medium - same issue. I tried reinstalling SU Pro 2021.1.1 - same issue. I’ve pulled a backup template off the server - same issue. I’ve tried changing the font several times - same issue. I’ve tried deleting the text area and replacing it with a new one - same issue. Since the recent SU Pro update, some of the fonts in the exported PDF file are not displaying properly - They are grossly enlarged and do not properly represent the content of my template file. * Store the result in `dsc_out`.My workflow for years has been to migrate my SU drawing to a Layout template, adjust the Layout file to my liking and export it to a PDF file. * Get info about glyph of `unicode_letter` in `font` font. user_data = user_data /*Optionally some extra user data*/. dsc = something_required /*Store any implementation specific data here*/ my_font. base_line = base_line /*Base line measured from the top of line_height*/ my_font. line_height = height /*The real line height where any text fits*/ my_font. get_glyph_bitmap = my_get_glyph_bitmap_cb /*Set a callback to get bitmap of a glyp*/ my_font. get_glyph_dsc = my_get_glyph_dsc_cb /*Set a callback to get info about gylphs*/ my_font. *Describe the properties of a font*/ lv_font_t my_font my_font. To use the symbol you may need to change it. Note - lv_label_set_text(label, MY_USB_SYMBOL) searches for this symbol in the font defined in properties. For 0xf287 the Hex UTF-8 bytes are EF 8A 87.Ĭreate a define from the UTF8 values: #define MY_USB_SYMBOL "\圎F\x8A\x87"Ĭreate a label and set the text. c file of your font.ĭeclare the font using extern lv_font_t my_font_name or simply LV_FONT_DECLARE(my_font_name). Ĭonvert the font and copy it to your project. You'll use this name to declare and use the font in your code.Īdd the Unicode ID of the symbol to the range field. Set the parameters such as Name, Size, BPP. Copy it's Unicode ID which is 0xf287 in this case. The built-in symbols are created from FontAwesome font. The texts in lv_table, lv_btnmatrix, lv_keyboard, lv_tabview, lv_dropdown, lv_roller are "BiDi processed" to be displayed correctly Lv_dropdown: Align the options to the right Lv_btnmatrix: Show buttons from right to left Lv_tabview: displays tabs from right to left This list summarizes the effect of RTL base direction on objects: LV_BIDI_DIR_INHERIT: Inherit the base direction from the parent (default for non-screen objects) LV_BIDI_DIR_AUTO: Auto detect base direction LV_BIDI_DIR_RTL: Right to Left base direction LV_BIDI_DIR_LTR: Left to Right base direction To set an object's base direction use lv_obj_set_base_dir(obj, base_dir). The default base direction of screen can be set by LV_BIDI_BASE_DIR_DEF in lv_conf.h and other objects inherit the base direction from their parent. So it's enough to set the base direction of the screen and every object will inherit it. ![]() If unset then it will be inherited from the parent. It's a general property which can be set for every object. However, in LVGL, base direction is applied not only for labels. ![]() The BiDi support can be enabled by LV_USE_BIDI in lv_conf.hĪll texts have a base direction (LTR or RTL) which determines some rendering rules and the default alignment of the text (Left or Right). LVGL not only supports RTL texts but supports mixed (a.k.a. Most of the languages use Left-to-Right (LTR for short) writing direction, however some languages (such as Hebrew, Persian or Arabic) uses Right-to-Left (RTL for short) direction.
0 Comments
Leave a Reply. |