diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-07-09 12:01:01 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-07-09 12:01:01 -0400 |
commit | 85aa95105755468d6a8f833bcfdf9b56de02843a (patch) | |
tree | c0404790f20fafbaf85e9ad17f50ebb00907be40 /pango/break.c | |
parent | a3229b9c026141d6df70bd6f2f58102dac3678bc (diff) | |
download | pango-85aa95105755468d6a8f833bcfdf9b56de02843a.tar.gz |
break: Call break_script directly
No need to go through the engine api anymore.
Diffstat (limited to 'pango/break.c')
-rw-r--r-- | pango/break.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/pango/break.c b/pango/break.c index 13ccbdaf..c27ee7b4 100644 --- a/pango/break.c +++ b/pango/break.c @@ -1581,23 +1581,25 @@ pango_default_break (const gchar *text, } static gboolean +break_script (const char *item_text, + unsigned int item_length, + const PangoAnalysis *analysis, + PangoLogAttr *attrs, + int attrs_len); + +static gboolean tailor_break (const gchar *text, gint length, PangoAnalysis *analysis, PangoLogAttr *attrs, int attrs_len) { - if (analysis->lang_engine && PANGO_ENGINE_LANG_GET_CLASS (analysis->lang_engine)->script_break) - { - if (length < 0) - length = strlen (text); - else if (text == NULL) - text = ""; + if (length < 0) + length = strlen (text); + else if (text == NULL) + text = ""; - PANGO_ENGINE_LANG_GET_CLASS (analysis->lang_engine)->script_break (analysis->lang_engine, text, length, analysis, attrs, attrs_len); - return TRUE; - } - return FALSE; + return break_script (text, length, analysis, attrs, attrs_len); } /** @@ -1824,7 +1826,7 @@ pango_get_log_attrs (const char *text, #include "break-indic.c" #include "break-thai.c" -static void +static gboolean break_script (const char *item_text, unsigned int item_length, const PangoAnalysis *analysis, @@ -1853,7 +1855,11 @@ break_script (const char *item_text, case PANGO_SCRIPT_THAI: break_thai (item_text, item_length, analysis, attrs, attrs_len); break; + default: + return FALSE; } + + return TRUE; } |