字体的查找:
mmi_lm_arabic_draw_cluster()
-->mmi_fe_show_single_cluster()
-->mmi_fe_show_font_data()
-->mmi_fe_shaper()
-->mmi_fe_get_font_data() //根据使用的是矢量字体还是点阵字体,获取相应的字体数据
mmi_fe_get_font_data_internal() //点阵字体信息
-->mmi_fe_show_thai_char_internal() //查找字体对应的点阵数据
-->GetLangIndex() //查找字体类型索引和字体在字库的rangeoffset值和rangedata对应的范围min值
-->SearchIndexinList() //二分法在rangedata通过ch范围查找对应的索引下标,再跟据该标号找到rangeoffset 查找偏移量
字体的显示:
mmi_fe_show_font_data() //根据使用的是矢量字体还是点阵字体,采用对应的绘图方法
--> gdi_show_char() //点阵字体的显示
---> g2d_draw_font()
1.verdor/font/inc 下面头文件存储字体相关信息,字库数据
2.verdor/font/fontres.c 中定义系统使用字库相关数据信息
const U16 mtk_gMaxDeployedLangs;
好多语言字体种类:类似下面的内容重复
sCustFontData Pluto_ch;
sCustFontData Pluto_ch_small;
sCustFontData pluto_ch_large;
sFontFamily pluto_ch_standardFamily = {9,{&Pluto_ch_small, &Pluto_ch, &pluto_ch_large, &Pluto_ch_small, &Pluto_ch, &Pluto_ch, &Pluto_ch,&mtk_virtual_keyboard, &mtk_virtual_keyboard_large}};
const sLanguageDetails mtk_gLanguageArray[MAX_LANGUAGES];
3.. 数据结构fontres.h 语言列表信息
typedef struct _LanguageDetails
{
U8 aName[LANGUAGE_NAME];
U8 aLangSSC[SSC_SIZE];
U8 nCurrentFamily;
sFontFamily *fontfamilyList[MAX_FONT_FAMILIES];
U8 aLangCountryCode[LCC_SIZE];
} sLanguageDetails;
2.
typedef struct _FontFamily
{
U16 nTotalFonts;
sCustFontData *fontData[MAX_FONTS_DATA];
} sFontFamily;
3.
typedef struct _CustFontData
{
U8 nHeight;
U8 nWidth;
U8 nAscent;
U8 nDescent;
U8 nEquiDistant;
U8 nCharBytes;
U16 nMaxChars;
U8 *pDWidthArray;
U8 *pWidthArray;
#if defined(__MMI_FONT_COMPRESSION__)
U16 *pOffsetArray;
#else
U32 *pOffsetArray;
#endif
U8 *pDataArray; // 字库数据,如GB18030_Data
#if defined(__MMI_FONT_COMPRESSION__)
mmi_font_range_offset_struct* pRange; //GB18030_RangeOffset
#else
U32 *pRange;
#endif
U16 pFontType[MAX_FONT_TYPES][2];
const RangeDetails *pRangeDetails; // GB18030_RangeInfo
} sCustFontData;