mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
The previous naming conflated multiple levels of the font model:
pd_font_t actually owned a single typeface resource (FT_Face), while
pd_font_bitmap_t represented a per-glyph bitmap. The pd_font_library_*
prefix was redundant under the pd_font_ namespace and resulted in
verbose call sites (up to 34 chars).
Type renames
- pd_font_t -> pd_font_face_t
- pd_font_bitmap_t -> pd_glyph_bitmap_t
- font_engine_t -> pd_font_engine_t
- struct tags updated to match the typedef names.
API renames (grouped by sub-object)
- Face lifecycle: pd_font_create/destroy -> pd_font_face_create/destroy
- Face registry: pd_font_library_add_font -> pd_font_register
pd_font_library_get_font -> pd_font_get
pd_font_library_get_font_id -> pd_font_get_id
pd_font_library_query -> pd_font_query
pd_font_library_load_file -> pd_font_load_file
pd_font_library_get_font_path-> pd_font_find_path
pd_font_library_get_default_font -> pd_font_get_default
pd_font_library_set_default_font -> pd_font_set_default
pd_font_library_set_font_family_alias
-> pd_font_family_set_alias
pd_font_library_update_font_weight
-> pd_font_replace_weight
pd_font_library_update_font_style
-> pd_font_replace_style
- Parsing helpers: pd_font_library_detect_weight -> pd_font_parse_weight
pd_font_library_detect_style -> pd_font_parse_style
- Glyph rendering: pd_font_library_render_bitmap -> pd_font_render_glyph
pd_canvas_mix_font_bitmap -> pd_canvas_mix_glyph_bitmap
pd_font_bitmap_init/destroy -> pd_glyph_bitmap_init/destroy
- Glyph cache: pd_font_library_add_bitmap -> pd_font_cache_add_bitmap
pd_font_library_get_bitmap -> pd_font_cache_get_bitmap
pd_font_library_init/destroy are kept as the module lifecycle entry
points, matching the FT_Init_FreeType / FT_Done_FreeType convention.
All call sites in lib/pandagl, lib/ui, lib/ui-xml, src/, tests/ and
examples/ are updated accordingly.