diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-01-16 20:07:35 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-01-16 20:07:35 +0000 |
commit | 80e647a8dbc97662b9d966c0f7a8e1aedea89eed (patch) | |
tree | d3a322c28112b7623765847aa32e8e319c576b45 /modules/basic | |
parent | e6b83e4264b4ad2ab73a3239d902b4064c75634d (diff) | |
download | pango-80e647a8dbc97662b9d966c0f7a8e1aedea89eed.tar.gz |
*.c, *.h: Drop trailing whitespace.
2007-01-16 Behdad Esfahbod <behdad@gnome.org>
*.c, *.h: Drop trailing whitespace.
svn path=/trunk/; revision=2163
Diffstat (limited to 'modules/basic')
-rw-r--r-- | modules/basic/basic-atsui.c | 38 | ||||
-rw-r--r-- | modules/basic/basic-fc.c | 54 | ||||
-rw-r--r-- | modules/basic/basic-win32.c | 50 | ||||
-rw-r--r-- | modules/basic/basic-x.c | 96 |
4 files changed, 119 insertions, 119 deletions
diff --git a/modules/basic/basic-atsui.c b/modules/basic/basic-atsui.c index b394102c..352c582e 100644 --- a/modules/basic/basic-atsui.c +++ b/modules/basic/basic-atsui.c @@ -63,7 +63,7 @@ static PangoEngineScriptInfo basic_scripts[] = { { PANGO_SCRIPT_SHAVIAN, "*" }, { PANGO_SCRIPT_LINEAR_B, "*" }, { PANGO_SCRIPT_UGARITIC, "*" }, - + { PANGO_SCRIPT_COMMON, "" } }; @@ -86,7 +86,7 @@ set_glyph (PangoFont *font, PangoRectangle logical_rect; glyphs->glyphs[i].glyph = glyph; - + glyphs->glyphs[i].geometry.x_offset = 0; glyphs->glyphs[i].geometry.y_offset = 0; @@ -95,7 +95,7 @@ set_glyph (PangoFont *font, glyphs->glyphs[i].geometry.width = logical_rect.width; } -static void +static void basic_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, @@ -124,23 +124,23 @@ basic_engine_shape (PangoEngineShape *engine, err = ATSUCreateTextLayout (&text_layout); err = ATSUSetTextPointerLocation (text_layout, utf16, 0, n16, n16); - + err = ATSUCreateStyle(&style); fontID = pango_cairo_atsui_font_get_atsu_font_id (cafont); - + err = ATSUSetAttributes(style, sizeof(styleTags) / sizeof(styleTags[0]), styleTags, styleSizes, styleValues); - + err = ATSUSetRunStyle(text_layout, style, kATSUFromTextBeginning, kATSUToTextEnd); - + err = ATSUDirectGetLayoutDataArrayPtrFromTextLayout (text_layout, 0, kATSUDirectDataLayoutRecordATSLayoutRecordCurrent, (void *)&layout_records, &glyph_count); - + p = text; pango_glyph_string_set_size (glyphs, glyph_count - 1); @@ -148,16 +148,16 @@ basic_engine_shape (PangoEngineShape *engine, { gunichar wc; gunichar mirrored_ch; - + wc = g_utf8_get_char (p); - + if (analysis->level % 2) if (pango_get_mirror_char (wc, &mirrored_ch)) wc = mirrored_ch; - + if (wc == 0xa0) /* non-break-space */ wc = 0x20; - + if (pango_is_zero_width (wc)) { set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_EMPTY); @@ -165,18 +165,18 @@ basic_engine_shape (PangoEngineShape *engine, else { set_glyph (font, glyphs, i, p - text, layout_records[i].glyphID); - + if (g_unichar_type (wc) == G_UNICODE_NON_SPACING_MARK) { if (i > 0) { PangoRectangle logical_rect, ink_rect; - + glyphs->glyphs[i].geometry.width = MAX (glyphs->glyphs[i-1].geometry.width, glyphs->glyphs[i].geometry.width); glyphs->glyphs[i-1].geometry.width = 0; glyphs->log_clusters[i] = glyphs->log_clusters[i-1]; - + /* Some heuristics to try to guess how overstrike glyphs are * done and compensate */ @@ -192,7 +192,7 @@ basic_engine_shape (PangoEngineShape *engine, ATSUDirectReleaseLayoutDataArrayPtr (NULL, kATSUDirectDataLayoutRecordATSLayoutRecordCurrent, (void *)&layout_records); - + ATSUDisposeTextLayout (text_layout); } @@ -205,18 +205,18 @@ basic_engine_atsui_class_init (PangoEngineShapeClass *class) PANGO_ENGINE_SHAPE_DEFINE_TYPE (BasicEngineATSUI, basic_engine_atsui, basic_engine_atsui_class_init, NULL); -void +void PANGO_MODULE_ENTRY(init) (GTypeModule *module) { basic_engine_atsui_register_type (module); } -void +void PANGO_MODULE_ENTRY(exit) (void) { } -void +void PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines, int *n_engines) { diff --git a/modules/basic/basic-fc.c b/modules/basic/basic-fc.c index 81a90360..0dcdbbd2 100644 --- a/modules/basic/basic-fc.c +++ b/modules/basic/basic-fc.c @@ -30,7 +30,7 @@ #include "pango-ot.h" #include "basic-common.h" - + /* No extra fields needed */ typedef PangoEngineShape BasicEngineFc; typedef PangoEngineShapeClass BasicEngineFcClass; @@ -70,7 +70,7 @@ static PangoEngineScriptInfo basic_scripts[] = { /* Unicode-4.1 additions */ { PANGO_SCRIPT_GLAGOLITIC, "*" }, - + /* Unicode-5.0 additions */ { PANGO_SCRIPT_CUNEIFORM, "*" }, { PANGO_SCRIPT_PHOENICIAN, "*" }, @@ -93,16 +93,16 @@ swap_range (PangoGlyphString *glyphs, int end) { int i, j; - + for (i = start, j = end - 1; i < j; i++, j--) { PangoGlyphInfo glyph_info; gint log_cluster; - + glyph_info = glyphs->glyphs[i]; glyphs->glyphs[i] = glyphs->glyphs[j]; glyphs->glyphs[j] = glyph_info; - + log_cluster = glyphs->log_clusters[i]; glyphs->log_clusters[i] = glyphs->log_clusters[j]; glyphs->log_clusters[j] = log_cluster; @@ -119,7 +119,7 @@ set_glyph (PangoFont *font, PangoRectangle logical_rect; glyphs->glyphs[i].glyph = glyph; - + glyphs->glyphs[i].geometry.x_offset = 0; glyphs->glyphs[i].geometry.y_offset = 0; @@ -129,7 +129,7 @@ set_glyph (PangoFont *font, glyphs->glyphs[i].geometry.width = logical_rect.width; } -static void +static void fallback_shape (PangoEngineShape *engine, PangoFont *font, const char *text, @@ -141,10 +141,10 @@ fallback_shape (PangoEngineShape *engine, glong n_chars = g_utf8_strlen (text, length); const char *p; int i; - + pango_glyph_string_set_size (glyphs, n_chars); p = text; - + for (i=0; i < n_chars; i++) { gunichar wc; @@ -158,7 +158,7 @@ fallback_shape (PangoEngineShape *engine, if (pango_get_mirror_char (wc, &mirrored_ch)) { wc = mirrored_ch; - + g_unichar_to_utf8 (wc, buf); } @@ -181,18 +181,18 @@ fallback_shape (PangoEngineShape *engine, else { set_glyph (font, glyphs, i, p - text, index); - + if (g_unichar_type (wc) == G_UNICODE_NON_SPACING_MARK) { if (i > 0) { PangoRectangle logical_rect, ink_rect; - + glyphs->glyphs[i].geometry.width = MAX (glyphs->glyphs[i-1].geometry.width, glyphs->glyphs[i].geometry.width); glyphs->glyphs[i-1].geometry.width = 0; glyphs->log_clusters[i] = glyphs->log_clusters[i-1]; - + /* Some heuristics to try to guess how overstrike glyphs are * done and compensate */ @@ -203,7 +203,7 @@ fallback_shape (PangoEngineShape *engine, } } } - + p = g_utf8_next_char (p); } @@ -269,7 +269,7 @@ get_ruleset (FT_Face face) if (pango_ot_info_find_script (info, PANGO_OT_TABLE_GPOS, script_tag, &script_index)) for (j = 0; j < G_N_ELEMENTS (gpos_features); j++) { - PangoOTTag feature_tag = FT_MAKE_TAG (gpos_features[j][0], gpos_features[j][1], + PangoOTTag feature_tag = FT_MAKE_TAG (gpos_features[j][0], gpos_features[j][1], gpos_features[j][2], gpos_features[j][3]); guint feature_index; @@ -283,18 +283,18 @@ get_ruleset (FT_Face face) if (pango_ot_info_find_script (info, PANGO_OT_TABLE_GSUB, script_tag, &script_index)) for (j = 0; j < G_N_ELEMENTS (gsub_features); j++) { - PangoOTTag feature_tag = FT_MAKE_TAG (gsub_features[j][0], gsub_features[j][1], + PangoOTTag feature_tag = FT_MAKE_TAG (gsub_features[j][0], gsub_features[j][1], gsub_features[j][2], gsub_features[j][3]); guint feature_index; /* 0xffff means default language */ - if (pango_ot_info_find_feature (info, PANGO_OT_TABLE_GSUB, feature_tag, + if (pango_ot_info_find_feature (info, PANGO_OT_TABLE_GSUB, feature_tag, script_index, 0xffff, &feature_index)) { pango_ot_ruleset_add_feature (ruleset, PANGO_OT_TABLE_GSUB, feature_index, 0xffff); } } - } + } g_object_set_qdata_full (G_OBJECT (info), ruleset_quark, ruleset, (GDestroyNotify) g_object_unref); } @@ -303,7 +303,7 @@ get_ruleset (FT_Face face) } -static void +static void basic_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, @@ -366,7 +366,7 @@ basic_engine_shape (PangoEngineShape *engine, if (pango_get_mirror_char (wc, &mirrored_ch)) { wc = mirrored_ch; - + g_unichar_to_utf8 (wc, buf); } @@ -377,7 +377,7 @@ basic_engine_shape (PangoEngineShape *engine, else { index = pango_fc_font_get_glyph (fc_font, wc); - + if (!index) { pango_ot_buffer_add_glyph (buffer, PANGO_GET_UNKNOWN_GLYPH ( wc), @@ -387,12 +387,12 @@ basic_engine_shape (PangoEngineShape *engine, { if (g_unichar_type (wc) != G_UNICODE_NON_SPACING_MARK) cluster = p - text; - + pango_ot_buffer_add_glyph (buffer, index, unknown_property, cluster); } } - + p = g_utf8_next_char (p); } @@ -400,7 +400,7 @@ basic_engine_shape (PangoEngineShape *engine, pango_ot_ruleset_substitute (ruleset, buffer); pango_ot_ruleset_position (ruleset, buffer); pango_ot_buffer_output (buffer, glyphs); - + pango_ot_buffer_destroy (buffer); out: @@ -416,18 +416,18 @@ basic_engine_fc_class_init (PangoEngineShapeClass *class) PANGO_ENGINE_SHAPE_DEFINE_TYPE (BasicEngineFc, basic_engine_fc, basic_engine_fc_class_init, NULL) -void +void PANGO_MODULE_ENTRY(init) (GTypeModule *module) { basic_engine_fc_register_type (module); } -void +void PANGO_MODULE_ENTRY(exit) (void) { } -void +void PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines, int *n_engines) { diff --git a/modules/basic/basic-win32.c b/modules/basic/basic-win32.c index 16cb6bed..c0729840 100644 --- a/modules/basic/basic-win32.c +++ b/modules/basic/basic-win32.c @@ -177,7 +177,7 @@ static PangoEngineInfo script_engines[] = { } }; -static PangoGlyph +static PangoGlyph find_char (PangoFont *font, gunichar wc) { @@ -194,7 +194,7 @@ set_glyph (PangoFont *font, PangoRectangle logical_rect; glyphs->glyphs[i].glyph = glyph; - + glyphs->glyphs[i].geometry.x_offset = 0; glyphs->glyphs[i].geometry.y_offset = 0; @@ -210,16 +210,16 @@ swap_range (PangoGlyphString *glyphs, int end) { int i, j; - + for (i = start, j = end - 1; i < j; i++, j--) { PangoGlyphInfo glyph_info; gint log_cluster; - + glyph_info = glyphs->glyphs[i]; glyphs->glyphs[i] = glyphs->glyphs[j]; glyphs->glyphs[j] = glyph_info; - + log_cluster = glyphs->log_clusters[i]; glyphs->log_clusters[i] = glyphs->log_clusters[j]; glyphs->log_clusters[j] = log_cluster; @@ -270,7 +270,7 @@ static char * lang_name (int lang) { static char unk[10]; - + switch (PRIMARYLANGID (lang)) { #define CASE(n) case LANG_##n: return #n @@ -699,7 +699,7 @@ convert_log_clusters_to_byte_offsets (const char *text, g_assert (glyphs->log_clusters[glyphix] < n_chars); glyphs->log_clusters[glyphix] = byte_offset[glyphs->log_clusters[glyphix]]; } - + g_free (byte_offset); } @@ -725,7 +725,7 @@ itemize_shape_and_place (PangoFont *font, control.uDefaultLanguage = make_langid (analysis->language); state.uBidiLevel = analysis->level; - + #ifdef BASIC_WIN32_DEBUGGING if (pango_win32_debug) g_print (G_STRLOC ": ScriptItemize: uDefaultLanguage:%04x uBidiLevel:%d\n", @@ -772,7 +772,7 @@ itemize_shape_and_place (PangoFont *font, memset (advances, 0, sizeof (advances)); memset (offsets, 0, sizeof (offsets)); memset (&abc, 0, sizeof (abc)); - + /* Note that itemlen is number of wchar_t's i.e. surrogate pairs * count as two! */ @@ -810,7 +810,7 @@ itemize_shape_and_place (PangoFont *font, #endif return FALSE; } - + #ifdef BASIC_WIN32_DEBUGGING dump_glyphs_and_log_clusters (items[item].a.fRTL, itemlen, items[item].iCharPos, log_clusters, @@ -819,7 +819,7 @@ itemize_shape_and_place (PangoFont *font, ng = glyphs->num_glyphs; pango_glyph_string_set_size (glyphs, ng + nglyphs); - + set_up_pango_log_clusters (wtext, items[item].a.fRTL, itemlen, log_clusters, nglyphs, glyphs->log_clusters + ng, @@ -904,7 +904,7 @@ uniscribe_shape (PangoFont *font, if (script_cache[i]) (*script_free_cache)(&script_cache[i]); } - + if (retval) { convert_log_clusters_to_byte_offsets (text, length, glyphs); @@ -952,10 +952,10 @@ text_is_simple (const char *text, return retval; } - + #endif /* HAVE_USP10_H */ -static void +static void basic_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, @@ -1000,7 +1000,7 @@ basic_engine_shape (PangoEngineShape *engine, if (wc == 0xa0) /* non-break-space */ wc = 0x20; - + if (pango_is_zero_width (wc)) { set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_EMPTY); @@ -1011,13 +1011,13 @@ basic_engine_shape (PangoEngineShape *engine, if (index) { set_glyph (font, glyphs, i, p - text, index); - + if (g_unichar_type (wc) == G_UNICODE_NON_SPACING_MARK) { if (i > 0) { PangoRectangle logical_rect, ink_rect; - + glyphs->glyphs[i].geometry.width = MAX (glyphs->glyphs[i-1].geometry.width, glyphs->glyphs[i].geometry.width); glyphs->glyphs[i-1].geometry.width = 0; @@ -1036,7 +1036,7 @@ basic_engine_shape (PangoEngineShape *engine, else set_glyph (font, glyphs, i, p - text, PANGO_GET_UNKNOWN_GLYPH (wc)); } - + p = g_utf8_next_char (p); } @@ -1048,7 +1048,7 @@ basic_engine_shape (PangoEngineShape *engine, /* Swap all glyphs */ swap_range (glyphs, 0, n_chars); - + /* Now reorder glyphs within each cluster back to LTR */ for (start = 0; start < n_chars;) { @@ -1056,7 +1056,7 @@ basic_engine_shape (PangoEngineShape *engine, while (end < n_chars && glyphs->log_clusters[end] == glyphs->log_clusters[start]) end++; - + swap_range (glyphs, start, end); start = end; } @@ -1070,7 +1070,7 @@ init_uniscribe (void) HMODULE usp10_dll; have_uniscribe = FALSE; - + if ((usp10_dll = LoadLibrary ("usp10.dll")) != NULL) { (script_get_properties = (pScriptGetProperties) @@ -1095,7 +1095,7 @@ init_uniscribe (void) hdc = pango_win32_get_dc (); } #endif -} +} static void basic_engine_win32_class_init (PangoEngineShapeClass *class) @@ -1106,7 +1106,7 @@ basic_engine_win32_class_init (PangoEngineShapeClass *class) PANGO_ENGINE_SHAPE_DEFINE_TYPE (BasicEngineWin32, basic_engine_win32, basic_engine_win32_class_init, NULL); -void +void PANGO_MODULE_ENTRY(init) (GTypeModule *module) { init_uniscribe (); @@ -1117,12 +1117,12 @@ PANGO_MODULE_ENTRY(init) (GTypeModule *module) basic_engine_win32_register_type (module); } -void +void PANGO_MODULE_ENTRY(exit) (void) { } -void +void PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines, int *n_engines) { diff --git a/modules/basic/basic-x.c b/modules/basic/basic-x.c index 70455a64..31784f97 100644 --- a/modules/basic/basic-x.c +++ b/modules/basic/basic-x.c @@ -70,7 +70,7 @@ struct _CharRange guint16 charsets; }; -struct _MaskTable +struct _MaskTable { int n_subfonts; @@ -78,7 +78,7 @@ struct _MaskTable Charset **charsets; }; -struct _CharCache +struct _CharCache { guint ref_count; CharsetOrdering *ordering; @@ -139,15 +139,15 @@ static PangoEngineInfo script_engines[] = { * PangoFont => CharCachePointer ===\ * | \ * CharCachePointer ======> CharCache => CharsetOrdering - * | |======> MaskTable[0] => {subfonts,charset}[n_subfonts], - * | |======> MaskTable[1] => {subfonts,charset}[n_subfonts], + * | |======> MaskTable[0] => {subfonts,charset}[n_subfonts], + * | |======> MaskTable[1] => {subfonts,charset}[n_subfonts], * | \======> MaskTable[...] => {subfonts,charset}[n_subfonts] * | * CharCachePointer ======> CharCache => CharsetOrdering - * |======> MaskTable[0] => {subfonts,charset}[n_subfonts], - * |======> MaskTable[1] => {subfonts,charset}[n_subfonts], + * |======> MaskTable[0] => {subfonts,charset}[n_subfonts], + * |======> MaskTable[1] => {subfonts,charset}[n_subfonts], * \======> MaskTable[...] => {subfonts,charset}[n_subfonts] - * + * * A CharCache structure caches the lookup of what subfonts can be used for what characters for a pair of a Font * and CharsetOrdering. Multiple language tags can share the same CharsetOrdering - the list of CharCachePointer * structures that is attached to the font as object data provides lookups from language tag to charcache. @@ -164,7 +164,7 @@ char_cache_new (CharsetOrdering *ordering) result->ordering = ordering; for (i=0; i<MAX_CHARSETS; i++) result->converters[i] = (GIConv)-1; - + return result; } @@ -178,18 +178,18 @@ char_cache_free (CharCache *cache) { g_free (cache->mask_tables[i]->subfonts); g_free (cache->mask_tables[i]->charsets); - + g_free (cache->mask_tables[i]); } for (i=0; i<MAX_CHARSETS; i++) if (cache->converters[i] != (GIConv)-1) g_iconv_close (cache->converters[i]); - + g_free (cache); } -static PangoGlyph +static PangoGlyph find_char (CharCache *cache, PangoFont *font, gunichar wc, const char *input) { int mask_index; @@ -205,7 +205,7 @@ find_char (CharCache *cache, PangoFont *font, gunichar wc, const char *input) return PANGO_GET_UNKNOWN_GLYPH (wc); break; } - + if (wc >= G_N_ELEMENTS (char_masks)) mask_index = 0; else @@ -231,16 +231,16 @@ find_char (CharCache *cache, PangoFont *font, gunichar wc, const char *input) for (i=0; i<(int)G_N_ELEMENTS(charsets); i++) { int charset_index = cache->ordering->charsets[i]; - + if (mask & (1 << charset_index)) { charset_names[n_charsets] = charsets[charset_index].x_charset; charsets_map[n_charsets] = &charsets[charset_index]; - + n_charsets++; } } - + mask_table->n_subfonts = pango_x_list_subfonts (font, (char**)charset_names, n_charsets, &mask_table->subfonts, &subfont_charsets); mask_table->charsets = g_new (Charset *, mask_table->n_subfonts); @@ -272,15 +272,15 @@ find_char (CharCache *cache, PangoFont *font, gunichar wc, const char *input) mask_table->charsets[i] = NULL; continue; } - - cache->converters[charset->index] = cd; + + cache->converters[charset->index] = cd; } - + index = (*charset->conv_func) (cache, cd, input); glyph = PANGO_X_MAKE_GLYPH (mask_table->subfonts[i], index); if (pango_x_has_glyph (font, glyph)) - return glyph; + return glyph; } } @@ -293,7 +293,7 @@ set_glyph (PangoFont *font, PangoGlyphString *glyphs, int i, int offset, PangoGl PangoRectangle logical_rect; glyphs->glyphs[i].glyph = glyph; - + glyphs->glyphs[i].geometry.x_offset = 0; glyphs->glyphs[i].geometry.y_offset = 0; @@ -309,14 +309,14 @@ conv_8bit (CharCache *cache, const char *input) { char outbuf; - + const char *inptr = input; size_t inbytesleft; char *outptr = &outbuf; size_t outbytesleft = 1; inbytesleft = g_utf8_next_char (input) - input; - + g_iconv (cd, (char **)&inptr, &inbytesleft, &outptr, &outbytesleft); return (guchar)outbuf; @@ -335,7 +335,7 @@ conv_eucjp (CharCache *cache, size_t outbytesleft = 4; inbytesleft = g_utf8_next_char (input) - input; - + g_iconv (cd, (char **)&inptr, &inbytesleft, &outptr, &outbytesleft); if ((guchar)outbuf[0] < 128) @@ -361,7 +361,7 @@ conv_16bit (CharCache *cache, size_t outbytesleft = 2; inbytesleft = g_utf8_next_char (input) - input; - + g_iconv (cd, (char **)&inptr, &inbytesleft, &outptr, &outbytesleft); if ((guchar)outbuf[0] < 128) @@ -383,7 +383,7 @@ conv_16bit_MSB_on (CharCache *cache, size_t outbytesleft = 2; inbytesleft = g_utf8_next_char (input) - input; - + g_iconv (cd, (char **)&inptr, &inbytesleft, &outptr, &outbytesleft); if ((guchar)outbuf[0] < 128) @@ -406,7 +406,7 @@ conv_gb18030_1 (CharCache *cache, inbytesleft = g_utf8_next_char (input) - input; - + g_iconv (cd, (char **)&inptr, &inbytesleft, &outptr, &outbytesleft); if ((guchar)outbuf[0] < 128) @@ -428,7 +428,7 @@ conv_euctw (CharCache *cache, size_t outbytesleft = 4; inbytesleft = g_utf8_next_char (input) - input; - + g_iconv (cd, (char **)&inptr, &inbytesleft, &outptr, &outbytesleft); /* The first two bytes determine which page of CNS to use; we @@ -452,16 +452,16 @@ static void swap_range (PangoGlyphString *glyphs, int start, int end) { int i, j; - + for (i = start, j = end - 1; i < j; i++, j--) { PangoGlyphInfo glyph_info; gint log_cluster; - + glyph_info = glyphs->glyphs[i]; glyphs->glyphs[i] = glyphs->glyphs[j]; glyphs->glyphs[j] = glyph_info; - + log_cluster = glyphs->log_clusters[i]; glyphs->log_clusters[i] = glyphs->log_clusters[j]; glyphs->log_clusters[j] = log_cluster; @@ -475,12 +475,12 @@ char_caches_free (GSList *caches) while (tmp_list) { CharCachePointer *pointer = tmp_list->data; - + pointer->cache->ref_count--; if (pointer->cache->ref_count == 0) char_cache_free (pointer->cache); g_free (pointer); - + tmp_list = tmp_list->next; } g_slist_free (caches); @@ -496,7 +496,7 @@ ordering_for_lang (PangoLanguage *lang) if (pango_language_matches (lang, charset_orderings[i].langs)) return &charset_orderings[i]; } - + return &charset_orderings[i]; } @@ -547,15 +547,15 @@ get_char_cache (PangoFont *font, pointer->cache = cache; caches = g_slist_prepend (caches, pointer); - + g_object_steal_qdata (G_OBJECT (font), cache_id); - g_object_set_qdata_full (G_OBJECT (font), cache_id, + g_object_set_qdata_full (G_OBJECT (font), cache_id, caches, (GDestroyNotify)char_caches_free); return cache; } -static void +static void basic_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, @@ -589,13 +589,13 @@ basic_engine_shape (PangoEngineShape *engine, const char *input; wc = g_utf8_get_char (p); - + input = p; if (analysis->level % 2) if (pango_get_mirror_char (wc, &mirrored_ch)) { wc = mirrored_ch; - + g_unichar_to_utf8 (wc, buf); input = buf; } @@ -603,11 +603,11 @@ basic_engine_shape (PangoEngineShape *engine, if (wc == 0xa0) /* non-break-space */ { wc = 0x20; - + g_unichar_to_utf8 (wc, buf); input = buf; } - + if (pango_is_zero_width (wc)) { set_glyph (font, glyphs, i, p - text, PANGO_GLYPH_EMPTY); @@ -618,13 +618,13 @@ basic_engine_shape (PangoEngineShape *engine, if (index) { set_glyph (font, glyphs, i, p - text, index); - + if (g_unichar_type (wc) == G_UNICODE_NON_SPACING_MARK) { if (i > 0) { PangoRectangle logical_rect, ink_rect; - + glyphs->glyphs[i].geometry.width = MAX (glyphs->glyphs[i-1].geometry.width, glyphs->glyphs[i].geometry.width); glyphs->glyphs[i-1].geometry.width = 0; @@ -642,7 +642,7 @@ basic_engine_shape (PangoEngineShape *engine, else set_glyph (font, glyphs, i, p - text, PANGO_GET_UNKNOWN_GLYPH (wc)); } - + p = g_utf8_next_char (p); } @@ -654,7 +654,7 @@ basic_engine_shape (PangoEngineShape *engine, /* Swap all glyphs */ swap_range (glyphs, 0, n_chars); - + /* Now reorder glyphs within each cluster back to LTR */ for (start=0; start<n_chars;) { @@ -662,7 +662,7 @@ basic_engine_shape (PangoEngineShape *engine, while (end < n_chars && glyphs->log_clusters[end] == glyphs->log_clusters[start]) end++; - + swap_range (glyphs, start, end); start = end; } @@ -693,18 +693,18 @@ basic_engine_x_class_init (PangoEngineShapeClass *class) PANGO_ENGINE_SHAPE_DEFINE_TYPE (BasicEngineX, basic_engine_x, basic_engine_x_class_init, NULL) -void +void PANGO_MODULE_ENTRY(init) (GTypeModule *module) { basic_engine_x_register_type (module); } -void +void PANGO_MODULE_ENTRY(exit) (void) { } -void +void PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines, int *n_engines) { |