icfans

Neptune中越南语带音标字符显示分割

0
阅读(330) 评论(0)

[DESCRIPTION]icfans
Neptune 工程中一些带音标字符被分开显示成两个字符 ( 比如 '' 被分开显示为 'e' + '~' )
[SOLUTION]
修改函数mmi_fe_prepare_string_to_render()
1、添加定义:
#if defined(__MMI_LANG_VIETNAMESE__)
UI_character_type dummy_c;
viet_tone_mark tone_mark = VIET_TONE_NONE;
viet_vowel_letter viet_vowel = VIET_VOWEL_NONE;
U16 i = 0;
#endif /* defined(__MMI_LANG_VIETNAMESE__) */
2、增加变型规则,参考 //add_start //add_end之间代码:
CurrentX = 0;
#ifdef __MMI_INDIC_ALG__
CurrentY = 0;
#endif
//add_start
#if defined(__MMI_LANG_VIETNAMESE__)
for(idx = 0; idx < len; idx++)
{
if ((disp_buff[idx] > 0x0040) && (disp_buff[idx] < 0x01B1))
{
unicode = disp_buff[idx];
dummy_c = disp_buff[idx+1];
tone_mark = mmi_viet_tone_mark(dummy_c);
viet_vowel = mmi_viet_vowel_letter(unicode);
if ( (VIET_TONE_NONE != tone_mark) &&
(VIET_VOWEL_NONE != viet_vowel) )
{
viet_vowel = mmi_viet_vowel_letter(disp_buff[idx]);
disp_buff[i]=mmi_viet_combine_vowel_tone(viet_vowel,tone_mark);
idx++;
}
else
{
disp_buff[i] = disp_buff[idx];
}
}
else
{
disp_buff[i] = disp_buff[idx];
}
i++;
if ((idx+1) >= len)
{
disp_buff[i] = 0;
break;
}
}
String = (U8*) disp_buff;
len = UCS2Strlen((const char*)String);
*p_disp_len = len;
#endif /* defined(__MMI_LANG_VIETNAMESE__) */
//add_end
/* Extract data for 1st character */
Counter = 0;
unicode = mmi_fe_process_next_char(String, &font_data_param );