forked from enlightenment/efl
Evas font: skip over common script items when getting the font, we should get the font of the actual script items.
SVN revision: 56484
This commit is contained in:
parent
f7a4cf52a8
commit
58af440aab
|
@ -162,7 +162,17 @@ evas_common_font_ot_populate_text_props(void *_fn, const Eina_Unicode *text,
|
||||||
fi->src->current_size = fi->size;
|
fi->src->current_size = fi->size;
|
||||||
}
|
}
|
||||||
/* Load the font needed for this script */
|
/* Load the font needed for this script */
|
||||||
evas_common_font_glyph_search(fn, &fi, *text);
|
{
|
||||||
|
/* Skip common chars */
|
||||||
|
const Eina_Unicode *tmp;
|
||||||
|
for (tmp = text ;
|
||||||
|
*tmp &&
|
||||||
|
evas_common_language_char_script_get(*tmp) == EVAS_SCRIPT_COMMON ;
|
||||||
|
tmp++)
|
||||||
|
;
|
||||||
|
if (!*tmp && (tmp > text)) tmp--;
|
||||||
|
evas_common_font_glyph_search(fn, &fi, *tmp);
|
||||||
|
}
|
||||||
|
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,18 @@
|
||||||
prev_index = 0; \
|
prev_index = 0; \
|
||||||
/* Load the glyph according to the first letter of the script, preety
|
/* Load the glyph according to the first letter of the script, preety
|
||||||
* bad, but will have to do */ \
|
* bad, but will have to do */ \
|
||||||
evas_common_font_glyph_search(fn, &fi, *text); \
|
{ \
|
||||||
|
/* Skip common chars */ \
|
||||||
|
const Eina_Unicode *tmp; \
|
||||||
|
for (tmp = text ; \
|
||||||
|
*tmp && \
|
||||||
|
evas_common_language_char_script_get(*tmp) == \
|
||||||
|
EVAS_SCRIPT_COMMON ; \
|
||||||
|
tmp++) \
|
||||||
|
; \
|
||||||
|
if (!*tmp && (tmp > text)) tmp--; \
|
||||||
|
evas_common_font_glyph_search(fn, &fi, *tmp); \
|
||||||
|
} \
|
||||||
for (char_index = 0 ; char_index < intl_props->ot_data->len ; char_index++) \
|
for (char_index = 0 ; char_index < intl_props->ot_data->len ; char_index++) \
|
||||||
{ \
|
{ \
|
||||||
FT_UInt index; \
|
FT_UInt index; \
|
||||||
|
@ -47,9 +58,19 @@
|
||||||
{ \
|
{ \
|
||||||
int _char_index_d, _i; \
|
int _char_index_d, _i; \
|
||||||
int visible; \
|
int visible; \
|
||||||
/* Load the glyph according to the first letter of the script, preety
|
/* Load the font needed for this script */ \
|
||||||
* bad, but will have to do */ \
|
{ \
|
||||||
evas_common_font_glyph_search(fn, &fi, *text); \
|
/* Skip common chars */ \
|
||||||
|
const Eina_Unicode *tmp; \
|
||||||
|
for (tmp = text ; \
|
||||||
|
*tmp && \
|
||||||
|
evas_common_language_char_script_get(*tmp) == \
|
||||||
|
EVAS_SCRIPT_COMMON ; \
|
||||||
|
tmp++) \
|
||||||
|
; \
|
||||||
|
if (!*tmp && (tmp > text)) tmp--; \
|
||||||
|
evas_common_font_glyph_search(fn, &fi, *tmp); \
|
||||||
|
} \
|
||||||
prev_index = 0; \
|
prev_index = 0; \
|
||||||
_i = intl_props->ot_data->len; \
|
_i = intl_props->ot_data->len; \
|
||||||
if (intl_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) \
|
if (intl_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) \
|
||||||
|
|
Loading…
Reference in New Issue