「App:Library:LVGL:docs:3rd party libraries:FreeType support」の版間の差分
47行目: | 47行目: | ||
# <code style="color: #bb0000;">LV_FREETYPE_CACHE_FT_FACES</code>:maximum number of opened FT_Face objects managed by this cache instance.0 means use the system default value. Only useful when LV_FREETYPE_CACHE_SIZE >= 0. | # <code style="color: #bb0000;">LV_FREETYPE_CACHE_FT_FACES</code>:maximum number of opened FT_Face objects managed by this cache instance.0 means use the system default value. Only useful when LV_FREETYPE_CACHE_SIZE >= 0. | ||
# <code style="color: #bb0000;">LV_FREETYPE_CACHE_FT_SIZES</code>:maximum number of opened FT_Size objects managed by this cache instance. 0 means use the system default value. Only useful when LV_FREETYPE_CACHE_SIZE >= 0. | # <code style="color: #bb0000;">LV_FREETYPE_CACHE_FT_SIZES</code>:maximum number of opened FT_Size objects managed by this cache instance. 0 means use the system default value. Only useful when LV_FREETYPE_CACHE_SIZE >= 0. | ||
+ | |||
When you are sure that all the used font sizes will not be greater than 256, you can enable <code style="color: #bb0000;">LV_FREETYPE_SBIT_CACHE</code>, which is much more memory efficient for small bitmaps. | When you are sure that all the used font sizes will not be greater than 256, you can enable <code style="color: #bb0000;">LV_FREETYPE_SBIT_CACHE</code>, which is much more memory efficient for small bitmaps. | ||
57行目: | 58行目: | ||
# <code style="color: #bb0000;">FT_FONT_STYLE_ITALIC</code>:Italic style | # <code style="color: #bb0000;">FT_FONT_STYLE_ITALIC</code>:Italic style | ||
# <code style="color: #bb0000;">FT_FONT_STYLE_BOLD</code>:bold style | # <code style="color: #bb0000;">FT_FONT_STYLE_BOLD</code>:bold style | ||
+ | |||
They can be combined.eg:<code style="color: #bb0000;">FT_FONT_STYLE_BOLD | FT_FONT_STYLE_ITALIC</code>. | They can be combined.eg:<code style="color: #bb0000;">FT_FONT_STYLE_BOLD | FT_FONT_STYLE_ITALIC</code>. | ||
Note that, the FreeType extension doesn't use LVGL's file system. You can simply pass the path to the font as usual on your operating system or platform. | Note that, the FreeType extension doesn't use LVGL's file system. You can simply pass the path to the font as usual on your operating system or platform. | ||
− | | | + | |<code style="color: #bb0000;">lv_conf.h</code> で <code style="color: #bb0000;">LV_USE_FREETYPE</code> を有効化します。 |
+ | |||
− | + | 開いているフォントのグリフをキャッシュするには、<code style="color: #bb0000;">LV_FREETYPE_CACHE_SIZE >= 0</code> に設定した後、以下のマクロで詳細な設定を行います。 | |
# <code style="color: #bb0000;">LV_FREETYPE_CACHE_SIZE</code>:フォントビットマップ、アウトライン、文字コード表などをキャッシュするために使用される最大メモリ(バイト)。0はシステムのデフォルト値を使用することを意味し、0未満はキャッシュを無効にすることを意味します。注:この値は、管理対象のFT_FaceおよびFT_Sizeオブジェクトを考慮していないことに注意してください。 | # <code style="color: #bb0000;">LV_FREETYPE_CACHE_SIZE</code>:フォントビットマップ、アウトライン、文字コード表などをキャッシュするために使用される最大メモリ(バイト)。0はシステムのデフォルト値を使用することを意味し、0未満はキャッシュを無効にすることを意味します。注:この値は、管理対象のFT_FaceおよびFT_Sizeオブジェクトを考慮していないことに注意してください。 | ||
69行目: | 72行目: | ||
# <code style="color: #bb0000;">LV_FREETYPE_CACHE_FT_SIZES</code>:このキャッシュインスタンスによって管理される、開かれたFT_Sizeオブジェクトの最大数。0は、システムのデフォルト値を使用することを意味します。LV_FREETYPE_CACHE_SIZE>=0の場合にのみ役立ちます。 | # <code style="color: #bb0000;">LV_FREETYPE_CACHE_FT_SIZES</code>:このキャッシュインスタンスによって管理される、開かれたFT_Sizeオブジェクトの最大数。0は、システムのデフォルト値を使用することを意味します。LV_FREETYPE_CACHE_SIZE>=0の場合にのみ役立ちます。 | ||
− | |||
− | <code style="color: #bb0000;">lv_ft_font_init()</code> | + | 使用するフォントサイズがすべて256を超えないことが確実な場合は、<code style="color: #bb0000;">LV_FREETYPE_SBIT_CACHE</code>を有効にすると、小さなビットマップに対してより高いメモリ効率を実現することができます。 |
+ | |||
+ | |||
+ | <code style="color: #bb0000;">lv_ft_font_init()</code> を使用すると、FreeType フォントを作成することができます。これは成功を示す<code style="color: #bb0000;">true</code>を返し、同時に<code style="color: #bb0000;">lv_ft_info_t</code> の <code style="color: #bb0000;">font</code>メンバに LVGL フォントへのポインタが格納され、他の LVGL フォントと同様に使用できるようになります。 | ||
フォントスタイルは太字と斜体をサポートしています。次のマクロを使用して設定できます。 | フォントスタイルは太字と斜体をサポートしています。次のマクロを使用して設定できます。 | ||
79行目: | 84行目: | ||
# <code style="color: #bb0000;">FT_FONT_STYLE_BOLD</code>:太字スタイル | # <code style="color: #bb0000;">FT_FONT_STYLE_BOLD</code>:太字スタイル | ||
− | |||
− | + | これらは組み合わせることができます。例:<code style="color: #bb0000;">FT_FONT_STYLE_BOLD | FT_FONT_STYLE_ITALIC</code>。 | |
+ | |||
+ | |||
+ | FreeType拡張は、LVGLのファイルシステムを使用しないことに注意してください。あなたのオペレーティングシステムやプラットフォームで通常行われているように、単にフォントのパスを渡すことができます。 | ||
|} | |} | ||
2022年6月29日 (水) 16:59時点における最新版
https://docs.lvgl.io/8.2/libs/freetype.html
FreeType support
Interface to FreeType to generate font bitmaps run time.
Install FreeType
英文 | 自動翻訳 |
---|---|
|
|
Add FreeType to your project
英文 | 自動翻訳 |
---|---|
|
|
Usage
英文 | 自動翻訳 |
---|---|
Enable To cache the glyphs from the opened fonts, set
You can use Font style supports bold and italic, you can use the following macros to set:
Note that, the FreeType extension doesn't use LVGL's file system. You can simply pass the path to the font as usual on your operating system or platform. |
lv_conf.h で LV_USE_FREETYPE を有効化します。
フォントスタイルは太字と斜体をサポートしています。次のマクロを使用して設定できます。
|
Example
英文 | 自動翻訳 |
---|---|
Open a front with FreeType |
Learn more
英文 | 自動翻訳 |
---|---|
|
|
API
英文 | 自動翻訳 |
---|---|
Enums
Functions
|
機能
|