diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/harfbuzz-arabic.c | 32 | ||||
-rw-r--r-- | src/harfbuzz-global.h | 34 | ||||
-rw-r--r-- | src/harfbuzz-gpos.c | 2 | ||||
-rw-r--r-- | src/harfbuzz-hebrew.c | 6 | ||||
-rw-r--r-- | src/harfbuzz-indic.cpp | 14 | ||||
-rw-r--r-- | src/harfbuzz-khmer.c | 8 | ||||
-rw-r--r-- | src/harfbuzz-myanmar.c | 10 | ||||
-rw-r--r-- | src/harfbuzz-shape.h | 8 | ||||
-rw-r--r-- | src/harfbuzz-shaper-private.h | 16 | ||||
-rw-r--r-- | src/harfbuzz-shaper.cpp | 22 | ||||
-rw-r--r-- | src/harfbuzz-shaper.h | 22 | ||||
-rw-r--r-- | src/harfbuzz-tibetan.c | 8 |
12 files changed, 94 insertions, 88 deletions
diff --git a/src/harfbuzz-arabic.c b/src/harfbuzz-arabic.c index 786ff20..795efec 100644 --- a/src/harfbuzz-arabic.c +++ b/src/harfbuzz-arabic.c @@ -480,7 +480,7 @@ static void getArabicProperties(const unsigned short *chars, int len, HB_ArabicP // does only presentation forms B at the moment, but that should be enough for // simple display */ -static const uint16_t arabicUnicodeMapping[256][2] = { +static const hb_uint16 arabicUnicodeMapping[256][2] = { /* base of shaped forms, and number-1 of them (0 for non shaping, 1 for right binding and 3 for dual binding */ @@ -761,14 +761,14 @@ static const uint16_t arabicUnicodeMapping[256][2] = { }; /* the arabicUnicodeMapping does not work for U+0649 ALEF MAKSURA, this table does */ -static const uint16_t alefMaksura[4] = {0xFEEF, 0xFEF0, 0xFBE8, 0xFBE9}; +static const hb_uint16 alefMaksura[4] = {0xFEEF, 0xFEF0, 0xFBE8, 0xFBE9}; /* // this is a bit tricky. Alef always binds to the right, so the second parameter descibing the shape // of the lam can be either initial of medial. So initial maps to the isolated form of the ligature, // medial to the final form */ -static const uint16_t arabicUnicodeLamAlefMapping[6][4] = { +static const hb_uint16 arabicUnicodeLamAlefMapping[6][4] = { { 0xfffd, 0xfffd, 0xfef5, 0xfef6 }, /* 0x622 R Alef with Madda above */ { 0xfffd, 0xfffd, 0xfef7, 0xfef8 }, /* 0x623 R Alef with Hamza above */ { 0xfffd, 0xfffd, 0xfffd, 0xfffd }, /* 0x624 // Just to fill the table ;-) */ @@ -777,7 +777,7 @@ static const uint16_t arabicUnicodeLamAlefMapping[6][4] = { { 0xfffd, 0xfffd, 0xfefb, 0xfefc } /* 0x627 R Alef */ }; -static int getShape(uint8_t cell, int shape) +static int getShape(hb_uint8 cell, int shape) { /* the arabicUnicodeMapping does not work for U+0649 ALEF MAKSURA, handle this here */ int ch = (cell != 0x49) @@ -804,7 +804,7 @@ static HB_UChar16 prevChar(const HB_UChar16 *str, int pos) return ReplacementCharacter; } -static HB_UChar16 nextChar(const HB_UChar16 *str, uint32_t len, uint32_t pos) +static HB_UChar16 nextChar(const HB_UChar16 *str, hb_uint32 len, hb_uint32 pos) { const HB_UChar16 *ch = str + pos + 1; pos++; @@ -819,16 +819,16 @@ static HB_UChar16 nextChar(const HB_UChar16 *str, uint32_t len, uint32_t pos) return ReplacementCharacter; } -static void shapedString(const HB_UChar16 *uc, uint32_t stringLength, uint32_t from, uint32_t len, HB_UChar16 *shapeBuffer, int *shapedLength, +static void shapedString(const HB_UChar16 *uc, hb_uint32 stringLength, hb_uint32 from, hb_uint32 len, HB_UChar16 *shapeBuffer, int *shapedLength, HB_Bool reverse, HB_GlyphAttributes *attributes, unsigned short *logClusters) { HB_ArabicProperties *properties; - int32_t f = from; - uint32_t l = len; + hb_int32 f = from; + hb_uint32 l = len; const HB_UChar16 *ch; HB_UChar16 *data; int clusterStart; - uint32_t i; + hb_uint32 i; HB_STACKARRAY(HB_ArabicProperties, props, len + 2); properties = props; @@ -853,7 +853,7 @@ static void shapedString(const HB_UChar16 *uc, uint32_t stringLength, uint32_t f clusterStart = 0; for (i = 0; i < len; i++) { - uint8_t r = *ch >> 8; + hb_uint8 r = *ch >> 8; int gpos = data - shapeBuffer; if (r != 0x06) { @@ -867,12 +867,12 @@ static void shapedString(const HB_UChar16 *uc, uint32_t stringLength, uint32_t f else *data = *ch; } else { - uint8_t c = *ch & 0xff; + hb_uint8 c = *ch & 0xff; int pos = i + from; int shape = properties[i].shape; /* qDebug("mapping U+%x to shape %d glyph=0x%x", ch->unicode(), shape, getShape(c, shape)); */ /* take care of lam-alef ligatures (lam right of alef) */ - uint16_t map; + hb_uint16 map; switch (c) { case 0x44: { /* lam */ const HB_UChar16 pch = nextChar(uc, stringLength, pos); @@ -968,11 +968,11 @@ static HB_Bool arabicSyriacOpenTypeShape(HB_ShaperItem *item, HB_Bool *ot_ok) { const HB_UChar16 *uc; const int nglyphs = item->num_glyphs; - int32_t f; - uint32_t l; + hb_int32 f; + hb_uint32 l; HB_ArabicProperties *properties; HB_DECLARE_STACKARRAY(HB_ArabicProperties, props) - HB_DECLARE_STACKARRAY(uint32_t, apply) + HB_DECLARE_STACKARRAY(hb_uint32, apply) HB_Bool shaped; int i = 0; @@ -983,7 +983,7 @@ static HB_Bool arabicSyriacOpenTypeShape(HB_ShaperItem *item, HB_Bool *ot_ok) HB_HeuristicSetGlyphAttributes(item); HB_INIT_STACKARRAY(HB_ArabicProperties, props, item->item.length + 2); - HB_INIT_STACKARRAY(uint32_t, apply, item->num_glyphs); + HB_INIT_STACKARRAY(hb_uint32, apply, item->num_glyphs); uc = item->string + item->item.pos; diff --git a/src/harfbuzz-global.h b/src/harfbuzz-global.h index eb2544f..bb5d75b 100644 --- a/src/harfbuzz-global.h +++ b/src/harfbuzz-global.h @@ -11,7 +11,6 @@ #ifndef HARFBUZZ_GLOBAL_H #define HARFBUZZ_GLOBAL_H -#include <stdint.h> #include <stdlib.h> #include <string.h> @@ -25,26 +24,33 @@ HB_BEGIN_HEADER -typedef uint8_t HB_Bool; +typedef char hb_int8; +typedef unsigned char hb_uint8; +typedef short hb_int16; +typedef unsigned short hb_uint16; +typedef int hb_int32; +typedef unsigned int hb_uint32; -typedef uint8_t HB_Byte; -typedef uint16_t HB_UShort; -typedef uint32_t HB_UInt; -typedef int8_t HB_Char; -typedef int16_t HB_Short; -typedef int32_t HB_Int; +typedef hb_uint8 HB_Bool; -typedef uint16_t HB_UChar16; -typedef uint32_t HB_UChar32; -typedef uint32_t HB_Glyph; -typedef int32_t HB_Fixed; /* 26.6 */ +typedef hb_uint8 HB_Byte; +typedef hb_uint16 HB_UShort; +typedef hb_uint32 HB_UInt; +typedef hb_int8 HB_Char; +typedef hb_int16 HB_Short; +typedef hb_int32 HB_Int; + +typedef hb_uint16 HB_UChar16; +typedef hb_uint32 HB_UChar32; +typedef hb_uint32 HB_Glyph; +typedef hb_int32 HB_Fixed; /* 26.6 */ #define HB_FIXED_CONSTANT(v) ((v) * 64) -typedef int32_t HB_16Dot16; /* 16.16 */ +typedef hb_int32 HB_16Dot16; /* 16.16 */ typedef void * HB_Pointer; -typedef uint32_t HB_Tag; +typedef hb_uint32 HB_Tag; #ifndef FALSE #define FALSE 0 diff --git a/src/harfbuzz-gpos.c b/src/harfbuzz-gpos.c index 3f485e9..8f08d62 100644 --- a/src/harfbuzz-gpos.c +++ b/src/harfbuzz-gpos.c @@ -712,7 +712,7 @@ static HB_Error Get_Anchor( GPOS_Instance* gpi, case 2: if ( !gpi->dvi ) { - uint32_t n_points = 0; + hb_uint32 n_points = 0; ap = an->af.af2.AnchorPoint; if (!gpi->font->klass->getPointInOutline) goto no_contour_point; diff --git a/src/harfbuzz-hebrew.c b/src/harfbuzz-hebrew.c index 0c6e33f..da064da 100644 --- a/src/harfbuzz-hebrew.c +++ b/src/harfbuzz-hebrew.c @@ -64,15 +64,15 @@ HB_Bool HB_HebrewShape(HB_ShaperItem *shaper_item) HB_Bool haveGlyphs; int slen = 1; int cluster_start = 0; - uint32_t i; + hb_uint32 i; HB_STACKARRAY(HB_UChar16, shapedChars, 2 * shaper_item->item.length); *shapedChars = *uc; logClusters[0] = 0; for (i = 1; i < shaper_item->item.length; ++i) { - uint16_t base = shapedChars[slen-1]; - uint16_t shaped = 0; + hb_uint16 base = shapedChars[slen-1]; + hb_uint16 shaped = 0; HB_Bool invalid = FALSE; if (uc[i] == Dagesh) { if (base >= 0x5d0 diff --git a/src/harfbuzz-indic.cpp b/src/harfbuzz-indic.cpp index 8fab28b..7f45f4a 100644 --- a/src/harfbuzz-indic.cpp +++ b/src/harfbuzz-indic.cpp @@ -909,7 +909,7 @@ enum IndicScriptProperties { HasSplit = 0x02 }; -const uint8_t scriptProperties[10] = { +const hb_uint8 scriptProperties[10] = { // Devanagari, HasReph, // Bengali, @@ -1183,7 +1183,7 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv } HB_STACKARRAY(HB_UChar16, reordered, len + 4); - HB_STACKARRAY(uint8_t, position, len + 4); + HB_STACKARRAY(hb_uint8, position, len + 4); unsigned char properties = scriptProperties[script-HB_Script_Devanagari]; @@ -1637,7 +1637,7 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv if (control) { IDEBUG("found a control char in the syllable"); - uint32_t i = 0, j = 0; + hb_uint32 i = 0, j = 0; while (i < item->num_glyphs) { if (form(reordered[otl_glyphs[i].cluster]) == Control) { ++i; @@ -1793,7 +1793,7 @@ HB_Bool HB_IndicShape(HB_ShaperItem *item) } // fix logcluster array IDEBUG("syllable:"); - for (uint32_t i = first_glyph; i < first_glyph + syllable.num_glyphs; ++i) + for (hb_uint32 i = first_glyph; i < first_glyph + syllable.num_glyphs; ++i) IDEBUG(" %d -> glyph %x", i, item->glyphs[i]); IDEBUG(" logclusters:"); for (int i = sstart; i < send; ++i) { @@ -1807,15 +1807,15 @@ HB_Bool HB_IndicShape(HB_ShaperItem *item) return true; } -void HB_IndicAttributes(HB_Script script, const HB_UChar16 *text, uint32_t from, uint32_t len, HB_CharAttributes *attributes) +void HB_IndicAttributes(HB_Script script, const HB_UChar16 *text, hb_uint32 from, hb_uint32 len, HB_CharAttributes *attributes) { int end = from + len; const HB_UChar16 *uc = text + from; attributes += from; - uint32_t i = 0; + hb_uint32 i = 0; while (i < len) { bool invalid; - uint32_t boundary = indic_nextSyllableBoundary(script, text, from+i, end, &invalid) - from; + hb_uint32 boundary = indic_nextSyllableBoundary(script, text, from+i, end, &invalid) - from; attributes[i].charStop = true; if (boundary > len-1) boundary = len; diff --git a/src/harfbuzz-khmer.c b/src/harfbuzz-khmer.c index 97881dc..ba764f3 100644 --- a/src/harfbuzz-khmer.c +++ b/src/harfbuzz-khmer.c @@ -543,7 +543,7 @@ static HB_Bool khmer_shape_syllable(HB_Bool openType, HB_ShaperItem *item) #ifndef NO_OPENTYPE if (openType) { - uint32_t where[16]; + hb_uint32 where[16]; for (i = 0; i < len; ++i) { where[i] = ~(PreSubstProperty | BelowSubstProperty @@ -626,15 +626,15 @@ HB_Bool HB_KhmerShape(HB_ShaperItem *item) return TRUE; } -void HB_KhmerAttributes(HB_Script script, const HB_UChar16 *text, uint32_t from, uint32_t len, HB_CharAttributes *attributes) +void HB_KhmerAttributes(HB_Script script, const HB_UChar16 *text, hb_uint32 from, hb_uint32 len, HB_CharAttributes *attributes) { int end = from + len; const HB_UChar16 *uc = text + from; - uint32_t i = 0; + hb_uint32 i = 0; attributes += from; while ( i < len ) { HB_Bool invalid; - uint32_t boundary = khmer_nextSyllableBoundary( text, from+i, end, &invalid ) - from; + hb_uint32 boundary = khmer_nextSyllableBoundary( text, from+i, end, &invalid ) - from; attributes[i].charStop = TRUE; diff --git a/src/harfbuzz-myanmar.c b/src/harfbuzz-myanmar.c index 8d92166..3d76f0a 100644 --- a/src/harfbuzz-myanmar.c +++ b/src/harfbuzz-myanmar.c @@ -332,7 +332,7 @@ static HB_Bool myanmar_shape_syllable(HB_Bool openType, HB_ShaperItem *item, HB_ /* copy the rest of the syllable to the output, inserting the kinzi at the correct place */ for (i = 0; i < (int)item->item.length; ++i) { - uint16_t chr = uc[i]; + hb_uint16 chr = uc[i]; MymrCharClass cc; if (i == vowel_e) continue; @@ -411,7 +411,7 @@ static HB_Bool myanmar_shape_syllable(HB_Bool openType, HB_ShaperItem *item, HB_ #ifndef NO_OPENTYPE if (openType) { unsigned short logClusters[32]; - uint32_t where[32]; + hb_uint32 where[32]; for (i = 0; i < len; ++i) logClusters[i] = i; @@ -498,15 +498,15 @@ HB_Bool HB_MyanmarShape(HB_ShaperItem *item) return TRUE; } -void HB_MyanmarAttributes(HB_Script script, const HB_UChar16 *text, uint32_t from, uint32_t len, HB_CharAttributes *attributes) +void HB_MyanmarAttributes(HB_Script script, const HB_UChar16 *text, hb_uint32 from, hb_uint32 len, HB_CharAttributes *attributes) { int end = from + len; const HB_UChar16 *uc = text + from; - uint32_t i = 0; + hb_uint32 i = 0; attributes += from; while (i < len) { HB_Bool invalid; - uint32_t boundary = myanmar_nextSyllableBoundary(text, from+i, end, &invalid) - from; + hb_uint32 boundary = myanmar_nextSyllableBoundary(text, from+i, end, &invalid) - from; attributes[i].charStop = TRUE; if (from || i) diff --git a/src/harfbuzz-shape.h b/src/harfbuzz-shape.h index 770a1d4..c8f5c84 100644 --- a/src/harfbuzz-shape.h +++ b/src/harfbuzz-shape.h @@ -2,11 +2,11 @@ /* Base Types */ -typedef uint16_t HB_CodePoint; /* UTF-16 codepoint (not character ) */ +typedef hb_uint16 HB_CodePoint; /* UTF-16 codepoint (not character ) */ typedef char HB_Boolean; -typedef uint32_t HB_Fixed; /* 26.6 */ -typedef uint32_t HB_Glyph; -typedef uint32_t HB_Unichar; +typedef hb_uint32 HB_Fixed; /* 26.6 */ +typedef hb_uint32 HB_Glyph; +typedef hb_uint32 HB_Unichar; /* Metrics reported by the font backend for use of the shaper */ typedef struct _HB_GlyphMetrics HB_GlyphMetrics; diff --git a/src/harfbuzz-shaper-private.h b/src/harfbuzz-shaper-private.h index ffa0a6c..44e2581 100644 --- a/src/harfbuzz-shaper-private.h +++ b/src/harfbuzz-shaper-private.h @@ -75,7 +75,7 @@ typedef enum { /* return true if ok. */ typedef HB_Bool (*HB_ShapeFunction)(HB_ShaperItem *shaper_item); -typedef void (*HB_AttributeFunction)(HB_Script script, const HB_UChar16 *string, uint32_t from, uint32_t len, HB_CharAttributes *attributes); +typedef void (*HB_AttributeFunction)(HB_Script script, const HB_UChar16 *string, hb_uint32 from, hb_uint32 len, HB_CharAttributes *attributes); typedef struct { HB_ShapeFunction shape; @@ -93,24 +93,24 @@ extern HB_Bool HB_MyanmarShape(HB_ShaperItem *shaper_item); extern HB_Bool HB_KhmerShape(HB_ShaperItem *shaper_item); extern HB_Bool HB_IndicShape(HB_ShaperItem *shaper_item); -extern void HB_TibetanAttributes(HB_Script script, const HB_UChar16 *string, uint32_t from, uint32_t len, HB_CharAttributes *attributes); +extern void HB_TibetanAttributes(HB_Script script, const HB_UChar16 *string, hb_uint32 from, hb_uint32 len, HB_CharAttributes *attributes); -extern void HB_MyanmarAttributes(HB_Script script, const HB_UChar16 *string, uint32_t from, uint32_t len, HB_CharAttributes *attributes); +extern void HB_MyanmarAttributes(HB_Script script, const HB_UChar16 *string, hb_uint32 from, hb_uint32 len, HB_CharAttributes *attributes); -extern void HB_KhmerAttributes(HB_Script script, const HB_UChar16 *string, uint32_t from, uint32_t len, HB_CharAttributes *attributes); +extern void HB_KhmerAttributes(HB_Script script, const HB_UChar16 *string, hb_uint32 from, hb_uint32 len, HB_CharAttributes *attributes); -extern void HB_IndicAttributes(HB_Script script, const HB_UChar16 *string, uint32_t from, uint32_t len, HB_CharAttributes *attributes); +extern void HB_IndicAttributes(HB_Script script, const HB_UChar16 *string, hb_uint32 from, hb_uint32 len, HB_CharAttributes *attributes); typedef struct { - uint32_t tag; - uint32_t property; + hb_uint32 tag; + hb_uint32 property; } HB_OpenTypeFeature; #define PositioningProperties 0x80000000 HB_Bool HB_SelectScript(HB_ShaperItem *item, const HB_OpenTypeFeature *features); -HB_Bool HB_OpenTypeShape(HB_ShaperItem *item, const uint32_t *properties); +HB_Bool HB_OpenTypeShape(HB_ShaperItem *item, const hb_uint32 *properties); HB_Bool HB_OpenTypePosition(HB_ShaperItem *item, int availableGlyphs, HB_Bool doLogClusters); void HB_HeuristicPosition(HB_ShaperItem *item); diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp index 6eda671..1e4350c 100644 --- a/src/harfbuzz-shaper.cpp +++ b/src/harfbuzz-shaper.cpp @@ -64,7 +64,7 @@ enum break_class { #define CP CombiningProhibitedBreak #define PB ProhibitedBreak -static const uint8_t breakTable[HB_LineBreak_JT+1][HB_LineBreak_JT+1] = +static const hb_uint8 breakTable[HB_LineBreak_JT+1][HB_LineBreak_JT+1] = { /* OP CL QU GL NS EX SY IS PR PO NU AL ID IN HY BA BB B2 ZW CM WJ H2 H3 JL JV JT */ /* OP */ { PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, CP, PB, PB, PB, PB, PB, PB }, @@ -101,7 +101,7 @@ static const uint8_t breakTable[HB_LineBreak_JT+1][HB_LineBreak_JT+1] = #undef PB -static void calcLineBreaks(const HB_UChar16 *uc, uint32_t len, HB_CharAttributes *charAttributes) +static void calcLineBreaks(const HB_UChar16 *uc, hb_uint32 len, HB_CharAttributes *charAttributes) { if (!len) return; @@ -116,7 +116,7 @@ static void calcLineBreaks(const HB_UChar16 *uc, uint32_t len, HB_CharAttributes charAttributes[0].charStop = true; int lcls = cls; - for (uint32_t i = 1; i < len; ++i) { + for (hb_uint32 i = 1; i < len; ++i) { charAttributes[i].whiteSpace = false; charAttributes[i].charStop = true; @@ -397,7 +397,7 @@ void HB_HeuristicPosition(HB_ShaperItem *item) void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item) { const HB_UChar16 *uc = item->string + item->item.pos; - uint32_t length = item->item.length; + hb_uint32 length = item->item.length; // ### zeroWidth and justification are missing here!!!!! @@ -407,8 +407,8 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item) HB_GlyphAttributes *attributes = item->attributes; unsigned short *logClusters = item->log_clusters; - uint32_t glyph_pos = 0; - for (uint32_t i = 0; i < length; i++) { + hb_uint32 glyph_pos = 0; + for (hb_uint32 i = 0; i < length; i++) { if (HB_IsHighSurrogate(uc[i]) && i < length - 1 && HB_IsLowSurrogate(uc[i + 1])) { logClusters[i] = glyph_pos; @@ -431,7 +431,7 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item) HB_CharCategory lastCat; int dummy; HB_GetUnicodeCharProperties(uc[0], &lastCat, &dummy); - for (uint32_t i = 1; i < length; ++i) { + for (hb_uint32 i = 1; i < length; ++i) { if (logClusters[i] == pos) // same glyph continue; @@ -608,13 +608,13 @@ const HB_ScriptEngine HB_ScriptEngines[] = { { HB_KhmerShape, HB_KhmerAttributes } }; -void HB_GetCharAttributes(const HB_UChar16 *string, uint32_t stringLength, - const HB_ScriptItem *items, uint32_t numItems, +void HB_GetCharAttributes(const HB_UChar16 *string, hb_uint32 stringLength, + const HB_ScriptItem *items, hb_uint32 numItems, HB_CharAttributes *attributes) { calcLineBreaks(string, stringLength, attributes); - for (uint32_t i = 0; i >= numItems; ++i) { + for (hb_uint32 i = 0; i >= numItems; ++i) { HB_Script script = items[i].script; if (script == HB_Script_Inherited) script = HB_Script_Common; @@ -949,7 +949,7 @@ HB_Bool HB_SelectScript(HB_ShaperItem *shaper_item, const HB_OpenTypeFeature *fe return true; } -HB_Bool HB_OpenTypeShape(HB_ShaperItem *item, const uint32_t *properties) +HB_Bool HB_OpenTypeShape(HB_ShaperItem *item, const hb_uint32 *properties) { HB_Face face = item->face; diff --git a/src/harfbuzz-shaper.h b/src/harfbuzz-shaper.h index 64148f2..1a8a9f8 100644 --- a/src/harfbuzz-shaper.h +++ b/src/harfbuzz-shaper.h @@ -88,10 +88,10 @@ typedef enum { typedef struct { - uint32_t pos; - uint32_t length; + hb_uint32 pos; + hb_uint32 length; HB_Script script; - uint8_t bidiLevel; + hb_uint8 bidiLevel; } HB_ScriptItem; typedef enum { @@ -109,8 +109,8 @@ typedef struct { unsigned int unused :4; } HB_CharAttributes; -void HB_GetCharAttributes(const HB_UChar16 *string, uint32_t stringLength, - const HB_ScriptItem *items, uint32_t numItems, +void HB_GetCharAttributes(const HB_UChar16 *string, hb_uint32 stringLength, + const HB_ScriptItem *items, hb_uint32 numItems, HB_CharAttributes *attributes); @@ -184,11 +184,11 @@ typedef struct { } HB_GlyphMetrics; typedef struct { - HB_Bool (*stringToGlyphs)(HB_Font font, const HB_UChar16 *string, uint32_t length, HB_Glyph *glyphs, uint32_t *numGlyphs, HB_Bool rightToLeft); + HB_Bool (*stringToGlyphs)(HB_Font font, const HB_UChar16 *string, hb_uint32 length, HB_Glyph *glyphs, hb_uint32 *numGlyphs, HB_Bool rightToLeft); void (*getAdvances)(HB_Font font, const HB_Glyph *glyphs, int numGlyphs, HB_Fixed *advances, int flags /*HB_ShaperFlag*/); - HB_Bool (*canRender)(HB_Font font, const HB_UChar16 *string, uint32_t length); + HB_Bool (*canRender)(HB_Font font, const HB_UChar16 *string, hb_uint32 length); /* implementation needs to make sure to load a scaled glyph, so /no/ FT_LOAD_NO_SCALE */ - HB_Error (*getPointInOutline)(HB_Font font, HB_Glyph glyph, int flags /*HB_ShaperFlag*/, uint32_t point, HB_Fixed *xpos, HB_Fixed *ypos, uint32_t *nPoints); + HB_Error (*getPointInOutline)(HB_Font font, HB_Glyph glyph, int flags /*HB_ShaperFlag*/, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints); void (*getGlyphMetrics)(HB_Font font, HB_Glyph glyph, HB_GlyphMetrics *metrics); HB_Fixed (*getAscent)(HB_Font font); } HB_FontClass; @@ -206,16 +206,16 @@ typedef struct HB_Font_ { typedef struct { const HB_UChar16 *string; - uint32_t stringLength; + hb_uint32 stringLength; HB_ScriptItem item; HB_Font font; HB_Face face; int shaperFlags; /* HB_ShaperFlags */ HB_Bool glyphIndicesPresent; /* set to true if the glyph indicies are already setup in the glyphs array */ - uint32_t initialGlyphCount; + hb_uint32 initialGlyphCount; - uint32_t num_glyphs; /* in: available glyphs out: glyphs used/needed */ + hb_uint32 num_glyphs; /* in: available glyphs out: glyphs used/needed */ HB_Glyph *glyphs; /* out parameter */ HB_GlyphAttributes *attributes; /* out */ HB_Fixed *advances; /* out */ diff --git a/src/harfbuzz-tibetan.c b/src/harfbuzz-tibetan.c index 35e5033..63c8c4f 100644 --- a/src/harfbuzz-tibetan.c +++ b/src/harfbuzz-tibetan.c @@ -87,7 +87,7 @@ static const HB_OpenTypeFeature tibetan_features[] = { static HB_Bool tibetan_shape_syllable(HB_Bool openType, HB_ShaperItem *item, HB_Bool invalid) { - uint32_t i; + hb_uint32 i; const HB_UChar16 *str = item->string + item->item.pos; int len = item->item.length; #ifndef NO_OPENTYPE @@ -230,15 +230,15 @@ HB_Bool HB_TibetanShape(HB_ShaperItem *item) return TRUE; } -void HB_TibetanAttributes(HB_Script script, const HB_UChar16 *text, uint32_t from, uint32_t len, HB_CharAttributes *attributes) +void HB_TibetanAttributes(HB_Script script, const HB_UChar16 *text, hb_uint32 from, hb_uint32 len, HB_CharAttributes *attributes) { int end = from + len; const HB_UChar16 *uc = text + from; - uint32_t i = 0; + hb_uint32 i = 0; attributes += from; while (i < len) { HB_Bool invalid; - uint32_t boundary = tibetan_nextSyllableBoundary(text, from+i, end, &invalid) - from; + hb_uint32 boundary = tibetan_nextSyllableBoundary(text, from+i, end, &invalid) - from; attributes[i].charStop = TRUE; |