From 3cd573fc1fb67db75cd356cad3e901d24af1ce8a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 20 Nov 2013 18:44:59 +0900 Subject: [PATCH] Bug 71287 - size specific design selection support in OS/2 table version 5 This feature requires the FreeType 2.5.1 or later at the build time. Besides element allows elements with this changes. This may breaks the cache but not bumping in this change sets at this moment. please be aware if you want to try it and run fc-cache before/after to avoid the weird thing against it. --- configure.ac | 4 + fontconfig/fcprivate.h | 3 + fontconfig/fontconfig.h | 28 ++++++- src/Makefile.am | 1 + src/fccfg.c | 48 +++++++---- src/fcdbg.c | 13 ++- src/fcdefault.c | 47 ++++++----- src/fcfreetype.c | 38 +++++++++ src/fcint.h | 85 ++++++++++++++++---- src/fclist.c | 2 + src/fcmatch.c | 45 +++++++++++ src/fcname.c | 49 +++++++++++- src/fcobjs.h | 2 +- src/fcpat.c | 73 +++++++++++++++++ src/fcrange.c | 207 ++++++++++++++++++++++++++++++++++++++++++++++++ src/fcxml.c | 108 +++++++++++++++++++------ 16 files changed, 663 insertions(+), 90 deletions(-) create mode 100644 src/fcrange.c diff --git a/configure.ac b/configure.ac index 1086a9a..80875df 100644 --- a/configure.ac +++ b/configure.ac @@ -321,6 +321,10 @@ AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem, #include FT_FREETYPE_H]) AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,$HAVE_FT_BITMAP_SIZE_Y_PPEM, [FT_Bitmap_Size structure includes y_ppem field]) +AC_CHECK_MEMBERS([TT_OS2.usLowerOpticalPointSize, TT_OS2.usUpperOpticalPointSize], [], [], [[ +#include +#include FT_FREETYPE_H +#include FT_TRUETYPE_TABLES_H]]) CFLAGS="$fontconfig_save_cflags" LIBS="$fontconfig_save_libs" diff --git a/fontconfig/fcprivate.h b/fontconfig/fcprivate.h index 210c1d8..a6ee5c2 100644 --- a/fontconfig/fcprivate.h +++ b/fontconfig/fcprivate.h @@ -77,6 +77,9 @@ case FcTypeLangSet: \ __v__.u.l = va_arg (va, const FcLangSet *); \ break; \ + case FcTypeRange: \ + __v__.u.r = va_arg (va, const FcRange *); \ + break; \ } \ if (!FcPatternAdd (__p__, __o__, __v__, FcTrue)) \ goto _FcPatternVapBuild_bail1; \ diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h index 2258251..069cb60 100644 --- a/fontconfig/fontconfig.h +++ b/fontconfig/fontconfig.h @@ -75,7 +75,7 @@ typedef int FcBool; #define FC_STYLE "style" /* String */ #define FC_SLANT "slant" /* Int */ #define FC_WEIGHT "weight" /* Int */ -#define FC_SIZE "size" /* Double */ +#define FC_SIZE "size" /* Range (double) */ #define FC_ASPECT "aspect" /* Double */ #define FC_PIXEL_SIZE "pixelsize" /* Double */ #define FC_SPACING "spacing" /* Int */ @@ -194,7 +194,8 @@ typedef enum _FcType { FcTypeMatrix, FcTypeCharSet, FcTypeFTFace, - FcTypeLangSet + FcTypeLangSet, + FcTypeRange } FcType; typedef struct _FcMatrix { @@ -231,6 +232,8 @@ typedef struct _FcPattern FcPattern; typedef struct _FcLangSet FcLangSet; +typedef struct _FcRange FcRange; + typedef struct _FcValue { FcType type; union { @@ -242,6 +245,7 @@ typedef struct _FcValue { const FcCharSet *c; void *f; const FcLangSet *l; + const FcRange *r; } u; } FcValue; @@ -853,6 +857,9 @@ FcPatternAddBool (FcPattern *p, const char *object, FcBool b); FcPublic FcBool FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls); +FcPublic FcBool +FcPatternAddRange (FcPattern *p, const char *object, const FcRange *r); + FcPublic FcResult FcPatternGetInteger (const FcPattern *p, const char *object, int n, int *i); @@ -874,6 +881,9 @@ FcPatternGetBool (const FcPattern *p, const char *object, int n, FcBool *b); FcPublic FcResult FcPatternGetLangSet (const FcPattern *p, const char *object, int n, FcLangSet **ls); +FcPublic FcResult +FcPatternGetRange (const FcPattern *p, const char *object, int id, FcRange **r); + FcPublic FcPattern * FcPatternVaBuild (FcPattern *p, va_list va); @@ -883,6 +893,20 @@ FcPatternBuild (FcPattern *p, ...) FC_ATTRIBUTE_SENTINEL(0); FcPublic FcChar8 * FcPatternFormat (FcPattern *pat, const FcChar8 *format); +/* fcrange.c */ +FcPublic FcRange * +FcRangeCreateDouble (double begin, double end); + +FcPublic FcRange * +FcRangeCreateInteger (FcChar32 begin, FcChar32 end); + +FcPublic void +FcRangeDestroy (FcRange *range); + +FcPublic FcRange * +FcRangeCopy (const FcRange *r); + + /* fcstr.c */ FcPublic FcChar8 * diff --git a/src/Makefile.am b/src/Makefile.am index 066cc03..be20eba 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -151,6 +151,7 @@ libfontconfig_la_SOURCES = \ fcobjs.h \ fcobjshash.h \ fcpat.c \ + fcrange.c \ fcserialize.c \ fcstat.c \ fcstr.c \ diff --git a/src/fccfg.c b/src/fccfg.c index 6377fd7..cdb8c0f 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -722,6 +722,11 @@ FcConfigPromote (FcValue v, FcValue u, FcValuePromotionBuffer *buf) v.u.l = FcLangSetPromote (v.u.s, buf); v.type = FcTypeLangSet; } + if (buf && v.type == FcTypeDouble && u.type == FcTypeRange) + { + v.u.r = FcRangePromote (v.u.d, buf); + v.type = FcTypeRange; + } return v; } @@ -894,6 +899,9 @@ FcConfigCompareValue (const FcValue *left_o, break; } break; + case FcTypeRange: + ret = FcRangeCompare (op, left.u.r, right.u.r); + break; } } else @@ -915,10 +923,11 @@ FcConfigCompareValue (const FcValue *left_o, static FcValue FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e) { - FcValue v, vl, vr; + FcValue v, vl, vr, vle, vre; FcMatrix *m; FcChar8 *str; FcOp op = FC_OP_GET_OP (e->op); + FcValuePromotionBuffer buf1, buf2; switch ((int) op) { case FcOpInteger: @@ -967,6 +976,11 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e) v.u.l = e->u.lval; v = FcValueSave (v); break; + case FcOpRange: + v.type = FcTypeRange; + v.u.r = e->u.rval; + v = FcValueSave (v); + break; case FcOpBool: v.type = FcTypeBool; v.u.b = e->u.bval; @@ -1033,28 +1047,28 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e) case FcOpDivide: vl = FcConfigEvaluate (p, p_pat, kind, e->u.tree.left); vr = FcConfigEvaluate (p, p_pat, kind, e->u.tree.right); - vl = FcConfigPromote (vl, vr, NULL); - vr = FcConfigPromote (vr, vl, NULL); - if (vl.type == vr.type) + vle = FcConfigPromote (vl, vr, &buf1); + vre = FcConfigPromote (vr, vle, &buf2); + if (vle.type == vre.type) { - switch ((int) vl.type) { + switch ((int) vle.type) { case FcTypeDouble: switch ((int) op) { case FcOpPlus: v.type = FcTypeDouble; - v.u.d = vl.u.d + vr.u.d; + v.u.d = vle.u.d + vre.u.d; break; case FcOpMinus: v.type = FcTypeDouble; - v.u.d = vl.u.d - vr.u.d; + v.u.d = vle.u.d - vre.u.d; break; case FcOpTimes: v.type = FcTypeDouble; - v.u.d = vl.u.d * vr.u.d; + v.u.d = vle.u.d * vre.u.d; break; case FcOpDivide: v.type = FcTypeDouble; - v.u.d = vl.u.d / vr.u.d; + v.u.d = vle.u.d / vre.u.d; break; default: v.type = FcTypeVoid; @@ -1071,11 +1085,11 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e) switch ((int) op) { case FcOpOr: v.type = FcTypeBool; - v.u.b = vl.u.b || vr.u.b; + v.u.b = vle.u.b || vre.u.b; break; case FcOpAnd: v.type = FcTypeBool; - v.u.b = vl.u.b && vr.u.b; + v.u.b = vle.u.b && vre.u.b; break; default: v.type = FcTypeVoid; @@ -1086,7 +1100,7 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e) switch ((int) op) { case FcOpPlus: v.type = FcTypeString; - str = FcStrPlus (vl.u.s, vr.u.s); + str = FcStrPlus (vle.u.s, vre.u.s); v.u.s = FcStrdup (str); FcStrFree (str); @@ -1105,7 +1119,7 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e) m = malloc (sizeof (FcMatrix)); if (m) { - FcMatrixMultiply (m, vl.u.m, vr.u.m); + FcMatrixMultiply (m, vle.u.m, vre.u.m); v.u.m = m; } else @@ -1122,13 +1136,13 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e) switch ((int) op) { case FcOpPlus: v.type = FcTypeCharSet; - v.u.c = FcCharSetUnion (vl.u.c, vr.u.c); + v.u.c = FcCharSetUnion (vle.u.c, vre.u.c); if (!v.u.c) v.type = FcTypeVoid; break; case FcOpMinus: v.type = FcTypeCharSet; - v.u.c = FcCharSetSubtract (vl.u.c, vr.u.c); + v.u.c = FcCharSetSubtract (vle.u.c, vre.u.c); if (!v.u.c) v.type = FcTypeVoid; break; @@ -1141,13 +1155,13 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e) switch ((int) op) { case FcOpPlus: v.type = FcTypeLangSet; - v.u.l = FcLangSetUnion (vl.u.l, vr.u.l); + v.u.l = FcLangSetUnion (vle.u.l, vre.u.l); if (!v.u.l) v.type = FcTypeVoid; break; case FcOpMinus: v.type = FcTypeLangSet; - v.u.l = FcLangSetSubtract (vl.u.l, vr.u.l); + v.u.l = FcLangSetSubtract (vle.u.l, vre.u.l); if (!v.u.l) v.type = FcTypeVoid; break; diff --git a/src/fcdbg.c b/src/fcdbg.c index d74bc27..ef038f0 100644 --- a/src/fcdbg.c +++ b/src/fcdbg.c @@ -29,6 +29,8 @@ static void _FcValuePrintFile (FILE *f, const FcValue v) { + FcRange r; + switch (v.type) { case FcTypeUnknown: fprintf (f, ""); @@ -61,6 +63,10 @@ _FcValuePrintFile (FILE *f, const FcValue v) case FcTypeFTFace: fprintf (f, "face"); break; + case FcTypeRange: + r = FcRangeCanonicalize (v.u.r); + fprintf (f, "(%g, %g)", r.u.d.begin, r.u.d.end); + break; } } @@ -261,6 +267,8 @@ FcOpPrint (FcOp op_) void FcExprPrint (const FcExpr *expr) { + FcRange r; + if (!expr) printf ("none"); else switch (FC_OP_GET_OP (expr->op)) { case FcOpInteger: printf ("%d", expr->u.ival); break; @@ -277,7 +285,10 @@ FcExprPrint (const FcExpr *expr) FcExprPrint (expr->u.mexpr->yy); printf ("]"); break; - case FcOpRange: break; + case FcOpRange: + r = FcRangeCanonicalize (expr->u.rval); + printf ("(%g, %g)", r.u.d.begin, r.u.d.end); + break; case FcOpBool: printf ("%s", expr->u.bval ? "true" : "false"); break; case FcOpCharSet: printf ("charset\n"); break; case FcOpLangSet: diff --git a/src/fcdefault.c b/src/fcdefault.c index 4beda7c..7c16f48 100644 --- a/src/fcdefault.c +++ b/src/fcdefault.c @@ -219,6 +219,7 @@ FcDefaultSubstitute (FcPattern *pattern) { FcValue v, namelang, v2; int i; + double dpi, size, scale, pixelsize; if (FcPatternObjectGet (pattern, FC_WEIGHT_OBJECT, 0, &v) == FcResultNoMatch ) FcPatternObjectAddInteger (pattern, FC_WEIGHT_OBJECT, FC_WEIGHT_NORMAL); @@ -233,32 +234,30 @@ FcDefaultSubstitute (FcPattern *pattern) if (FcPatternObjectGet (pattern, FcBoolDefaults[i].field, 0, &v) == FcResultNoMatch) FcPatternObjectAddBool (pattern, FcBoolDefaults[i].field, FcBoolDefaults[i].value); - if (FcPatternObjectGet (pattern, FC_PIXEL_SIZE_OBJECT, 0, &v) == FcResultNoMatch) - { - double dpi, size, scale; + if (FcPatternObjectGetDouble (pattern, FC_SIZE_OBJECT, 0, &size) != FcResultMatch) + size = 12.0L; + if (FcPatternObjectGetDouble (pattern, FC_SCALE_OBJECT, 0, &scale) != FcResultMatch) + scale = 1.0; + if (FcPatternObjectGetDouble (pattern, FC_DPI_OBJECT, 0, &dpi) != FcResultMatch) + dpi = 75.0; - if (FcPatternObjectGetDouble (pattern, FC_SIZE_OBJECT, 0, &size) != FcResultMatch) - { - size = 12.0; - (void) FcPatternObjectDel (pattern, FC_SIZE_OBJECT); - FcPatternObjectAddDouble (pattern, FC_SIZE_OBJECT, size); - } - if (FcPatternObjectGetDouble (pattern, FC_SCALE_OBJECT, 0, &scale) != FcResultMatch) - { - scale = 1.0; - (void) FcPatternObjectDel (pattern, FC_SCALE_OBJECT); - FcPatternObjectAddDouble (pattern, FC_SCALE_OBJECT, scale); - } - size *= scale; - if (FcPatternObjectGetDouble (pattern, FC_DPI_OBJECT, 0, &dpi) != FcResultMatch) - { - dpi = 75.0; - (void) FcPatternObjectDel (pattern, FC_DPI_OBJECT); - FcPatternObjectAddDouble (pattern, FC_DPI_OBJECT, dpi); - } - size *= dpi / 72.0; - FcPatternObjectAddDouble (pattern, FC_PIXEL_SIZE_OBJECT, size); + if (FcPatternObjectGet (pattern, FC_PIXEL_SIZE_OBJECT, 0, &v) != FcResultMatch) + { + (void) FcPatternObjectDel (pattern, FC_SCALE_OBJECT); + FcPatternObjectAddDouble (pattern, FC_SCALE_OBJECT, scale); + pixelsize = size * scale; + (void) FcPatternObjectDel (pattern, FC_DPI_OBJECT); + FcPatternObjectAddDouble (pattern, FC_DPI_OBJECT, dpi); + pixelsize *= dpi / 72.0; + FcPatternObjectAddDouble (pattern, FC_PIXEL_SIZE_OBJECT, pixelsize); + } + else + { + size = v.u.d; + size = size / dpi * 72.0 / scale; } + (void) FcPatternObjectDel (pattern, FC_SIZE_OBJECT); + FcPatternObjectAddDouble (pattern, FC_SIZE_OBJECT, size); if (FcPatternObjectGet (pattern, FC_FONTVERSION_OBJECT, 0, &v) == FcResultNoMatch) { diff --git a/src/fcfreetype.c b/src/fcfreetype.c index d271d69..53f0c91 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1107,6 +1107,11 @@ FcFreeTypeQueryFace (const FT_Face face, FcChar8 *hashstr = NULL; FT_Error err; FT_ULong len = 0, alen; + FcRange *r = NULL; +#if defined (HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE) && defined (HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE) + double lower_size = 0.0L, upper_size = DBL_MAX; +#endif + pat = FcPatternCreate (); if (!pat) @@ -1514,6 +1519,39 @@ FcFreeTypeQueryFace (const FT_Face face, free (complex_); } +#if defined (HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE) && defined (HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE) + if (os2 && os2->version >= 0x0005 && os2->version != 0xffff) + { + /* usLowerPointSize and usUpperPointSize is actually twips */ + lower_size = os2->usLowerOpticalPointSize / 20.0L; + upper_size = os2->usUpperOpticalPointSize / 20.0L; + } +#endif + if (os2) + { + r = FcRangeCreateDouble (lower_size, upper_size); + if (!FcPatternAddRange (pat, FC_SIZE, r)) + { + FcRangeDestroy (r); + goto bail1; + } + FcRangeDestroy (r); + } + else + { + for (i = 0; i < face->num_fixed_sizes; i++) + { + double d = FcGetPixelSize (face, i); + r = FcRangeCreateDouble (d, d); + if (!FcPatternAddRange (pat, FC_SIZE, r)) + { + FcRangeDestroy (r); + goto bail1; + } + FcRangeDestroy (r); + } + } + /* * Type 1: Check for FontInfo dictionary information * Code from g2@magestudios.net (Gerard Escalante) diff --git a/src/fcint.h b/src/fcint.h index cdf2dab..dd26fd8 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -38,6 +38,8 @@ #include #include #include +#include +#include #include #include #include @@ -94,6 +96,11 @@ extern pfnSHGetFolderPathA pSHGetFolderPathA; #define FC_MAX(a,b) ((a) > (b) ? (a) : (b)) #define FC_ABS(a) ((a) < 0 ? -(a) : (a)) +#define FcDoubleIsZero(a) (fabs ((a)) <= DBL_EPSILON) +#define FcDoubleCmpEQ(a,b) (fabs ((a) - (b)) <= DBL_EPSILON) +#define FcDoubleCmpGE(a,b) (FcDoubleCmpEQ (a, b) || (a) > (b)) +#define FcDoubleCmpLE(a,b) (FcDoubleCmpEQ (a, b) || (a) < (b)) + /* slim_internal.h */ #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun) #define FcPrivate __attribute__((__visibility__("hidden"))) @@ -161,6 +168,7 @@ typedef enum _FcValueBinding { #define FcValueString(v) FcPointerMember(v,u.s,FcChar8) #define FcValueCharSet(v) FcPointerMember(v,u.c,const FcCharSet) #define FcValueLangSet(v) FcPointerMember(v,u.l,const FcLangSet) +#define FcValueRange(v) FcPointerMember(v,u.r,const FcRange) typedef struct _FcValueList *FcValueListPtr; @@ -244,20 +252,38 @@ typedef struct _FcExprName { FcMatchKind kind; } FcExprName; +typedef struct _FcRangeInt { + FcChar32 begin; + FcChar32 end; +} FcRangeInt; +typedef struct _FcRangeDouble { + double begin; + double end; +} FcRangeDouble; +struct _FcRange { + FcBool is_double; + FcBool is_inclusive; + union { + FcRangeInt i; + FcRangeDouble d; + } u; +}; + typedef struct _FcExpr { FcOp op; union { - int ival; - double dval; - const FcChar8 *sval; - FcExprMatrix *mexpr; - FcBool bval; - FcCharSet *cval; - FcLangSet *lval; - - FcExprName name; - const FcChar8 *constant; + int ival; + double dval; + const FcChar8 *sval; + FcExprMatrix *mexpr; + FcBool bval; + FcCharSet *cval; + FcLangSet *lval; + FcRange *rval; + + FcExprName name; + const FcChar8 *constant; struct { struct _FcExpr *left, *right; } tree; @@ -532,13 +558,6 @@ typedef struct _FcFileTime { typedef struct _FcCharMap FcCharMap; -typedef struct _FcRange FcRange; - -struct _FcRange { - FcChar32 begin; - FcChar32 end; -}; - typedef struct _FcStatFS FcStatFS; struct _FcStatFS { @@ -1008,6 +1027,9 @@ FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b); FcPrivate FcBool FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls); +FcPrivate FcBool +FcPatternObjectAddRange (FcPattern *p, FcObject object, const FcRange *r); + FcPrivate FcResult FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i); @@ -1029,6 +1051,9 @@ FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b); FcPrivate FcResult FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls); +FcPrivate FcResult +FcPatternObjectGetRange (const FcPattern *p, FcObject object, int id, FcRange **r); + FcPrivate FcBool FcPatternAppend (FcPattern *p, FcPattern *s); @@ -1056,6 +1081,32 @@ extern FcPrivate const FcMatrix FcIdentityMatrix; FcPrivate void FcMatrixFree (FcMatrix *mat); +/* fcrange.c */ + +FcPrivate FcRange +FcRangeCanonicalize (const FcRange *range); + +FcPrivate FcRange * +FcRangePromote (double v, FcValuePromotionBuffer *vbuf); + +FcPrivate FcBool +FcRangeIsZero (const FcRange *r); + +FcPrivate FcBool +FcRangeIsInRange (const FcRange *a, const FcRange *b); + +FcPrivate FcBool +FcRangeCompare (FcOp op, const FcRange *a, const FcRange *b); + +FcPrivate FcChar32 +FcRangeHash (const FcRange *r); + +FcPrivate FcBool +FcRangeSerializeAlloc (FcSerialize *serialize, const FcRange *r); + +FcPrivate FcRange * +FcRangeSerialize (FcSerialize *serialize, const FcRange *r); + /* fcstat.c */ FcPrivate int diff --git a/src/fclist.c b/src/fclist.c index a365098..6ad297c 100644 --- a/src/fclist.c +++ b/src/fclist.c @@ -273,6 +273,8 @@ FcListValueHash (FcValue *value) return (long) v.u.f; case FcTypeLangSet: return FcLangSetHash (v.u.l); + case FcTypeRange: + return FcRangeHash (v.u.r); } return 0; } diff --git a/src/fcmatch.c b/src/fcmatch.c index 93e013f..0c0a067 100644 --- a/src/fcmatch.c +++ b/src/fcmatch.c @@ -189,6 +189,49 @@ FcCompareSize (FcValue *value1, FcValue *value2) } static double +FcCompareSizeRange (FcValue *v1, FcValue *v2) +{ + FcValue value1 = FcValueCanonicalize (v1); + FcValue value2 = FcValueCanonicalize (v2); + FcRange *r1 = NULL, *r2 = NULL; + double ret = -1.0; + + switch ((int) value1.type) { + case FcTypeDouble: + r1 = FcRangeCreateDouble (value1.u.d, value1.u.d); + break; + case FcTypeRange: + r1 = FcRangeCopy (value1.u.r); + break; + default: + goto bail; + } + switch ((int) value2.type) { + case FcTypeDouble: + r2 = FcRangeCreateDouble (value2.u.d, value2.u.d); + break; + case FcTypeRange: + r2 = FcRangeCopy (value2.u.r); + break; + default: + goto bail; + } + + if (FcRangeIsInRange (r1, r2)) + ret = 0.0; + else + ret = FC_MIN (fabs (r1->u.d.end - r2->u.d.begin), fabs (r1->u.d.begin - r2->u.d.end)); + +bail: + if (r1) + FcRangeDestroy (r1); + if (r2) + FcRangeDestroy (r2); + + return ret; +} + +static double FcCompareFilename (FcValue *v1, FcValue *v2) { const FcChar8 *s1 = FcValueString (v1), *s2 = FcValueString (v2); @@ -227,6 +270,7 @@ FcCompareHash (FcValue *v1, FcValue *v2) #define PRI_FcCompareLang(n) PRI1(n) #define PRI_FcComparePostScript(n) PRI1(n) #define PRI_FcCompareHash(n) PRI1(n) +#define PRI_FcCompareSizeRange(n) PRI1(n) #define FC_OBJECT(NAME, Type, Cmp) PRI_##Cmp(NAME) @@ -255,6 +299,7 @@ typedef enum _FcMatcherPriority { PRI_FAMILY_WEAK, PRI_POSTSCRIPT_NAME_WEAK, PRI1(SPACING), + PRI1(SIZE), PRI1(PIXEL_SIZE), PRI1(STYLE), PRI1(SLANT), diff --git a/src/fcname.c b/src/fcname.c index f302948..4666178 100644 --- a/src/fcname.c +++ b/src/fcname.c @@ -87,6 +87,10 @@ FcObjectValidType (FcObject object, FcType type) if (type == FcTypeLangSet || type == FcTypeString) return FcTrue; break; + case FcTypeRange: + if (type == FcTypeRange || type == FcTypeDouble) + return FcTrue; + break; default: if (type == t->type) return FcTrue; @@ -273,6 +277,8 @@ FcNameConvert (FcType type, FcChar8 *string) { FcValue v; FcMatrix m; + double b, e; + char *p; v.type = type; switch ((int) v.type) { @@ -307,6 +313,20 @@ FcNameConvert (FcType type, FcChar8 *string) if (!v.u.l) v.type = FcTypeVoid; break; + case FcTypeRange: + if (sscanf ((char *) string, "(%lg %lg)", &b, &e) != 2) + { + v.u.d = strtod ((char *) string, &p); + if (p != NULL && p[0] != 0) + { + v.type = FcTypeVoid; + break; + } + v.type = FcTypeDouble; + } + else + v.u.r = FcRangeCreateDouble (b, e); + break; default: break; } @@ -476,6 +496,7 @@ FcNameUnparseValue (FcStrBuf *buf, { FcChar8 temp[1024]; FcValue v = FcValueCanonicalize(v0); + FcRange r; switch (v.type) { case FcTypeUnknown: @@ -501,6 +522,18 @@ FcNameUnparseValue (FcStrBuf *buf, return FcNameUnparseLangSet (buf, v.u.l); case FcTypeFTFace: return FcTrue; + case FcTypeRange: + r = FcRangeCanonicalize (v.u.r); + if (!FcDoubleIsZero (r.u.d.begin) || !FcDoubleIsZero (r.u.d.end)) + { + if (FcDoubleCmpEQ (r.u.d.begin, r.u.d.end)) + sprintf ((char *) temp, "%g", r.u.d.begin); + else + sprintf ((char *) temp, "(%g %g)", r.u.d.begin, r.u.d.end); + return FcNameUnparseString (buf, temp, 0); + } + else + return FcTrue; } return FcFalse; } @@ -533,12 +566,13 @@ FcNameUnparse (FcPattern *pat) FcChar8 * FcNameUnparseEscaped (FcPattern *pat, FcBool escape) { - FcStrBuf buf; - FcChar8 buf_static[8192]; + FcStrBuf buf, buf2; + FcChar8 buf_static[8192], buf2_static[256]; int i; FcPatternElt *e; FcStrBufInit (&buf, buf_static, sizeof (buf_static)); + FcStrBufInit (&buf2, buf2_static, sizeof (buf2_static)); e = FcPatternObjectFindElt (pat, FC_FAMILY_OBJECT); if (e) { @@ -548,10 +582,17 @@ FcNameUnparseEscaped (FcPattern *pat, FcBool escape) e = FcPatternObjectFindElt (pat, FC_SIZE_OBJECT); if (e) { - if (!FcNameUnparseString (&buf, (FcChar8 *) "-", 0)) + FcChar8 *p; + + if (!FcNameUnparseString (&buf2, (FcChar8 *) "-", 0)) goto bail0; - if (!FcNameUnparseValueList (&buf, FcPatternEltValues(e), escape ? (FcChar8 *) FC_ESCAPE_FIXED : 0)) + if (!FcNameUnparseValueList (&buf2, FcPatternEltValues(e), escape ? (FcChar8 *) FC_ESCAPE_FIXED : 0)) goto bail0; + p = FcStrBufDoneStatic (&buf2); + FcStrBufDestroy (&buf2); + if (strlen ((const char *)p) > 1) + if (!FcStrBufString (&buf, p)) + goto bail0; } for (i = 0; i < NUM_OBJECT_TYPES; i++) { diff --git a/src/fcobjs.h b/src/fcobjs.h index a0ee079..72e71f9 100644 --- a/src/fcobjs.h +++ b/src/fcobjs.h @@ -31,7 +31,7 @@ FC_OBJECT (FULLNAMELANG, FcTypeString, NULL) FC_OBJECT (SLANT, FcTypeInteger, FcCompareNumber) FC_OBJECT (WEIGHT, FcTypeInteger, FcCompareNumber) FC_OBJECT (WIDTH, FcTypeInteger, FcCompareNumber) -FC_OBJECT (SIZE, FcTypeDouble, NULL) +FC_OBJECT (SIZE, FcTypeRange, FcCompareSizeRange) FC_OBJECT (ASPECT, FcTypeDouble, NULL) FC_OBJECT (PIXEL_SIZE, FcTypeDouble, FcCompareSize) FC_OBJECT (SPACING, FcTypeInteger, FcCompareNumber) diff --git a/src/fcpat.c b/src/fcpat.c index 986cca3..7e7d54a 100644 --- a/src/fcpat.c +++ b/src/fcpat.c @@ -57,6 +57,9 @@ FcValueDestroy (FcValue v) case FcTypeLangSet: FcLangSetDestroy ((FcLangSet *) v.u.l); break; + case FcTypeRange: + FcRangeDestroy ((FcRange *) v.u.r); + break; default: break; } @@ -81,6 +84,10 @@ FcValueCanonicalize (const FcValue *v) new.u.l = FcValueLangSet(v); new.type = FcTypeLangSet; break; + case FcTypeRange: + new.u.r = FcValueRange(v); + new.type = FcTypeRange; + break; default: new = *v; break; @@ -112,6 +119,11 @@ FcValueSave (FcValue v) if (!v.u.l) v.type = FcTypeVoid; break; + case FcTypeRange: + v.u.r = FcRangeCopy (v.u.r); + if (!v.u.r) + v.type = FcTypeVoid; + break; default: break; } @@ -145,6 +157,9 @@ FcValueListDestroy (FcValueListPtr l) FcLangSetDestroy ((FcLangSet *) (l->value.u.l)); break; + case FcTypeRange: + FcRangeDestroy ((FcRange *) (l->value.u.r)); + break; default: break; } @@ -267,6 +282,8 @@ FcValueEqual (FcValue va, FcValue vb) return va.u.f == vb.u.f; case FcTypeLangSet: return FcLangSetEqual (va.u.l, vb.u.l); + case FcTypeRange: + return FcRangeIsInRange (va.u.r, vb.u.r); } return FcFalse; } @@ -320,6 +337,8 @@ FcValueHash (const FcValue *v) FcStringHash ((const FcChar8 *) ((FT_Face) v->u.f)->style_name); case FcTypeLangSet: return FcLangSetHash (FcValueLangSet(v)); + case FcTypeRange: + return FcRangeHash (v->u.r); } return 0; } @@ -841,6 +860,22 @@ FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls) return FcPatternAdd (p, object, v, FcTrue); } +FcBool +FcPatternObjectAddRange (FcPattern *p, FcObject object, const FcRange *r) +{ + FcValue v; + + v.type = FcTypeRange; + v.u.r = (FcRange *)r; + return FcPatternObjectAdd (p, object, v, FcTrue); +} + +FcBool +FcPatternAddRange (FcPattern *p, const char *object, const FcRange *r) +{ + return FcPatternObjectAddRange (p, FcObjectFromName (object), r); +} + FcResult FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v) { @@ -1025,6 +1060,31 @@ FcPatternGetLangSet(const FcPattern *p, const char *object, int id, FcLangSet ** return FcResultMatch; } +FcResult +FcPatternObjectGetRange (const FcPattern *p, FcObject object, int id, FcRange **r) +{ + FcValue v; + FcResult res; + + res = FcPatternObjectGet (p, object, id, &v); + if (res != FcResultMatch) + return res; + switch ((int)v.type) { + case FcTypeRange: + *r = (FcRange *)v.u.r; + break; + default: + return FcResultTypeMismatch; + } + return FcResultMatch; +} + +FcResult +FcPatternGetRange (const FcPattern *p, const char *object, int id, FcRange **r) +{ + return FcPatternObjectGetRange (p, FcObjectFromName (object), id, r); +} + FcPattern * FcPatternDuplicate (const FcPattern *orig) { @@ -1230,6 +1290,10 @@ FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *vl) if (!FcLangSetSerializeAlloc (serialize, vl->value.u.l)) return FcFalse; break; + case FcTypeRange: + if (!FcRangeSerializeAlloc (serialize, vl->value.u.r)) + return FcFalse; + break; default: break; } @@ -1245,6 +1309,7 @@ FcValueListSerialize (FcSerialize *serialize, const FcValueList *vl) FcChar8 *s_serialized; FcCharSet *c_serialized; FcLangSet *l_serialized; + FcRange *r_serialized; FcValueList *head_serialized = NULL; FcValueList *prev_serialized = NULL; @@ -1303,6 +1368,14 @@ FcValueListSerialize (FcSerialize *serialize, const FcValueList *vl) l_serialized, FcLangSet); break; + case FcTypeRange: + r_serialized = FcRangeSerialize (serialize, vl->value.u.r); + if (!r_serialized) + return NULL; + vl_serialized->value.u.r = FcPtrToEncodedOffset (&vl_serialized->value, + r_serialized, + FcRange); + break; default: break; } diff --git a/src/fcrange.c b/src/fcrange.c new file mode 100644 index 0000000..7d0c1c0 --- /dev/null +++ b/src/fcrange.c @@ -0,0 +1,207 @@ +/* + * fontconfig/src/fcrange.c + * + * Copyright © 2002 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of the author(s) not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. The authors make no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#include "fcint.h" + + +FcRange * +FcRangeCreateDouble (double begin, double end) +{ + FcRange *ret = malloc (sizeof (FcRange)); + + if (ret) + { + ret->is_double = FcTrue; + ret->is_inclusive = FcDoubleCmpEQ (begin, end); + ret->u.d.begin = begin; + ret->u.d.end = end; + } + + return ret; +} + +FcRange * +FcRangeCreateInteger (FcChar32 begin, FcChar32 end) +{ + FcRange *ret = malloc (sizeof (FcRange)); + + if (ret) + { + ret->is_double = FcFalse; + ret->is_inclusive = (begin == end); + ret->u.i.begin = begin; + ret->u.i.end = end; + } + + return ret; +} + +void +FcRangeDestroy (FcRange *range) +{ + free (range); +} + +FcRange * +FcRangeCopy (const FcRange *range) +{ + FcRange *ret; + + if (range->is_double) + ret = FcRangeCreateDouble (range->u.d.begin, range->u.d.end); + else + ret = FcRangeCreateInteger (range->u.i.begin, range->u.i.end); + + return ret; +} + +FcRange +FcRangeCanonicalize (const FcRange *range) +{ + FcRange new; + + if (range->is_double) + new = *range; + else + { + new.is_double = FcTrue; + new.is_inclusive = range->is_inclusive; + new.u.d.begin = (double)range->u.i.begin; + new.u.d.end = (double)range->u.i.end; + } + return new; +} + +FcRange * +FcRangePromote (double v, FcValuePromotionBuffer *vbuf) +{ + typedef struct { + FcRange r; + } FcRangePromotionBuffer; + FcRangePromotionBuffer *buf = (FcRangePromotionBuffer *) vbuf; + + FC_ASSERT_STATIC (sizeof (FcRangePromotionBuffer) <= sizeof (FcValuePromotionBuffer)); + buf->r.is_double = FcTrue; + buf->r.is_inclusive = FcTrue; + buf->r.u.d.begin = v; + buf->r.u.d.end = v; + + return &buf->r; +} + +FcBool +FcRangeIsZero (const FcRange *r) +{ + FcRange c; + + if (!r) + return FcFalse; + c = FcRangeCanonicalize (r); + + return FcDoubleIsZero (c.u.d.begin) && FcDoubleIsZero (c.u.d.end); +} + +FcBool +FcRangeIsInRange (const FcRange *a, const FcRange *b) +{ + FcRange ca, cb; + FcBool f; + + if (!a || !b) + return FcFalse; + + ca = FcRangeCanonicalize (a); + cb = FcRangeCanonicalize (b); + if (ca.is_inclusive & cb.is_inclusive) + f = ca.u.d.end <= cb.u.d.end; + else + f = ca.u.d.end < cb.u.d.end; + + return FcDoubleCmpGE (ca.u.d.begin, cb.u.d.begin) && f; +} + +FcBool +FcRangeCompare (FcOp op, const FcRange *a, const FcRange *b) +{ + FcRange ca, cb; + + switch ((int) op) { + case FcOpEqual: + case FcOpContains: + case FcOpListing: + return FcRangeIsInRange (a, b); + case FcOpNotEqual: + case FcOpNotContains: + return !FcRangeIsInRange (a, b); + case FcOpLess: + ca = FcRangeCanonicalize (a); + cb = FcRangeCanonicalize (b); + return ca.u.d.begin < cb.u.d.begin; + case FcOpLessEqual: + ca = FcRangeCanonicalize (a); + cb = FcRangeCanonicalize (b); + return FcDoubleCmpLE (ca.u.d.begin, cb.u.d.begin); + case FcOpMore: + ca = FcRangeCanonicalize (a); + cb = FcRangeCanonicalize (b); + return ca.u.d.end > cb.u.d.end; + case FcOpMoreEqual: + ca = FcRangeCanonicalize (a); + cb = FcRangeCanonicalize (b); + return FcDoubleCmpGE (ca.u.d.end, cb.u.d.end); + default: + break; + } + return FcFalse; +} + +FcChar32 +FcRangeHash (const FcRange *r) +{ + FcRange c = FcRangeCanonicalize (r); + int b = (int) (c.u.d.begin * 100); + int e = (int) (c.u.d.end * 100); + + return b ^ (b << 1) ^ (e << 9); +} + +FcBool +FcRangeSerializeAlloc (FcSerialize *serialize, const FcRange *r) +{ + if (!FcSerializeAlloc (serialize, r, sizeof (FcRange))) + return FcFalse; + return FcTrue; +} + +FcRange * +FcRangeSerialize (FcSerialize *serialize, const FcRange *r) +{ + FcRange *r_serialize = FcSerializePtr (serialize, r); + + if (!r_serialize) + return NULL; + memcpy (r_serialize, r, sizeof (FcRange)); + + return r_serialize; +} diff --git a/src/fcxml.c b/src/fcxml.c index 91d166f..c68b0cf 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -169,6 +169,18 @@ FcExprCreateMatrix (FcConfig *config, const FcExprMatrix *matrix) } static FcExpr * +FcExprCreateRange (FcConfig *config, FcRange *range) +{ + FcExpr *e = FcConfigAllocExpr (config); + if (e) + { + e->op = FcOpRange; + e->u.rval = FcRangeCopy (range); + } + return e; +} + +static FcExpr * FcExprCreateBool (FcConfig *config, FcBool b) { FcExpr *e = FcConfigAllocExpr (config); @@ -258,6 +270,7 @@ FcExprDestroy (FcExpr *e) FcExprMatrixFree (e->u.mexpr); break; case FcOpRange: + FcRangeDestroy (e->u.rval); break; case FcOpCharSet: FcCharSetDestroy (e->u.cval); @@ -503,7 +516,7 @@ typedef struct _FcVStack { int integer; double _double; FcExprMatrix *matrix; - FcRange range; + FcRange *range; FcBool bool_; FcCharSet *charset; FcLangSet *langset; @@ -593,6 +606,8 @@ FcTypeName (FcType type) return "FT_Face"; case FcTypeLangSet: return "langset"; + case FcTypeRange: + return "range"; default: return "unknown"; } @@ -608,7 +623,9 @@ FcTypecheckValue (FcConfigParse *parse, FcType value, FcType type) if (value != type) { if ((value == FcTypeLangSet && type == FcTypeString) || - (value == FcTypeString && type == FcTypeLangSet)) + (value == FcTypeString && type == FcTypeLangSet) || + (value == FcTypeInteger && type == FcTypeRange) || + (value == FcTypeDouble && type == FcTypeRange)) return; if (type == FcTypeUnknown) return; @@ -651,6 +668,9 @@ FcTypecheckExpr (FcConfigParse *parse, FcExpr *expr, FcType type) case FcOpLangSet: FcTypecheckValue (parse, FcTypeLangSet, type); break; + case FcOpRange: + FcTypecheckValue (parse, FcTypeRange, type); + break; case FcOpNil: break; case FcOpField: @@ -865,11 +885,10 @@ FcVStackPushMatrix (FcConfigParse *parse, FcExprMatrix *matrix) static FcBool FcVStackPushRange (FcConfigParse *parse, FcRange *range) { - FcVStack *vstack = FcVStackCreateAndPush (parse); + FcVStack *vstack = FcVStackCreateAndPush (parse); if (!vstack) return FcFalse; - vstack->u.range.begin = range->begin; - vstack->u.range.end = range->end; + vstack->u.range = range; vstack->tag = FcVStackRange; return FcTrue; } @@ -1017,9 +1036,11 @@ FcVStackPopAndDestroy (FcConfigParse *parse) case FcVStackMatrix: FcExprMatrixFreeShallow (vstack->u.matrix); break; - case FcVStackRange: case FcVStackBool: break; + case FcVStackRange: + FcRangeDestroy (vstack->u.range); + break; case FcVStackCharSet: FcCharSetDestroy (vstack->u.charset); break; @@ -1232,7 +1253,9 @@ static void FcParseBlank (FcConfigParse *parse) { int n = FcVStackElements (parse); - FcChar32 i; + FcChar32 i, begin, end; + FcRange r; + while (n-- > 0) { FcVStack *v = FcVStackFetch (parse, n); @@ -1248,9 +1271,12 @@ FcParseBlank (FcConfigParse *parse) goto bail; break; case FcVStackRange: - if (v->u.range.begin <= v->u.range.end) + r = FcRangeCanonicalize (v->u.range); + begin = (FcChar32)r.u.d.begin; + end = (FcChar32)r.u.d.end; + if (begin <= end) { - for (i = v->u.range.begin; i <= v->u.range.end; i++) + for (i = begin; i <= end; i++) { if (!FcBlanksAdd (parse->config->blanks, i)) goto bail; @@ -1463,9 +1489,11 @@ static void FcParseRange (FcConfigParse *parse) { FcVStack *vstack; - FcRange r = {0, 0}; - FcChar32 n; + FcRange *r; + FcChar32 n[2] = {0, 0}; int count = 1; + double d[2] = {0.0L, 0.0L}; + FcBool dflag = FcFalse; while ((vstack = FcVStackPeek (parse))) { @@ -1476,31 +1504,52 @@ FcParseRange (FcConfigParse *parse) } switch ((int) vstack->tag) { case FcVStackInteger: - n = vstack->u.integer; + if (dflag) + d[count] = (double)vstack->u.integer; + else + n[count] = vstack->u.integer; + break; + case FcVStackDouble: + if (count == 0 && !dflag) + d[1] = (double)n[1]; + d[count] = vstack->u._double; + dflag = FcTrue; break; default: FcConfigMessage (parse, FcSevereError, "invalid element in range"); - n = 0; + if (dflag) + d[count] = 0.0L; + else + n[count] = 0; break; } - if (count == 1) - r.end = n; - else - r.begin = n; count--; FcVStackPopAndDestroy (parse); } - if (count < 0) + if (count >= 0) + { + FcConfigMessage (parse, FcSevereError, "invalid range"); + return; + } + if (dflag) { - if (r.begin > r.end) + if (d[0] > d[1]) { FcConfigMessage (parse, FcSevereError, "invalid range"); return; } - FcVStackPushRange (parse, &r); + r = FcRangeCreateDouble (d[0], d[1]); } else - FcConfigMessage (parse, FcSevereError, "invalid range"); + { + if (n[0] > n[1]) + { + FcConfigMessage (parse, FcSevereError, "invalid range"); + return; + } + r = FcRangeCreateInteger (n[0], n[1]); + } + FcVStackPushRange (parse, r); } static FcBool @@ -1536,7 +1585,8 @@ FcParseCharSet (FcConfigParse *parse) { FcVStack *vstack; FcCharSet *charset = FcCharSetCreate (); - FcChar32 i; + FcChar32 i, begin, end; + FcRange r; int n = 0; while ((vstack = FcVStackPeek (parse))) @@ -1551,9 +1601,13 @@ FcParseCharSet (FcConfigParse *parse) n++; break; case FcVStackRange: - if (vstack->u.range.begin <= vstack->u.range.end) + r = FcRangeCanonicalize (vstack->u.range); + begin = (FcChar32)r.u.d.begin; + end = (FcChar32)r.u.d.end; + + if (begin <= end) { - for (i = vstack->u.range.begin; i <= vstack->u.range.end; i++) + for (i = begin; i <= end; i++) { if (!FcCharSetAddChar (charset, i)) { @@ -1888,6 +1942,7 @@ FcPopExpr (FcConfigParse *parse) expr = FcExprCreateMatrix (parse->config, vstack->u.matrix); break; case FcVStackRange: + expr = FcExprCreateRange (parse->config, vstack->u.range); break; case FcVStackBool: expr = FcExprCreateBool (parse->config, vstack->u.bool_); @@ -2653,6 +2708,11 @@ FcPopValue (FcConfigParse *parse) if (value.u.l) value.type = FcTypeLangSet; break; + case FcVStackRange: + value.u.r = FcRangeCopy (vstack->u.range); + if (value.u.r) + value.type = FcTypeRange; + break; default: FcConfigMessage (parse, FcSevereWarning, "unknown pattern element %d", vstack->tag); -- 2.3.3 From fff91eee7df5a71ed9a63a4b6e3b02c14eaf9cb3 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 26 Mar 2014 12:22:02 +0900 Subject: [PATCH] Fix a build issue with freetype <2.5.1 --- src/fcfreetype.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/fcfreetype.c b/src/fcfreetype.c index 53f0c91..d0932b3 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1108,10 +1108,7 @@ FcFreeTypeQueryFace (const FT_Face face, FT_Error err; FT_ULong len = 0, alen; FcRange *r = NULL; -#if defined (HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE) && defined (HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE) double lower_size = 0.0L, upper_size = DBL_MAX; -#endif - pat = FcPatternCreate (); if (!pat) -- 2.3.3 From fcba9ef01c978323fc71c17e455d3cd6ae35edcc Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 26 Mar 2014 16:01:49 +0900 Subject: [PATCH] Fix missing docs --- doc/Makefile.am | 1 + doc/fcpattern.fncs | 27 +++++++++++++++++--- doc/fcrange.fncs | 64 +++++++++++++++++++++++++++++++++++++++++++++++ doc/fontconfig-devel.sgml | 7 ++++++ 4 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 doc/fcrange.fncs diff --git a/doc/Makefile.am b/doc/Makefile.am index 78a7cdb..7503219 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -81,6 +81,7 @@ DOC_FUNCS_FNCS = \ fcobjectset.fncs \ fcobjecttype.fncs \ fcpattern.fncs \ + fcrange.fncs \ fcstring.fncs \ fcstrset.fncs \ fcvalue.fncs \ diff --git a/doc/fcpattern.fncs b/doc/fcpattern.fncs index 1df1c4f..1049d77 100644 --- a/doc/fcpattern.fncs +++ b/doc/fcpattern.fncs @@ -181,12 +181,21 @@ values added to the list have binding weak instead of FcPatternAddRange are available since 2.11.91. @@ @RET@ FcResult @@ -257,16 +266,24 @@ within the pattern directly. Applications must not free this value. @FUNC++++++@ FcPatternGetFTFace @TYPE1++++++@ FcPattern * @ARG1++++++@ p @TYPE2++++++@ const char * @ARG2++++++@ object -@TYPE3+++++@ int% @ARG3+++++@ n -@TYPE3++++++@ FT_Face * @ARG3++++++@ f +@TYPE3++++++@ int% @ARG3++++++@ n +@TYPE4++++++@ FT_Face * @ARG4++++++@ f @PROTOTYPE+++++++@ @RET+++++++@ FcResult @FUNC+++++++@ FcPatternGetLangSet @TYPE1+++++++@ FcPattern * @ARG1+++++++@ p @TYPE2+++++++@ const char * @ARG2+++++++@ object -@TYPE3+++++@ int% @ARG3+++++@ n -@TYPE3+++++++@ FcLangSet ** @ARG3+++++++@ l +@TYPE3+++++++@ int% @ARG3+++++++@ n +@TYPE4+++++++@ FcLangSet ** @ARG4+++++++@ l + +@PROTOTYPE++++++++@ +@RET++++++++@ FcResult +@FUNC++++++++@ FcPatternGetRange +@TYPE1++++++++@ FcPattern * @ARG1++++++++@ p +@TYPE2++++++++@ const char * @ARG2++++++++@ object +@TYPE3++++++++@ int% @ARG3++++++++@ n +@TYPE4++++++++@ FcRange ** @ARG4++++++++@ r @PURPOSE@ Return a typed value from a pattern @DESC@ @@ -275,6 +292,8 @@ returned data is of the expected type. They return FcResultTypeMismatch if this is not the case. Note that these (like FcPatternGet) do not make a copy of any data structure referenced by the return value. Use these in preference to FcPatternGet to provide compile-time typechecking. + +FcPatternGetRange are available since 2.11.91. @@ @RET@ FcPattern * diff --git a/doc/fcrange.fncs b/doc/fcrange.fncs new file mode 100644 index 0000000..6054595 --- /dev/null +++ b/doc/fcrange.fncs @@ -0,0 +1,64 @@ +/* + * fontconfig/doc/fcrange.fncs + * + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of the author(s) not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. The authors make no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ +@RET@ FcRange * +@FUNC@ FcRangeCopy +@TYPE1@ const FcRange * @ARG1@ range +@PURPOSE@ Copy a range object +@DESC@ +FcRangeCopy creates a new FcRange object and +populates it with the contents of range. +@SINCE@ 2.11.91 +@@ + +@RET@ FcRange * +@FUNC@ FcRangeCreateDouble +@TYPE1@ double @ARG1@ begin +@TYPE2@ double @ARG2@ end +@PURPOSE@ create a range object for double +@DESC@ +FcRangeCreateDouble creates a new FcRange object with +double sized value. +@SINCE@ 2.11.91 +@@ + +@RET@ FcRange * +@FUNC@ FcRangeCreateInteger +@TYPE1@ int @ARG1@ begin +@TYPE2@ int @ARG2@ end +@PURPOSE@ create a range object for integer +@DESC@ +FcRangeCreateInteger creates a new FcRange object with +integer sized value. +@SINCE@ 2.11.91 +@@ + +@RET@ void +@FUNC@ FcRangeDestroy +@TYPE1@ FcRange * @ARG1@ range +@PURPOSE@ destroy a range object +@DESC@ +FcRangeDestroy destroys a FcRange object, freeing +all memory associated with it. +@SINCE@ 2.11.91 +@@ diff --git a/doc/fontconfig-devel.sgml b/doc/fontconfig-devel.sgml index 7306d79..e2cb1c2 100644 --- a/doc/fontconfig-devel.sgml +++ b/doc/fontconfig-devel.sgml @@ -16,6 +16,7 @@ + @@ -508,6 +509,12 @@ FcMatrix structures hold an affine transformation in matrix form. &fcmatrix; + FcRange + +An FcRange holds two variables to indicate a range in between. + + &fcrange; + FcConfig An FcConfig object holds the internal representation of a configuration. -- 2.3.3 From 91784eb7d0c9f9f357210f4c82555469da37334a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 4 Apr 2014 12:18:28 +0900 Subject: [PATCH] Fix a typo https://bugs.freedesktop.org/show_bug.cgi?id=77033 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 80875df..ce468b8 100644 --- a/configure.ac +++ b/configure.ac @@ -155,7 +155,7 @@ AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getpr dnl AC_CHECK_FUNCS doesn't check for header files. dnl posix_fadvise() may be not available in older libc. AC_CHECK_SYMBOL([posix_fadvise], [fcntl.h], [fc_func_posix_fadvise=1], [fc_func_posix_fadvise=0]) -AC_DEFINE_UNQUOTED([HAVE_POSIX_FADVISE], [$fc_func_posix_fadvise], [Define to 1 if you have the 'posix_fadivse' function.]) +AC_DEFINE_UNQUOTED([HAVE_POSIX_FADVISE], [$fc_func_posix_fadvise], [Define to 1 if you have the 'posix_fadvise' function.]) if test "$os_win32" = "no"; then AC_MSG_CHECKING([for scandir]) fc_saved_CFLAGS="$CFLAGS" -- 2.3.3 From f44157c809d280e2a0ce87fb078fc4b278d24a67 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 10 Apr 2014 19:27:55 +0900 Subject: [PATCH] Fix fc-cache fail with -r Do not unlink the cache even if --really-force is given. because re-scanning process expects the cache exists. https://bugs.freedesktop.org/show_bug.cgi?id=77252 --- fc-cache/fc-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c index 99e0e9f..90ebad3 100644 --- a/fc-cache/fc-cache.c +++ b/fc-cache/fc-cache.c @@ -388,7 +388,7 @@ main (int argc, char **argv) list = FcStrListCreate (updateDirs); if (list) { - ret += scanDirs (list, config, FcTrue, really_force, verbose, FcFalse, &changed, NULL); + ret += scanDirs (list, config, FcTrue, FcFalse, verbose, FcFalse, &changed, NULL); FcStrListDone (list); } FcStrSetDestroy (updateDirs); -- 2.3.3 From 81664fe54f117e4781fda5a30429b51858302e91 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 22 Apr 2014 12:39:12 +0900 Subject: [PATCH] Rebase ja.orth against Joyo kanji characters Patch from Akihiro TSUKADA --- fc-lang/ja.orth | 4234 +------------------------------------------------------ 1 file changed, 7 insertions(+), 4227 deletions(-) diff --git a/fc-lang/ja.orth b/fc-lang/ja.orth index e87269b..dbc16d4 100644 --- a/fc-lang/ja.orth +++ b/fc-lang/ja.orth @@ -21,13 +21,14 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. # -# Coverage from JIS X 0208 (1990) +# Coverage from JIS X 0208 (1997) for non kanji characters, and +# Joyo Kanji List (2010, cabinet notification of regular-use chinese characters) # 0x3000 # IDEOGRAPHIC SPACE 0x3001 # IDEOGRAPHIC COMMA 0x3002 # IDEOGRAPHIC FULL STOP 0x3005 # IDEOGRAPHIC ITERATION MARK -0x3006 # IDEOGRAPHIC CLOSING MARK +#0x3006 # IDEOGRAPHIC CLOSING MARK # not in Sawarabi Gothic 0x3007 # IDEOGRAPHIC NUMBER ZERO 0x3041 # HIRAGANA LETTER SMALL A 0x3042 # HIRAGANA LETTER A @@ -216,171 +217,88 @@ 0x4E0B # 0x4E0D # 0x4E0E # -0x4E10 # -0x4E11 # 0x4E14 # -0x4E15 # 0x4E16 # -0x4E17 # 0x4E18 # 0x4E19 # -0x4E1E # 0x4E21 # 0x4E26 # -0x4E2A # 0x4E2D # -0x4E31 # 0x4E32 # -0x4E36 # 0x4E38 # 0x4E39 # 0x4E3B # 0x4E3C # -0x4E3F # -0x4E42 # -0x4E43 # 0x4E45 # -0x4E4B # -0x4E4D # -0x4E4E # 0x4E4F # -0x4E55 # -0x4E56 # 0x4E57 # -0x4E58 # 0x4E59 # 0x4E5D # 0x4E5E # -0x4E5F # -0x4E62 # 0x4E71 # 0x4E73 # 0x4E7E # 0x4E80 # -0x4E82 # -0x4E85 # 0x4E86 # 0x4E88 # 0x4E89 # -0x4E8A # 0x4E8B # 0x4E8C # -0x4E8E # -0x4E91 # 0x4E92 # 0x4E94 # 0x4E95 # -0x4E98 # -0x4E99 # -0x4E9B # 0x4E9C # -0x4E9E # -0x4E9F # -0x4EA0 # 0x4EA1 # -0x4EA2 # 0x4EA4 # -0x4EA5 # -0x4EA6 # -0x4EA8 # 0x4EAB # 0x4EAC # 0x4EAD # -0x4EAE # -0x4EB0 # -0x4EB3 # -0x4EB6 # 0x4EBA # -0x4EC0 # 0x4EC1 # -0x4EC2 # -0x4EC4 # -0x4EC6 # -0x4EC7 # 0x4ECA # 0x4ECB # -0x4ECD # -0x4ECE # 0x4ECF # -0x4ED4 # 0x4ED5 # 0x4ED6 # -0x4ED7 # 0x4ED8 # 0x4ED9 # -0x4EDD # -0x4EDE # -0x4EDF # 0x4EE3 # 0x4EE4 # 0x4EE5 # -0x4EED # 0x4EEE # 0x4EF0 # 0x4EF2 # 0x4EF6 # -0x4EF7 # 0x4EFB # 0x4F01 # -0x4F09 # -0x4F0A # -0x4F0D # 0x4F0E # 0x4F0F # 0x4F10 # 0x4F11 # 0x4F1A # -0x4F1C # 0x4F1D # 0x4F2F # -0x4F30 # 0x4F34 # -0x4F36 # 0x4F38 # 0x4F3A # 0x4F3C # -0x4F3D # -0x4F43 # 0x4F46 # -0x4F47 # 0x4F4D # 0x4F4E # 0x4F4F # 0x4F50 # -0x4F51 # 0x4F53 # 0x4F55 # -0x4F57 # 0x4F59 # -0x4F5A # -0x4F5B # 0x4F5C # -0x4F5D # -0x4F5E # -0x4F69 # -0x4F6F # -0x4F70 # 0x4F73 # 0x4F75 # -0x4F76 # -0x4F7B # -0x4F7C # 0x4F7F # -0x4F83 # -0x4F86 # -0x4F88 # 0x4F8B # 0x4F8D # -0x4F8F # -0x4F91 # -0x4F96 # -0x4F98 # 0x4F9B # 0x4F9D # -0x4FA0 # 0x4FA1 # -0x4FAB # -0x4FAD # 0x4FAE # 0x4FAF # 0x4FB5 # @@ -388,364 +306,165 @@ 0x4FBF # 0x4FC2 # 0x4FC3 # -0x4FC4 # 0x4FCA # -0x4FCE # -0x4FD0 # -0x4FD1 # -0x4FD4 # 0x4FD7 # -0x4FD8 # -0x4FDA # -0x4FDB # 0x4FDD # -0x4FDF # 0x4FE1 # -0x4FE3 # -0x4FE4 # -0x4FE5 # 0x4FEE # -0x4FEF # 0x4FF3 # 0x4FF5 # -0x4FF6 # 0x4FF8 # 0x4FFA # -0x4FFE # -0x5005 # -0x5006 # 0x5009 # 0x500B # 0x500D # -0x500F # -0x5011 # 0x5012 # -0x5014 # -0x5016 # 0x5019 # -0x501A # 0x501F # -0x5021 # 0x5023 # 0x5024 # -0x5025 # -0x5026 # -0x5028 # -0x5029 # -0x502A # 0x502B # -0x502C # -0x502D # -0x5036 # 0x5039 # -0x5043 # -0x5047 # -0x5048 # 0x5049 # 0x504F # -0x5050 # -0x5055 # -0x5056 # -0x505A # 0x505C # 0x5065 # -0x506C # -0x5072 # 0x5074 # 0x5075 # 0x5076 # -0x5078 # 0x507D # -0x5080 # -0x5085 # 0x508D # 0x5091 # 0x5098 # 0x5099 # -0x509A # 0x50AC # -0x50AD # 0x50B2 # -0x50B3 # -0x50B4 # 0x50B5 # 0x50B7 # 0x50BE # -0x50C2 # 0x50C5 # -0x50C9 # -0x50CA # 0x50CD # 0x50CF # -0x50D1 # 0x50D5 # -0x50D6 # 0x50DA # -0x50DE # -0x50E3 # -0x50E5 # 0x50E7 # -0x50ED # -0x50EE # -0x50F5 # -0x50F9 # -0x50FB # 0x5100 # -0x5101 # -0x5102 # 0x5104 # -0x5109 # 0x5112 # -0x5114 # -0x5115 # -0x5116 # -0x5118 # -0x511A # 0x511F # -0x5121 # 0x512A # -0x5132 # -0x5137 # -0x513A # -0x513B # -0x513C # -0x513F # -0x5140 # -0x5141 # 0x5143 # 0x5144 # 0x5145 # 0x5146 # -0x5147 # 0x5148 # 0x5149 # 0x514B # -0x514C # 0x514D # -0x514E # 0x5150 # -0x5152 # -0x5154 # 0x515A # -0x515C # -0x5162 # 0x5165 # 0x5168 # -0x5169 # -0x516A # 0x516B # 0x516C # 0x516D # -0x516E # 0x5171 # 0x5175 # -0x5176 # 0x5177 # 0x5178 # 0x517C # -0x5180 # -0x5182 # 0x5185 # 0x5186 # -0x5189 # 0x518A # -0x518C # 0x518D # -0x518F # -0x5190 # -0x5191 # 0x5192 # -0x5193 # -0x5195 # -0x5196 # 0x5197 # 0x5199 # 0x51A0 # -0x51A2 # -0x51A4 # 0x51A5 # -0x51A6 # -0x51A8 # -0x51A9 # -0x51AA # -0x51AB # 0x51AC # -0x51B0 # -0x51B1 # -0x51B2 # -0x51B3 # -0x51B4 # -0x51B5 # 0x51B6 # 0x51B7 # -0x51BD # 0x51C4 # -0x51C5 # 0x51C6 # -0x51C9 # -0x51CB # -0x51CC # 0x51CD # -0x51D6 # -0x51DB # -#0x51DC # # not in kochi fonts 0x51DD # -0x51E0 # 0x51E1 # 0x51E6 # -0x51E7 # -0x51E9 # -0x51EA # -0x51ED # -0x51F0 # -0x51F1 # -0x51F5 # 0x51F6 # 0x51F8 # 0x51F9 # 0x51FA # -0x51FD # -0x51FE # 0x5200 # 0x5203 # -0x5204 # 0x5206 # 0x5207 # 0x5208 # 0x520A # -0x520B # -0x520E # 0x5211 # -0x5214 # 0x5217 # 0x521D # 0x5224 # 0x5225 # -0x5227 # 0x5229 # -0x522A # -0x522E # 0x5230 # -0x5233 # 0x5236 # 0x5237 # 0x5238 # 0x5239 # 0x523A # 0x523B # -0x5243 # -0x5244 # 0x5247 # 0x524A # -0x524B # -0x524C # 0x524D # -0x524F # -0x5254 # 0x5256 # 0x525B # -0x525E # +#0x525D # # not in sazanami gothic/mincho, DroidSansJapanese 0x5263 # 0x5264 # -0x5265 # -0x5269 # -0x526A # 0x526F # 0x5270 # -0x5271 # 0x5272 # -0x5273 # -0x5274 # 0x5275 # -0x527D # -0x527F # -0x5283 # 0x5287 # -0x5288 # -0x5289 # -0x528D # -0x5291 # -0x5292 # -0x5294 # 0x529B # 0x529F # 0x52A0 # 0x52A3 # 0x52A9 # 0x52AA # -0x52AB # -0x52AC # -0x52AD # 0x52B1 # 0x52B4 # -0x52B5 # 0x52B9 # -0x52BC # 0x52BE # -0x52C1 # 0x52C3 # 0x52C5 # 0x52C7 # 0x52C9 # -0x52CD # -0x52D2 # 0x52D5 # -0x52D7 # 0x52D8 # 0x52D9 # 0x52DD # -0x52DE # 0x52DF # -0x52E0 # 0x52E2 # -0x52E3 # 0x52E4 # -0x52E6 # 0x52E7 # 0x52F2 # -0x52F3 # -0x52F5 # -0x52F8 # -0x52F9 # -0x52FA # 0x52FE # -0x52FF # -0x5301 # 0x5302 # 0x5305 # -0x5306 # -0x5308 # -0x530D # -0x530F # -0x5310 # -0x5315 # 0x5316 # 0x5317 # -0x5319 # -0x531A # -0x531D # 0x5320 # -0x5321 # -0x5323 # -0x532A # -0x532F # -0x5331 # -0x5333 # -0x5338 # 0x5339 # 0x533A # 0x533B # 0x533F # -0x5340 # 0x5341 # 0x5343 # -0x5345 # -0x5346 # 0x5347 # 0x5348 # -0x5349 # 0x534A # -0x534D # 0x5351 # 0x5352 # 0x5353 # @@ -753,43 +472,21 @@ 0x5357 # 0x5358 # 0x535A # -0x535C # -0x535E # 0x5360 # -0x5366 # -0x5369 # -0x536E # -0x536F # 0x5370 # 0x5371 # 0x5373 # 0x5374 # 0x5375 # -0x5377 # 0x5378 # -0x537B # -0x537F # -0x5382 # 0x5384 # -0x5396 # 0x5398 # 0x539A # 0x539F # -0x53A0 # -0x53A5 # -0x53A6 # -0x53A8 # -0x53A9 # -0x53AD # -0x53AE # -0x53B0 # 0x53B3 # -0x53B6 # 0x53BB # 0x53C2 # -0x53C3 # 0x53C8 # -0x53C9 # 0x53CA # 0x53CB # 0x53CC # @@ -799,36 +496,20 @@ 0x53D6 # 0x53D7 # 0x53D9 # -0x53DB # -0x53DF # -0x53E1 # -0x53E2 # 0x53E3 # 0x53E4 # 0x53E5 # -0x53E8 # -0x53E9 # -0x53EA # 0x53EB # 0x53EC # -0x53ED # -0x53EE # 0x53EF # 0x53F0 # -0x53F1 # 0x53F2 # 0x53F3 # -0x53F6 # 0x53F7 # 0x53F8 # -0x53FA # -0x5401 # -0x5403 # 0x5404 # 0x5408 # 0x5409 # -0x540A # -0x540B # 0x540C # 0x540D # 0x540E # @@ -836,273 +517,82 @@ 0x5410 # 0x5411 # 0x541B # -0x541D # 0x541F # -0x5420 # 0x5426 # -0x5429 # 0x542B # -0x542C # -0x542D # -0x542E # -0x5436 # 0x5438 # 0x5439 # -0x543B # -0x543C # -0x543D # -0x543E # -0x5440 # 0x5442 # -0x5446 # 0x5448 # 0x5449 # 0x544A # -0x544E # -0x5451 # -0x545F # 0x5468 # 0x546A # -0x5470 # -0x5471 # 0x5473 # -0x5475 # -0x5476 # -0x5477 # -0x547B # 0x547C # 0x547D # -0x5480 # -0x5484 # -0x5486 # -0x548B # 0x548C # -0x548E # -0x548F # -0x5490 # -0x5492 # -0x54A2 # -0x54A4 # -0x54A5 # -0x54A8 # -0x54AB # -0x54AC # -0x54AF # 0x54B2 # -0x54B3 # -0x54B8 # -0x54BC # 0x54BD # -0x54BE # 0x54C0 # 0x54C1 # -0x54C2 # -0x54C4 # -0x54C7 # -0x54C8 # -0x54C9 # -0x54D8 # 0x54E1 # -0x54E2 # -0x54E5 # -0x54E6 # -0x54E8 # -0x54E9 # -0x54ED # -0x54EE # 0x54F2 # 0x54FA # -0x54FD # 0x5504 # 0x5506 # 0x5507 # -0x550F # 0x5510 # -0x5514 # -0x5516 # -0x552E # 0x552F # 0x5531 # -0x5533 # -0x5538 # -0x5539 # 0x553E # -0x5540 # -0x5544 # -0x5545 # 0x5546 # -0x554C # 0x554F # 0x5553 # -0x5556 # -0x5557 # -0x555C # -0x555D # -0x5563 # -0x557B # -0x557C # -0x557E # -0x5580 # -0x5583 # 0x5584 # -0x5587 # 0x5589 # -0x558A # -0x558B # -0x5598 # -0x5599 # 0x559A # 0x559C # 0x559D # -0x559E # -0x559F # -0x55A7 # -0x55A8 # 0x55A9 # 0x55AA # 0x55AB # -0x55AC # -0x55AE # -0x55B0 # 0x55B6 # -0x55C4 # 0x55C5 # -0x55C7 # -0x55D4 # -0x55DA # -0x55DC # -0x55DF # 0x55E3 # -0x55E4 # -0x55F7 # -0x55F9 # -0x55FD # -0x55FE # 0x5606 # -0x5609 # -0x5614 # -0x5616 # -0x5617 # -0x5618 # -0x561B # -0x5629 # -0x562F # 0x5631 # 0x5632 # -0x5634 # -0x5636 # -0x5638 # -0x5642 # -0x564C # -0x564E # -0x5650 # -0x565B # -0x5664 # 0x5668 # -0x566A # -0x566B # -0x566C # 0x5674 # -0x5678 # -0x567A # -0x5680 # -0x5686 # 0x5687 # -0x568A # -0x568F # -0x5694 # -0x56A0 # -0x56A2 # -0x56A5 # -0x56AE # -0x56B4 # -0x56B6 # -0x56BC # -0x56C0 # -0x56C1 # -0x56C2 # -0x56C3 # -0x56C8 # -0x56CE # -0x56D1 # -0x56D3 # -0x56D7 # -0x56D8 # 0x56DA # 0x56DB # 0x56DE # 0x56E0 # 0x56E3 # -0x56EE # 0x56F0 # 0x56F2 # 0x56F3 # -0x56F9 # 0x56FA # 0x56FD # -0x56FF # -0x5700 # -0x5703 # -0x5704 # -0x5708 # -0x5709 # -0x570B # -0x570D # 0x570F # 0x5712 # -0x5713 # -0x5716 # -0x5718 # -0x571C # 0x571F # -0x5726 # 0x5727 # 0x5728 # -0x572D # 0x5730 # -0x5737 # -0x5738 # -0x573B # -0x5740 # 0x5742 # 0x5747 # 0x574A # -0x574E # -0x574F # -0x5750 # 0x5751 # -0x5761 # -0x5764 # -0x5766 # -0x5769 # 0x576A # -0x577F # 0x5782 # -0x5788 # -0x5789 # 0x578B # -0x5793 # -0x57A0 # -0x57A2 # 0x57A3 # -0x57A4 # -0x57AA # -0x57B0 # -0x57B3 # -0x57C0 # -0x57C3 # -0x57C6 # 0x57CB # 0x57CE # -0x57D2 # -0x57D3 # -0x57D4 # -0x57D6 # -0x57DC # 0x57DF # -0x57E0 # -0x57E3 # -0x57F4 # 0x57F7 # 0x57F9 # 0x57FA # @@ -1111,267 +601,111 @@ 0x5802 # 0x5805 # 0x5806 # -0x580A # -0x580B # 0x5815 # -0x5819 # -0x581D # -0x5821 # 0x5824 # 0x582A # -0x582F # -0x5830 # 0x5831 # 0x5834 # -0x5835 # -0x583A # -0x583D # 0x5840 # 0x5841 # 0x584A # -0x584B # 0x5851 # -0x5852 # 0x5854 # 0x5857 # -0x5858 # -0x5859 # 0x585A # 0x585E # -0x5862 # +#0x5861 # # not in DroidSansJapanese 0x5869 # -0x586B # -0x5870 # -0x5872 # -0x5875 # -0x5879 # 0x587E # 0x5883 # -0x5885 # 0x5893 # 0x5897 # 0x589C # -0x589F # 0x58A8 # -0x58AB # -0x58AE # 0x58B3 # -0x58B8 # -0x58B9 # -0x58BA # -0x58BB # 0x58BE # 0x58C1 # -0x58C5 # 0x58C7 # 0x58CA # 0x58CC # -0x58D1 # -0x58D3 # -0x58D5 # -0x58D7 # -0x58D8 # -0x58D9 # -0x58DC # -0x58DE # -0x58DF # -0x58E4 # -0x58E5 # 0x58EB # -0x58EC # 0x58EE # -0x58EF # 0x58F0 # 0x58F1 # 0x58F2 # -0x58F7 # -0x58F9 # -0x58FA # -0x58FB # -0x58FC # -0x58FD # -0x5902 # 0x5909 # -0x590A # 0x590F # -0x5910 # 0x5915 # 0x5916 # -0x5918 # -0x5919 # 0x591A # -0x591B # 0x591C # 0x5922 # -0x5925 # 0x5927 # 0x5929 # 0x592A # 0x592B # -0x592C # -0x592D # 0x592E # 0x5931 # -0x5932 # -0x5937 # -0x5938 # -0x593E # -0x5944 # 0x5947 # 0x5948 # 0x5949 # -0x594E # 0x594F # -0x5950 # 0x5951 # 0x5954 # -0x5955 # -0x5957 # -0x5958 # -0x595A # -0x5960 # -0x5962 # 0x5965 # -0x5967 # 0x5968 # -0x5969 # 0x596A # -0x596C # 0x596E # 0x5973 # 0x5974 # -0x5978 # 0x597D # -0x5981 # 0x5982 # 0x5983 # 0x5984 # 0x598A # -0x598D # -0x5993 # 0x5996 # 0x5999 # -0x599B # -0x599D # -0x59A3 # 0x59A5 # 0x59A8 # 0x59AC # -0x59B2 # 0x59B9 # 0x59BB # -0x59BE # -0x59C6 # 0x59C9 # 0x59CB # -0x59D0 # -0x59D1 # 0x59D3 # 0x59D4 # -0x59D9 # -0x59DA # -0x59DC # -0x59E5 # -0x59E6 # -0x59E8 # -0x59EA # 0x59EB # -0x59F6 # 0x59FB # 0x59FF # 0x5A01 # -0x5A03 # -0x5A09 # -0x5A11 # 0x5A18 # -0x5A1A # -0x5A1C # -0x5A1F # 0x5A20 # -0x5A25 # -0x5A29 # 0x5A2F # -0x5A35 # -0x5A36 # -0x5A3C # -0x5A40 # -0x5A41 # 0x5A46 # -0x5A49 # 0x5A5A # -0x5A62 # 0x5A66 # -0x5A6A # -0x5A6C # 0x5A7F # 0x5A92 # -0x5A9A # 0x5A9B # -0x5ABC # -0x5ABD # -0x5ABE # 0x5AC1 # -0x5AC2 # 0x5AC9 # -0x5ACB # 0x5ACC # -0x5AD0 # -0x5AD6 # -0x5AD7 # 0x5AE1 # -0x5AE3 # -0x5AE6 # -0x5AE9 # -0x5AFA # -0x5AFB # -0x5B09 # -0x5B0B # -0x5B0C # -0x5B16 # 0x5B22 # -0x5B2A # -0x5B2C # -0x5B30 # -0x5B32 # -0x5B36 # -0x5B3E # -0x5B40 # -0x5B43 # -0x5B45 # 0x5B50 # -0x5B51 # 0x5B54 # -0x5B55 # 0x5B57 # 0x5B58 # -0x5B5A # -0x5B5B # -0x5B5C # 0x5B5D # -0x5B5F # 0x5B63 # 0x5B64 # -0x5B65 # 0x5B66 # -0x5B69 # 0x5B6B # -0x5B70 # -0x5B71 # -0x5B73 # -0x5B75 # -0x5B78 # -0x5B7A # -0x5B80 # -0x5B83 # 0x5B85 # 0x5B87 # 0x5B88 # 0x5B89 # -0x5B8B # 0x5B8C # -0x5B8D # -0x5B8F # -0x5B95 # 0x5B97 # 0x5B98 # 0x5B99 # @@ -1383,47 +717,26 @@ 0x5BA2 # 0x5BA3 # 0x5BA4 # -0x5BA5 # -0x5BA6 # 0x5BAE # 0x5BB0 # 0x5BB3 # 0x5BB4 # 0x5BB5 # 0x5BB6 # -0x5BB8 # 0x5BB9 # 0x5BBF # 0x5BC2 # -0x5BC3 # 0x5BC4 # -0x5BC5 # 0x5BC6 # -0x5BC7 # -0x5BC9 # 0x5BCC # -0x5BD0 # 0x5BD2 # -0x5BD3 # -0x5BD4 # 0x5BDB # 0x5BDD # -0x5BDE # 0x5BDF # 0x5BE1 # -0x5BE2 # -0x5BE4 # -0x5BE5 # -0x5BE6 # 0x5BE7 # -0x5BE8 # 0x5BE9 # -0x5BEB # 0x5BEE # -0x5BF0 # -0x5BF3 # -0x5BF5 # -0x5BF6 # 0x5BF8 # 0x5BFA # 0x5BFE # @@ -1431,28 +744,15 @@ 0x5C01 # 0x5C02 # 0x5C04 # -0x5C05 # 0x5C06 # -0x5C07 # -0x5C08 # 0x5C09 # 0x5C0A # 0x5C0B # -0x5C0D # 0x5C0E # 0x5C0F # 0x5C11 # -0x5C13 # -0x5C16 # 0x5C1A # -0x5C20 # -0x5C22 # -0x5C24 # -0x5C28 # -0x5C2D # 0x5C31 # -0x5C38 # -0x5C39 # 0x5C3A # 0x5C3B # 0x5C3C # @@ -1460,109 +760,31 @@ 0x5C3E # 0x5C3F # 0x5C40 # -0x5C41 # 0x5C45 # -0x5C46 # 0x5C48 # 0x5C4A # 0x5C4B # -0x5C4D # -0x5C4E # -0x5C4F # -0x5C50 # -0x5C51 # -0x5C53 # 0x5C55 # 0x5C5E # -0x5C60 # -0x5C61 # 0x5C64 # 0x5C65 # -0x5C6C # -0x5C6E # 0x5C6F # 0x5C71 # -0x5C76 # -0x5C79 # -0x5C8C # 0x5C90 # -0x5C91 # -0x5C94 # 0x5CA1 # -0x5CA8 # 0x5CA9 # -0x5CAB # 0x5CAC # -0x5CB1 # 0x5CB3 # -0x5CB6 # -0x5CB7 # 0x5CB8 # -0x5CBB # -0x5CBC # -0x5CBE # -0x5CC5 # -0x5CC7 # -0x5CD9 # 0x5CE0 # 0x5CE1 # -0x5CE8 # -0x5CE9 # -0x5CEA # -0x5CED # -0x5CEF # 0x5CF0 # 0x5CF6 # -0x5CFA # -0x5CFB # -0x5CFD # 0x5D07 # -0x5D0B # 0x5D0E # -0x5D11 # -0x5D14 # -0x5D15 # 0x5D16 # -0x5D17 # -0x5D18 # -0x5D19 # -0x5D1A # -0x5D1B # -0x5D1F # -0x5D22 # 0x5D29 # -0x5D4B # -0x5D4C # -0x5D4E # 0x5D50 # -0x5D52 # -0x5D5C # -0x5D69 # -0x5D6C # -0x5D6F # -0x5D73 # -0x5D76 # -0x5D82 # -0x5D84 # -0x5D87 # -0x5D8B # -0x5D8C # -0x5D90 # -0x5D9D # -0x5DA2 # -0x5DAC # -0x5DAE # -0x5DB7 # -0x5DBA # -0x5DBC # -0x5DBD # -0x5DC9 # -0x5DCC # -0x5DCD # -0x5DD2 # -0x5DD3 # -0x5DD6 # -0x5DDB # 0x5DDD # 0x5DDE # 0x5DE1 # @@ -1571,27 +793,14 @@ 0x5DE6 # 0x5DE7 # 0x5DE8 # -0x5DEB # 0x5DEE # 0x5DF1 # -0x5DF2 # -0x5DF3 # -0x5DF4 # -0x5DF5 # -0x5DF7 # 0x5DFB # -0x5DFD # 0x5DFE # 0x5E02 # 0x5E03 # 0x5E06 # -0x5E0B # 0x5E0C # -0x5E11 # -0x5E16 # -0x5E19 # -0x5E1A # -0x5E1B # 0x5E1D # 0x5E25 # 0x5E2B # @@ -1599,738 +808,301 @@ 0x5E2F # 0x5E30 # 0x5E33 # -0x5E36 # -0x5E37 # 0x5E38 # 0x5E3D # -0x5E40 # -0x5E43 # -0x5E44 # 0x5E45 # -0x5E47 # -0x5E4C # -0x5E4E # -0x5E54 # 0x5E55 # -0x5E57 # -0x5E5F # -0x5E61 # -0x5E62 # 0x5E63 # -0x5E64 # 0x5E72 # 0x5E73 # 0x5E74 # -0x5E75 # -0x5E76 # 0x5E78 # 0x5E79 # -0x5E7A # 0x5E7B # 0x5E7C # 0x5E7D # 0x5E7E # -0x5E7F # 0x5E81 # 0x5E83 # -0x5E84 # -0x5E87 # 0x5E8A # 0x5E8F # 0x5E95 # -0x5E96 # 0x5E97 # -0x5E9A # 0x5E9C # -0x5EA0 # 0x5EA6 # 0x5EA7 # 0x5EAB # 0x5EAD # -0x5EB5 # 0x5EB6 # 0x5EB7 # 0x5EB8 # -0x5EC1 # -0x5EC2 # 0x5EC3 # -0x5EC8 # 0x5EC9 # 0x5ECA # -0x5ECF # -0x5ED0 # -0x5ED3 # -0x5ED6 # -0x5EDA # -0x5EDB # -0x5EDD # -0x5EDF # -0x5EE0 # -0x5EE1 # -0x5EE2 # -0x5EE3 # -0x5EE8 # -0x5EE9 # -0x5EEC # -0x5EF0 # -0x5EF1 # -0x5EF3 # -0x5EF4 # 0x5EF6 # 0x5EF7 # -0x5EF8 # 0x5EFA # -0x5EFB # -0x5EFC # -0x5EFE # -0x5EFF # 0x5F01 # -0x5F03 # 0x5F04 # -0x5F09 # 0x5F0A # -0x5F0B # -0x5F0C # -0x5F0D # 0x5F0F # 0x5F10 # -0x5F11 # 0x5F13 # 0x5F14 # 0x5F15 # -0x5F16 # -0x5F17 # -0x5F18 # -0x5F1B # 0x5F1F # 0x5F25 # 0x5F26 # 0x5F27 # -0x5F29 # -0x5F2D # -0x5F2F # 0x5F31 # 0x5F35 # 0x5F37 # -0x5F38 # -0x5F3C # 0x5F3E # -0x5F41 # -0x5F48 # -0x5F4A # -0x5F4C # -0x5F4E # -0x5F51 # 0x5F53 # -0x5F56 # -0x5F57 # 0x5F59 # -0x5F5C # -0x5F5D # -0x5F61 # 0x5F62 # -0x5F66 # 0x5F69 # -0x5F6A # 0x5F6B # -0x5F6C # -0x5F6D # 0x5F70 # 0x5F71 # -0x5F73 # -0x5F77 # 0x5F79 # 0x5F7C # -0x5F7F # 0x5F80 # 0x5F81 # -0x5F82 # -0x5F83 # 0x5F84 # 0x5F85 # -0x5F87 # -0x5F88 # -0x5F8A # 0x5F8B # 0x5F8C # 0x5F90 # -0x5F91 # 0x5F92 # 0x5F93 # 0x5F97 # -0x5F98 # -0x5F99 # -0x5F9E # -0x5FA0 # 0x5FA1 # -0x5FA8 # 0x5FA9 # 0x5FAA # -0x5FAD # 0x5FAE # 0x5FB3 # 0x5FB4 # 0x5FB9 # -0x5FBC # -0x5FBD # 0x5FC3 # 0x5FC5 # 0x5FCC # 0x5FCD # -0x5FD6 # 0x5FD7 # 0x5FD8 # 0x5FD9 # 0x5FDC # -0x5FDD # 0x5FE0 # -0x5FE4 # 0x5FEB # -0x5FF0 # -0x5FF1 # 0x5FF5 # -0x5FF8 # -0x5FFB # -0x5FFD # -0x5FFF # -0x600E # -0x600F # -0x6010 # 0x6012 # -0x6015 # 0x6016 # -0x6019 # -0x601B # -0x601C # 0x601D # 0x6020 # -0x6021 # 0x6025 # -0x6026 # 0x6027 # 0x6028 # -0x6029 # 0x602A # -0x602B # -0x602F # -0x6031 # -0x603A # -0x6041 # -0x6042 # -0x6043 # -0x6046 # -0x604A # 0x604B # -0x604D # 0x6050 # 0x6052 # -0x6055 # -0x6059 # -0x605A # -0x605F # -0x6060 # -0x6062 # 0x6063 # -0x6064 # 0x6065 # 0x6068 # 0x6069 # -0x606A # -0x606B # -0x606C # 0x606D # 0x606F # -0x6070 # 0x6075 # -0x6077 # -0x6081 # -0x6083 # -0x6084 # -0x6089 # -0x608B # -0x608C # -0x608D # -0x6092 # 0x6094 # -0x6096 # -0x6097 # -0x609A # -0x609B # 0x609F # 0x60A0 # 0x60A3 # 0x60A6 # -0x60A7 # 0x60A9 # 0x60AA # 0x60B2 # -0x60B3 # -0x60B4 # -0x60B5 # -0x60B6 # -0x60B8 # 0x60BC # -0x60BD # 0x60C5 # -0x60C6 # -0x60C7 # 0x60D1 # -0x60D3 # -0x60D8 # -0x60DA # 0x60DC # -0x60DF # -0x60E0 # -0x60E1 # -0x60E3 # 0x60E7 # 0x60E8 # 0x60F0 # -0x60F1 # 0x60F3 # -0x60F4 # -0x60F6 # -0x60F7 # -0x60F9 # -0x60FA # -0x60FB # -0x6100 # 0x6101 # -0x6103 # -0x6106 # -0x6108 # 0x6109 # -0x610D # -0x610E # 0x610F # -0x6115 # 0x611A # 0x611B # 0x611F # -0x6121 # -0x6127 # -0x6128 # -0x612C # -0x6134 # -0x613C # -0x613D # -0x613E # -0x613F # -0x6142 # 0x6144 # -0x6147 # 0x6148 # -0x614A # 0x614B # 0x614C # -0x614D # 0x614E # -0x6153 # 0x6155 # -0x6158 # -0x6159 # -0x615A # -0x615D # -0x615F # 0x6162 # 0x6163 # -0x6165 # -0x6167 # 0x6168 # -0x616B # 0x616E # -0x616F # 0x6170 # -0x6171 # -0x6173 # -0x6174 # -0x6175 # 0x6176 # -0x6177 # -0x617E # 0x6182 # -0x6187 # -0x618A # 0x618E # -0x6190 # -0x6191 # -0x6194 # -0x6196 # -0x6199 # -0x619A # 0x61A4 # 0x61A7 # 0x61A9 # -0x61AB # 0x61AC # -0x61AE # 0x61B2 # 0x61B6 # -0x61BA # 0x61BE # -0x61C3 # -0x61C6 # 0x61C7 # -0x61C8 # -0x61C9 # -0x61CA # -0x61CB # -0x61CC # -0x61CD # 0x61D0 # -0x61E3 # -0x61E6 # 0x61F2 # -0x61F4 # -0x61F6 # -0x61F7 # 0x61F8 # -0x61FA # -0x61FC # -0x61FD # -0x61FE # -0x61FF # -0x6200 # -0x6208 # -0x6209 # -0x620A # -0x620C # -0x620D # -0x620E # 0x6210 # 0x6211 # 0x6212 # -0x6214 # -0x6216 # 0x621A # -0x621B # -0x621D # -0x621E # -0x621F # -0x6221 # 0x6226 # -0x622A # -0x622E # 0x622F # -0x6230 # -0x6232 # -0x6233 # 0x6234 # 0x6238 # 0x623B # 0x623F # 0x6240 # -0x6241 # 0x6247 # -0x6248 # 0x6249 # 0x624B # 0x624D # -0x624E # 0x6253 # 0x6255 # -0x6258 # -0x625B # -0x625E # -0x6260 # -0x6263 # -0x6268 # -0x626E # 0x6271 # 0x6276 # 0x6279 # -0x627C # -0x627E # 0x627F # 0x6280 # -0x6282 # -0x6283 # 0x6284 # -0x6289 # 0x628A # 0x6291 # -0x6292 # -0x6293 # -0x6294 # 0x6295 # -0x6296 # 0x6297 # 0x6298 # -0x629B # 0x629C # 0x629E # 0x62AB # -0x62AC # 0x62B1 # 0x62B5 # 0x62B9 # -0x62BB # 0x62BC # 0x62BD # -0x62C2 # 0x62C5 # -0x62C6 # -0x62C7 # -0x62C8 # 0x62C9 # -0x62CA # -0x62CC # 0x62CD # -0x62CF # 0x62D0 # -0x62D1 # 0x62D2 # 0x62D3 # -0x62D4 # -0x62D7 # 0x62D8 # 0x62D9 # 0x62DB # -0x62DC # 0x62DD # 0x62E0 # 0x62E1 # 0x62EC # 0x62ED # -0x62EE # -0x62EF # -0x62F1 # 0x62F3 # -0x62F5 # 0x62F6 # 0x62F7 # 0x62FE # -0x62FF # 0x6301 # -0x6302 # 0x6307 # -0x6308 # -0x6309 # -0x630C # 0x6311 # 0x6319 # 0x631F # -0x6327 # 0x6328 # 0x632B # 0x632F # -0x633A # -0x633D # -0x633E # 0x633F # 0x6349 # -0x634C # -0x634D # -0x634F # -0x6350 # 0x6355 # 0x6357 # 0x635C # -0x6367 # 0x6368 # -0x6369 # -0x636B # 0x636E # -0x6372 # -0x6376 # -0x6377 # -0x637A # 0x637B # -0x6380 # 0x6383 # 0x6388 # -0x6389 # 0x638C # -0x638E # -0x638F # 0x6392 # -0x6396 # 0x6398 # 0x639B # -0x639F # -0x63A0 # 0x63A1 # 0x63A2 # -0x63A3 # 0x63A5 # 0x63A7 # 0x63A8 # -0x63A9 # 0x63AA # -0x63AB # -0x63AC # 0x63B2 # -0x63B4 # -0x63B5 # -0x63BB # -0x63BE # -0x63C0 # -0x63C3 # -0x63C4 # -0x63C6 # -0x63C9 # 0x63CF # 0x63D0 # -0x63D2 # -0x63D6 # 0x63DA # 0x63DB # 0x63E1 # -0x63E3 # -0x63E9 # 0x63EE # 0x63F4 # -0x63F6 # 0x63FA # -0x6406 # 0x640D # -0x640F # -0x6413 # -0x6416 # -0x6417 # -0x641C # -0x6426 # -0x6428 # 0x642C # 0x642D # -0x6434 # -0x6436 # 0x643A # 0x643E # 0x6442 # -0x644E # 0x6458 # -0x6467 # 0x6469 # 0x646F # -0x6476 # -0x6478 # -0x647A # 0x6483 # -0x6488 # -0x6492 # -0x6493 # -0x6495 # -0x649A # -0x649E # 0x64A4 # -0x64A5 # -0x64A9 # -0x64AB # -0x64AD # 0x64AE # -0x64B0 # 0x64B2 # -0x64B9 # -0x64BB # -0x64BC # 0x64C1 # -0x64C2 # -0x64C5 # -0x64C7 # 0x64CD # -0x64D2 # -0x64D4 # -0x64D8 # -0x64DA # -0x64E0 # -0x64E1 # -0x64E2 # -0x64E3 # 0x64E6 # -0x64E7 # 0x64EC # -0x64EF # -0x64F1 # -0x64F2 # -0x64F4 # -0x64F6 # -0x64FA # -0x64FD # -0x64FE # -0x6500 # -0x6505 # -0x6518 # -0x651C # -0x651D # -0x6523 # -0x6524 # -0x652A # -0x652B # -0x652C # 0x652F # -0x6534 # -0x6535 # -0x6536 # -0x6537 # -0x6538 # 0x6539 # 0x653B # 0x653E # 0x653F # 0x6545 # -0x6548 # -0x654D # 0x654F # 0x6551 # -0x6555 # -0x6556 # 0x6557 # -0x6558 # 0x6559 # -0x655D # -0x655E # 0x6562 # 0x6563 # -0x6566 # 0x656C # 0x6570 # -0x6572 # 0x6574 # 0x6575 # 0x6577 # -0x6578 # -0x6582 # -0x6583 # 0x6587 # -0x6588 # 0x6589 # -0x658C # 0x658E # -0x6590 # 0x6591 # 0x6597 # 0x6599 # -0x659B # 0x659C # -0x659F # -0x65A1 # 0x65A4 # 0x65A5 # -0x65A7 # -0x65AB # 0x65AC # 0x65AD # -0x65AF # 0x65B0 # -0x65B7 # 0x65B9 # -0x65BC # 0x65BD # -0x65C1 # -0x65C3 # -0x65C4 # 0x65C5 # -0x65C6 # 0x65CB # -0x65CC # 0x65CF # -0x65D2 # 0x65D7 # -0x65D9 # -0x65DB # -0x65E0 # -0x65E1 # 0x65E2 # 0x65E5 # 0x65E6 # @@ -2338,21 +1110,12 @@ 0x65E8 # 0x65E9 # 0x65EC # -0x65ED # -0x65F1 # 0x65FA # -0x65FB # -0x6602 # -0x6603 # 0x6606 # 0x6607 # -0x660A # -0x660C # 0x660E # -0x660F # 0x6613 # 0x6614 # -0x661C # 0x661F # 0x6620 # 0x6625 # @@ -2360,146 +1123,59 @@ 0x6628 # 0x662D # 0x662F # -0x6634 # -0x6635 # -0x6636 # 0x663C # -0x663F # -0x6641 # 0x6642 # -0x6643 # -0x6644 # -0x6649 # -0x664B # -0x664F # -0x6652 # -0x665D # -0x665E # -0x665F # -0x6662 # -0x6664 # -0x6666 # -0x6667 # -0x6668 # 0x6669 # 0x666E # 0x666F # -0x6670 # 0x6674 # 0x6676 # -0x667A # 0x6681 # -0x6683 # -0x6684 # 0x6687 # -0x6688 # -0x6689 # -0x668E # 0x6691 # 0x6696 # 0x6697 # -0x6698 # -0x669D # -0x66A2 # 0x66A6 # 0x66AB # 0x66AE # 0x66B4 # -0x66B8 # -0x66B9 # -0x66BC # -0x66BE # -0x66C1 # -0x66C4 # 0x66C7 # -0x66C9 # 0x66D6 # -0x66D9 # -0x66DA # 0x66DC # -0x66DD # -0x66E0 # -0x66E6 # -0x66E9 # -0x66F0 # 0x66F2 # -0x66F3 # 0x66F4 # -0x66F5 # -0x66F7 # 0x66F8 # 0x66F9 # -0x66FC # 0x66FD # -0x66FE # 0x66FF # 0x6700 # -0x6703 # 0x6708 # 0x6709 # -0x670B # 0x670D # -0x670F # -0x6714 # 0x6715 # -0x6716 # 0x6717 # 0x671B # 0x671D # -0x671E # 0x671F # -0x6726 # -0x6727 # 0x6728 # 0x672A # 0x672B # 0x672C # 0x672D # -0x672E # 0x6731 # 0x6734 # -0x6736 # -0x6737 # -0x6738 # 0x673A # 0x673D # -0x673F # -0x6741 # -0x6746 # 0x6749 # -0x674E # -0x674F # 0x6750 # 0x6751 # -0x6753 # -0x6756 # -0x6759 # -0x675C # -0x675E # 0x675F # -0x6760 # 0x6761 # -0x6762 # -0x6763 # -0x6764 # 0x6765 # -0x676A # -0x676D # 0x676F # -0x6770 # 0x6771 # -0x6772 # -0x6773 # -0x6775 # -0x6777 # -0x677C # 0x677E # 0x677F # -0x6785 # -0x6787 # -0x6789 # -0x678B # -0x678C # 0x6790 # 0x6795 # 0x6797 # @@ -2507,2836 +1183,820 @@ 0x679C # 0x679D # 0x67A0 # -0x67A1 # 0x67A2 # -0x67A6 # -0x67A9 # 0x67AF # -0x67B3 # -0x67B4 # 0x67B6 # -0x67B7 # -0x67B8 # -0x67B9 # -0x67C1 # 0x67C4 # -0x67C6 # -0x67CA # -0x67CE # -0x67CF # 0x67D0 # -0x67D1 # 0x67D3 # 0x67D4 # -0x67D8 # -0x67DA # -0x67DD # -0x67DE # -0x67E2 # -0x67E4 # -0x67E7 # -0x67E9 # -0x67EC # -0x67EE # -0x67EF # 0x67F1 # 0x67F3 # -0x67F4 # 0x67F5 # 0x67FB # -0x67FE # 0x67FF # -0x6802 # 0x6803 # 0x6804 # 0x6813 # -0x6816 # -0x6817 # -0x681E # 0x6821 # -0x6822 # -0x6829 # 0x682A # -0x682B # -0x6832 # -0x6834 # 0x6838 # 0x6839 # 0x683C # 0x683D # -0x6840 # 0x6841 # -0x6842 # 0x6843 # -0x6846 # 0x6848 # -0x684D # -0x684E # -0x6850 # 0x6851 # -0x6853 # -0x6854 # -0x6859 # 0x685C # -0x685D # 0x685F # -0x6863 # -0x6867 # -0x6874 # -0x6876 # -0x6877 # -0x687E # -0x687F # -0x6881 # -0x6883 # 0x6885 # -0x688D # -0x688F # -0x6893 # -0x6894 # 0x6897 # -0x689B # -0x689D # -0x689F # -0x68A0 # -0x68A2 # -0x68A6 # -0x68A7 # 0x68A8 # -0x68AD # -0x68AF # 0x68B0 # -0x68B1 # -0x68B3 # -0x68B5 # -0x68B6 # -0x68B9 # -0x68BA # -0x68BC # 0x68C4 # -0x68C6 # -0x68C9 # -0x68CA # 0x68CB # -0x68CD # 0x68D2 # -0x68D4 # -0x68D5 # -0x68D7 # -0x68D8 # 0x68DA # 0x68DF # -0x68E0 # -0x68E1 # -0x68E3 # -0x68E7 # 0x68EE # -0x68EF # -0x68F2 # -0x68F9 # 0x68FA # -0x6900 # -0x6901 # -0x6904 # 0x6905 # -0x6908 # -0x690B # -0x690C # 0x690D # 0x690E # -0x690F # -0x6912 # -0x6919 # -0x691A # -0x691B # 0x691C # -0x6921 # -0x6922 # -0x6923 # -0x6925 # -0x6926 # -0x6928 # -0x692A # -0x6930 # -0x6934 # -0x6936 # -0x6939 # -0x693D # -0x693F # -0x694A # -0x6953 # -0x6954 # -0x6955 # -0x6959 # -0x695A # -0x695C # -0x695D # -0x695E # -0x6960 # -0x6961 # -0x6962 # -0x696A # -0x696B # 0x696D # -0x696E # -0x696F # -0x6973 # -0x6974 # 0x6975 # 0x6977 # -0x6978 # -0x6979 # 0x697C # 0x697D # -0x697E # -0x6981 # 0x6982 # -0x698A # -0x698E # -0x6991 # -0x6994 # -0x6995 # -0x699B # -0x699C # -0x69A0 # -0x69A7 # -0x69AE # -0x69B1 # -0x69B2 # -0x69B4 # -0x69BB # -0x69BE # -0x69BF # -0x69C1 # -0x69C3 # -0x69C7 # -0x69CA # 0x69CB # -0x69CC # -0x69CD # -0x69CE # -0x69D0 # -0x69D3 # 0x69D8 # -0x69D9 # -0x69DD # -0x69DE # -0x69E7 # -0x69E8 # -0x69EB # -0x69ED # -0x69F2 # -0x69F9 # -0x69FB # 0x69FD # -0x69FF # -0x6A02 # -0x6A05 # -0x6A0A # -0x6A0B # -0x6A0C # -0x6A12 # -0x6A13 # -0x6A14 # -0x6A17 # 0x6A19 # -0x6A1B # -0x6A1E # -0x6A1F # 0x6A21 # -0x6A22 # -0x6A23 # 0x6A29 # 0x6A2A # -0x6A2B # -0x6A2E # -0x6A35 # -0x6A36 # -0x6A38 # 0x6A39 # -0x6A3A # -0x6A3D # -0x6A44 # -0x6A47 # -0x6A48 # 0x6A4B # -0x6A58 # -0x6A59 # 0x6A5F # -0x6A61 # -0x6A62 # -0x6A66 # -0x6A72 # -0x6A78 # -0x6A7F # -0x6A80 # -0x6A84 # -0x6A8D # -0x6A8E # -0x6A90 # -0x6A97 # -0x6A9C # -0x6AA0 # -0x6AA2 # -0x6AA3 # -0x6AAA # -0x6AAC # -0x6AAE # -0x6AB3 # -0x6AB8 # -0x6ABB # -0x6AC1 # -0x6AC2 # -0x6AC3 # -0x6AD1 # -0x6AD3 # -0x6ADA # -0x6ADB # -0x6ADE # -0x6ADF # -0x6AE8 # -0x6AEA # -0x6AFA # -0x6AFB # 0x6B04 # -0x6B05 # -0x6B0A # -0x6B12 # -0x6B16 # -0x6B1D # -0x6B1F # 0x6B20 # 0x6B21 # -0x6B23 # 0x6B27 # 0x6B32 # -0x6B37 # -0x6B38 # -0x6B39 # 0x6B3A # -0x6B3D # 0x6B3E # -0x6B43 # -0x6B47 # -0x6B49 # 0x6B4C # -0x6B4E # -0x6B50 # 0x6B53 # -0x6B54 # -0x6B59 # -0x6B5B # -0x6B5F # -0x6B61 # 0x6B62 # 0x6B63 # -0x6B64 # 0x6B66 # 0x6B69 # -0x6B6A # 0x6B6F # 0x6B73 # 0x6B74 # -0x6B78 # -0x6B79 # 0x6B7B # -0x6B7F # -0x6B80 # -0x6B83 # -0x6B84 # -0x6B86 # 0x6B89 # 0x6B8A # 0x6B8B # -0x6B8D # -0x6B95 # 0x6B96 # -0x6B98 # -0x6B9E # -0x6BA4 # -0x6BAA # -0x6BAB # -0x6BAF # -0x6BB1 # -0x6BB2 # -0x6BB3 # 0x6BB4 # 0x6BB5 # -0x6BB7 # 0x6BBA # 0x6BBB # -0x6BBC # 0x6BBF # 0x6BC0 # -0x6BC5 # -0x6BC6 # -0x6BCB # 0x6BCD # 0x6BCE # 0x6BD2 # -0x6BD3 # 0x6BD4 # -0x6BD8 # 0x6BDB # -0x6BDF # -0x6BEB # -0x6BEC # -0x6BEF # -0x6BF3 # -0x6C08 # 0x6C0F # 0x6C11 # -0x6C13 # -0x6C14 # 0x6C17 # -0x6C1B # -0x6C23 # -0x6C24 # 0x6C34 # 0x6C37 # 0x6C38 # 0x6C3E # -0x6C40 # 0x6C41 # 0x6C42 # 0x6C4E # -0x6C50 # -0x6C55 # 0x6C57 # 0x6C5A # -0x6C5D # -0x6C5E # 0x6C5F # 0x6C60 # -0x6C62 # -0x6C68 # -0x6C6A # 0x6C70 # -0x6C72 # -0x6C73 # 0x6C7A # 0x6C7D # -0x6C7E # -0x6C81 # -0x6C82 # 0x6C83 # 0x6C88 # -0x6C8C # -0x6C8D # -0x6C90 # -0x6C92 # -0x6C93 # 0x6C96 # 0x6C99 # -0x6C9A # -0x6C9B # 0x6CA1 # 0x6CA2 # -0x6CAB # -0x6CAE # -0x6CB1 # 0x6CB3 # 0x6CB8 # 0x6CB9 # -0x6CBA # 0x6CBB # 0x6CBC # -0x6CBD # -0x6CBE # 0x6CBF # 0x6CC1 # -0x6CC4 # -0x6CC5 # 0x6CC9 # 0x6CCA # 0x6CCC # -0x6CD3 # 0x6CD5 # -0x6CD7 # -0x6CD9 # -0x6CDB # -0x6CDD # 0x6CE1 # 0x6CE2 # 0x6CE3 # 0x6CE5 # 0x6CE8 # -0x6CEA # -0x6CEF # 0x6CF0 # -0x6CF1 # 0x6CF3 # 0x6D0B # -0x6D0C # -0x6D12 # 0x6D17 # -0x6D19 # -0x6D1B # 0x6D1E # -0x6D1F # 0x6D25 # -0x6D29 # 0x6D2A # -0x6D2B # -0x6D32 # -0x6D33 # -0x6D35 # -0x6D36 # -0x6D38 # 0x6D3B # -0x6D3D # 0x6D3E # 0x6D41 # 0x6D44 # 0x6D45 # -0x6D59 # -0x6D5A # 0x6D5C # -0x6D63 # -0x6D64 # 0x6D66 # -0x6D69 # 0x6D6A # -0x6D6C # 0x6D6E # 0x6D74 # 0x6D77 # 0x6D78 # -0x6D79 # -0x6D85 # 0x6D88 # -0x6D8C # -0x6D8E # -0x6D93 # -0x6D95 # 0x6D99 # -0x6D9B # -0x6D9C # 0x6DAF # 0x6DB2 # -0x6DB5 # -0x6DB8 # 0x6DBC # -0x6DC0 # -0x6DC5 # -0x6DC6 # -0x6DC7 # -0x6DCB # -0x6DCC # 0x6DD1 # -0x6DD2 # -0x6DD5 # -0x6DD8 # -0x6DD9 # -0x6DDE # 0x6DE1 # -0x6DE4 # -0x6DE6 # -0x6DE8 # -0x6DEA # 0x6DEB # -0x6DEC # -0x6DEE # 0x6DF1 # -0x6DF3 # -0x6DF5 # 0x6DF7 # -0x6DF9 # -0x6DFA # 0x6DFB # 0x6E05 # 0x6E07 # 0x6E08 # 0x6E09 # -0x6E0A # 0x6E0B # 0x6E13 # -0x6E15 # -0x6E19 # -0x6E1A # 0x6E1B # -0x6E1D # -0x6E1F # -0x6E20 # 0x6E21 # -0x6E23 # -0x6E24 # -0x6E25 # 0x6E26 # 0x6E29 # -0x6E2B # 0x6E2C # -0x6E2D # -0x6E2E # 0x6E2F # -0x6E38 # -0x6E3A # -0x6E3E # -0x6E43 # -0x6E4A # -0x6E4D # -0x6E4E # 0x6E56 # -0x6E58 # -0x6E5B # -0x6E5F # 0x6E67 # -0x6E6B # -0x6E6E # 0x6E6F # -0x6E72 # -0x6E76 # 0x6E7E # 0x6E7F # 0x6E80 # -0x6E82 # -0x6E8C # -0x6E8F # 0x6E90 # 0x6E96 # -0x6E98 # -0x6E9C # 0x6E9D # -0x6E9F # -0x6EA2 # -0x6EA5 # -0x6EAA # -0x6EAF # -0x6EB2 # 0x6EB6 # -0x6EB7 # 0x6EBA # -0x6EBD # -0x6EC2 # -0x6EC4 # 0x6EC5 # -0x6EC9 # 0x6ECB # -0x6ECC # 0x6ED1 # -0x6ED3 # -0x6ED4 # -0x6ED5 # 0x6EDD # 0x6EDE # -0x6EEC # -0x6EEF # -0x6EF2 # 0x6EF4 # -0x6EF7 # -0x6EF8 # -0x6EFE # -0x6EFF # 0x6F01 # 0x6F02 # 0x6F06 # -0x6F09 # 0x6F0F # -0x6F11 # -0x6F13 # 0x6F14 # -0x6F15 # 0x6F20 # 0x6F22 # -0x6F23 # 0x6F2B # 0x6F2C # -0x6F31 # -0x6F32 # 0x6F38 # -0x6F3E # -0x6F3F # -0x6F41 # -0x6F45 # 0x6F54 # -0x6F58 # -0x6F5B # 0x6F5C # 0x6F5F # 0x6F64 # -0x6F66 # -0x6F6D # 0x6F6E # -0x6F6F # 0x6F70 # -0x6F74 # -0x6F78 # -0x6F7A # -0x6F7C # -0x6F80 # -0x6F81 # -0x6F82 # 0x6F84 # -0x6F86 # -0x6F8E # -0x6F91 # -0x6F97 # -0x6FA1 # -0x6FA3 # -0x6FA4 # -0x6FAA # -0x6FB1 # -0x6FB3 # -0x6FB9 # 0x6FC0 # 0x6FC1 # -0x6FC2 # 0x6FC3 # -0x6FC6 # -0x6FD4 # -0x6FD5 # -0x6FD8 # -0x6FDB # -0x6FDF # -0x6FE0 # -0x6FE1 # -0x6FE4 # 0x6FEB # -0x6FEC # -0x6FEE # 0x6FEF # -0x6FF1 # -0x6FF3 # -0x6FF6 # -0x6FFA # -0x6FFE # -0x7001 # -0x7009 # -0x700B # -0x700F # -0x7011 # -0x7015 # -0x7018 # -0x701A # -0x701B # -0x701D # -0x701E # -0x701F # -0x7026 # -0x7027 # 0x702C # -0x7030 # -0x7032 # -0x703E # -0x704C # -0x7051 # -0x7058 # -0x7063 # 0x706B # 0x706F # 0x7070 # -0x7078 # -0x707C # 0x707D # 0x7089 # 0x708A # 0x708E # -0x7092 # -0x7099 # -0x70AC # 0x70AD # -0x70AE # -0x70AF # -0x70B3 # -0x70B8 # 0x70B9 # 0x70BA # 0x70C8 # -0x70CB # -0x70CF # -0x70D9 # -0x70DD # -0x70DF # -0x70F1 # -0x70F9 # -0x70FD # -0x7109 # -0x7114 # -0x7119 # -0x711A # -0x711C # 0x7121 # 0x7126 # 0x7136 # 0x713C # -0x7149 # -0x714C # 0x714E # -0x7155 # -0x7156 # 0x7159 # -0x7162 # -0x7164 # -0x7165 # -0x7166 # 0x7167 # 0x7169 # -0x716C # 0x716E # -0x717D # -0x7184 # -0x7188 # 0x718A # -0x718F # -0x7194 # -0x7195 # -#0x7199 # # not in kochi fonts 0x719F # -0x71A8 # -0x71AC # 0x71B1 # -0x71B9 # -0x71BE # 0x71C3 # -0x71C8 # -0x71C9 # -0x71CE # -0x71D0 # -0x71D2 # -0x71D4 # -0x71D5 # -0x71D7 # -0x71DF # -0x71E0 # 0x71E5 # -0x71E6 # -0x71E7 # -0x71EC # -0x71ED # -0x71EE # -0x71F5 # -0x71F9 # -0x71FB # -0x71FC # -0x71FF # 0x7206 # -0x720D # -0x7210 # -0x721B # -0x7228 # 0x722A # -0x722C # -0x722D # -0x7230 # -0x7232 # 0x7235 # 0x7236 # -0x723A # -0x723B # -0x723C # 0x723D # -0x723E # -0x723F # -0x7240 # -0x7246 # 0x7247 # 0x7248 # -0x724B # -0x724C # -0x7252 # -0x7258 # 0x7259 # 0x725B # -0x725D # -0x725F # -0x7261 # -0x7262 # 0x7267 # 0x7269 # 0x7272 # -0x7274 # 0x7279 # -0x727D # -0x727E # -0x7280 # -0x7281 # -0x7282 # -0x7287 # -0x7292 # -0x7296 # 0x72A0 # -0x72A2 # -0x72A7 # 0x72AC # 0x72AF # -0x72B2 # 0x72B6 # -0x72B9 # 0x72C2 # -0x72C3 # -0x72C4 # -0x72C6 # -0x72CE # -0x72D0 # -0x72D2 # -0x72D7 # 0x72D9 # -0x72DB # -0x72E0 # -0x72E1 # -0x72E2 # 0x72E9 # 0x72EC # 0x72ED # -0x72F7 # -0x72F8 # -0x72F9 # -0x72FC # -0x72FD # -0x730A # -0x7316 # -0x7317 # 0x731B # -0x731C # -0x731D # 0x731F # -0x7325 # -0x7329 # -0x732A # 0x732B # 0x732E # -0x732F # -0x7334 # 0x7336 # -0x7337 # -0x733E # 0x733F # 0x7344 # -0x7345 # -0x734E # -0x734F # -0x7357 # 0x7363 # -0x7368 # -0x736A # -0x7370 # 0x7372 # -0x7375 # -0x7378 # -0x737A # -0x737B # 0x7384 # 0x7387 # 0x7389 # 0x738B # -0x7396 # 0x73A9 # -0x73B2 # -0x73B3 # -0x73BB # -0x73C0 # -0x73C2 # -0x73C8 # -0x73CA # 0x73CD # -0x73CE # -0x73DE # 0x73E0 # -0x73E5 # -0x73EA # 0x73ED # -0x73EE # -0x73F1 # -0x73F8 # 0x73FE # 0x7403 # -0x7405 # 0x7406 # -0x7409 # -0x7422 # -0x7425 # -0x7432 # -0x7433 # 0x7434 # -0x7435 # -0x7436 # -0x743A # -0x743F # -0x7441 # -0x7455 # -0x7459 # -0x745A # -0x745B # -0x745C # -0x745E # -0x745F # 0x7460 # -0x7463 # -0x7464 # -0x7469 # -0x746A # -0x746F # -0x7470 # -0x7473 # -0x7476 # -0x747E # 0x7483 # -0x748B # -0x749E # -0x74A2 # 0x74A7 # 0x74B0 # 0x74BD # -0x74CA # -0x74CF # -0x74D4 # -0x74DC # -0x74E0 # -0x74E2 # -0x74E3 # 0x74E6 # -0x74E7 # -0x74E9 # -0x74EE # -0x74F0 # -0x74F1 # -0x74F2 # 0x74F6 # -0x74F7 # -0x74F8 # -0x7503 # -0x7504 # -0x7505 # -0x750C # -0x750D # -0x750E # -0x7511 # -0x7513 # -0x7515 # 0x7518 # 0x751A # -0x751C # -0x751E # 0x751F # 0x7523 # -0x7525 # -0x7526 # 0x7528 # -0x752B # -0x752C # 0x7530 # 0x7531 # 0x7532 # 0x7533 # 0x7537 # -0x7538 # 0x753A # 0x753B # -0x753C # -0x7544 # -0x7546 # -0x7549 # -0x754A # -0x754B # 0x754C # -0x754D # 0x754F # 0x7551 # 0x7554 # 0x7559 # -0x755A # -0x755B # 0x755C # 0x755D # -0x7560 # -0x7562 # -0x7564 # 0x7565 # -0x7566 # -0x7567 # -0x7569 # 0x756A # -0x756B # -0x756D # 0x7570 # 0x7573 # -0x7574 # -0x7576 # -0x7577 # -0x7578 # 0x757F # -0x7582 # -0x7586 # -0x7587 # -0x7589 # -0x758A # -0x758B # 0x758E # -0x758F # 0x7591 # -0x7594 # -0x759A # -0x759D # -0x75A3 # -0x75A5 # 0x75AB # -0x75B1 # 0x75B2 # -0x75B3 # -0x75B5 # -0x75B8 # -0x75B9 # -0x75BC # -0x75BD # 0x75BE # -0x75C2 # -0x75C3 # 0x75C5 # 0x75C7 # -0x75CA # -0x75CD # -0x75D2 # -0x75D4 # 0x75D5 # 0x75D8 # -0x75D9 # 0x75DB # -0x75DE # 0x75E2 # -0x75E3 # 0x75E9 # -0x75F0 # -0x75F2 # -0x75F3 # 0x75F4 # -0x75FA # -0x75FC # -0x75FE # -0x75FF # -0x7601 # -0x7609 # -0x760B # 0x760D # -0x761F # -0x7620 # -0x7621 # -0x7622 # -0x7624 # -0x7627 # -0x7630 # -0x7634 # -0x763B # 0x7642 # -0x7646 # -0x7647 # -0x7648 # -0x764C # 0x7652 # 0x7656 # -0x7658 # -0x765C # -0x7661 # -0x7662 # -0x7667 # -0x7668 # -0x7669 # -0x766A # -0x766C # -0x7670 # -0x7672 # -0x7676 # -0x7678 # 0x767A # 0x767B # -0x767C # 0x767D # 0x767E # -0x7680 # -0x7683 # 0x7684 # 0x7686 # 0x7687 # -0x7688 # -0x768B # -0x768E # -0x7690 # -0x7693 # -0x7696 # -0x7699 # -0x769A # 0x76AE # -0x76B0 # -0x76B4 # -0x76B7 # -0x76B8 # -0x76B9 # -0x76BA # 0x76BF # -0x76C2 # -0x76C3 # 0x76C6 # -0x76C8 # 0x76CA # -0x76CD # -0x76D2 # -0x76D6 # 0x76D7 # 0x76DB # -0x76DC # -0x76DE # 0x76DF # -0x76E1 # 0x76E3 # 0x76E4 # -0x76E5 # -0x76E7 # -0x76EA # 0x76EE # 0x76F2 # 0x76F4 # 0x76F8 # -0x76FB # 0x76FE # 0x7701 # -0x7704 # -0x7707 # -0x7708 # 0x7709 # 0x770B # 0x770C # -0x771B # -0x771E # 0x771F # 0x7720 # -0x7724 # -0x7725 # -0x7726 # -0x7729 # -0x7737 # -0x7738 # 0x773A # 0x773C # 0x7740 # -0x7747 # -0x775A # -0x775B # 0x7761 # 0x7763 # -0x7765 # 0x7766 # -0x7768 # -0x776B # -0x7779 # -0x777E # -0x777F # -0x778B # -0x778E # -0x7791 # -0x779E # -0x77A0 # -0x77A5 # 0x77AC # 0x77AD # -0x77B0 # 0x77B3 # -0x77B6 # -0x77B9 # -0x77BB # -0x77BC # -0x77BD # -0x77BF # -0x77C7 # -0x77CD # -0x77D7 # -0x77DA # 0x77DB # -0x77DC # 0x77E2 # -0x77E3 # 0x77E5 # -0x77E7 # -0x77E9 # 0x77ED # -0x77EE # 0x77EF # 0x77F3 # -0x77FC # 0x7802 # -0x780C # -0x7812 # 0x7814 # 0x7815 # -0x7820 # -0x7825 # -0x7826 # -0x7827 # 0x7832 # 0x7834 # -0x783A # -0x783F # -0x7845 # 0x785D # 0x786B # 0x786C # -0x786F # -0x7872 # -0x7874 # -0x787C # 0x7881 # -0x7886 # -0x7887 # -0x788C # -0x788D # -0x788E # 0x7891 # -0x7893 # -0x7895 # -0x7897 # -0x789A # -0x78A3 # -0x78A7 # -0x78A9 # -0x78AA # -0x78AF # -0x78B5 # 0x78BA # -0x78BC # -0x78BE # 0x78C1 # -0x78C5 # -0x78C6 # -0x78CA # -0x78CB # -0x78D0 # -0x78D1 # -0x78D4 # -0x78DA # -0x78E7 # 0x78E8 # -0x78EC # -0x78EF # -0x78F4 # -0x78FD # 0x7901 # -0x7907 # 0x790E # -0x7911 # -0x7912 # -0x7919 # -0x7926 # -0x792A # -0x792B # -0x792C # 0x793A # 0x793C # 0x793E # -0x7940 # -0x7941 # -0x7947 # 0x7948 # 0x7949 # -0x7950 # -0x7953 # -0x7955 # 0x7956 # -0x7957 # -0x795A # 0x795D # 0x795E # -0x795F # -0x7960 # -0x7962 # 0x7965 # 0x7968 # 0x796D # -0x7977 # -0x797A # -0x797F # -0x7980 # 0x7981 # -0x7984 # 0x7985 # -0x798A # 0x798D # -0x798E # 0x798F # -0x799D # -0x79A6 # -0x79A7 # -0x79AA # -0x79AE # -0x79B0 # -0x79B3 # -0x79B9 # -0x79BA # -0x79BD # -0x79BE # -0x79BF # 0x79C0 # 0x79C1 # -0x79C9 # 0x79CB # 0x79D1 # 0x79D2 # -0x79D5 # 0x79D8 # 0x79DF # -0x79E1 # -0x79E3 # -0x79E4 # -0x79E6 # -0x79E7 # 0x79E9 # -0x79EC # 0x79F0 # 0x79FB # -0x7A00 # -0x7A08 # 0x7A0B # -0x7A0D # 0x7A0E # -0x7A14 # -0x7A17 # -0x7A18 # -0x7A19 # 0x7A1A # -0x7A1C # -0x7A1F # -0x7A20 # 0x7A2E # -0x7A31 # 0x7A32 # -0x7A37 # -0x7A3B # 0x7A3C # 0x7A3D # -0x7A3E # 0x7A3F # 0x7A40 # 0x7A42 # -0x7A43 # -0x7A46 # -0x7A49 # 0x7A4D # -0x7A4E # 0x7A4F # -0x7A50 # -0x7A57 # -0x7A61 # -0x7A62 # -0x7A63 # -0x7A69 # 0x7A6B # -0x7A70 # 0x7A74 # 0x7A76 # -0x7A79 # 0x7A7A # -0x7A7D # -0x7A7F # 0x7A81 # 0x7A83 # -0x7A84 # -0x7A88 # 0x7A92 # 0x7A93 # -0x7A95 # -0x7A96 # -0x7A97 # -0x7A98 # 0x7A9F # -0x7AA9 # -0x7AAA # 0x7AAE # 0x7AAF # -0x7AB0 # -0x7AB6 # -0x7ABA # -0x7ABF # -0x7AC3 # -0x7AC4 # -0x7AC5 # -0x7AC7 # -0x7AC8 # -0x7ACA # 0x7ACB # -0x7ACD # -0x7ACF # -0x7AD2 # -0x7AD3 # -0x7AD5 # -0x7AD9 # -0x7ADA # 0x7ADC # -0x7ADD # -0x7ADF # 0x7AE0 # -0x7AE1 # -0x7AE2 # -0x7AE3 # 0x7AE5 # -0x7AE6 # -0x7AEA # -0x7AED # 0x7AEF # -0x7AF0 # 0x7AF6 # -0x7AF8 # 0x7AF9 # -0x7AFA # -0x7AFF # -0x7B02 # -0x7B04 # -0x7B06 # -0x7B08 # -0x7B0A # -0x7B0B # -0x7B0F # 0x7B11 # -0x7B18 # -0x7B19 # 0x7B1B # -0x7B1E # -0x7B20 # -0x7B25 # 0x7B26 # -0x7B28 # 0x7B2C # -0x7B33 # -0x7B35 # -0x7B36 # -0x7B39 # -0x7B45 # 0x7B46 # -0x7B48 # 0x7B49 # 0x7B4B # -0x7B4C # -0x7B4D # -0x7B4F # -0x7B50 # -0x7B51 # 0x7B52 # 0x7B54 # 0x7B56 # -0x7B5D # -0x7B65 # -0x7B67 # -0x7B6C # -0x7B6E # -0x7B70 # -0x7B71 # -0x7B74 # -0x7B75 # -0x7B7A # -0x7B86 # 0x7B87 # 0x7B8B # -0x7B8D # -0x7B8F # -0x7B92 # -0x7B94 # -0x7B95 # 0x7B97 # -0x7B98 # -0x7B99 # -0x7B9A # -0x7B9C # -0x7B9D # -0x7B9F # 0x7BA1 # -0x7BAA # -0x7BAD # 0x7BB1 # -0x7BB4 # 0x7BB8 # 0x7BC0 # -0x7BC1 # 0x7BC4 # -0x7BC6 # -0x7BC7 # 0x7BC9 # -0x7BCB # -0x7BCC # -0x7BCF # -0x7BDD # -0x7BE0 # 0x7BE4 # -0x7BE5 # -0x7BE6 # -0x7BE9 # -0x7BED # -0x7BF3 # -0x7BF6 # -0x7BF7 # -0x7C00 # -0x7C07 # -0x7C0D # -0x7C11 # -0x7C12 # -0x7C13 # -0x7C14 # -0x7C17 # -0x7C1F # 0x7C21 # -0x7C23 # -0x7C27 # -0x7C2A # -0x7C2B # -0x7C37 # -0x7C38 # -0x7C3D # -0x7C3E # 0x7C3F # -0x7C40 # -0x7C43 # -0x7C4C # 0x7C4D # -0x7C4F # -0x7C50 # -0x7C54 # -0x7C56 # -0x7C58 # -0x7C5F # 0x7C60 # -0x7C64 # -0x7C65 # -0x7C6C # 0x7C73 # -0x7C75 # -0x7C7E # -0x7C81 # -0x7C82 # -0x7C83 # 0x7C89 # 0x7C8B # -0x7C8D # -0x7C90 # 0x7C92 # -0x7C95 # 0x7C97 # 0x7C98 # 0x7C9B # -0x7C9F # -0x7CA1 # -0x7CA2 # -0x7CA4 # -0x7CA5 # 0x7CA7 # -0x7CA8 # -0x7CAB # -0x7CAD # -0x7CAE # -0x7CB1 # -0x7CB2 # -0x7CB3 # -0x7CB9 # -0x7CBD # 0x7CBE # -0x7CC0 # -0x7CC2 # -0x7CC5 # -0x7CCA # -0x7CCE # -0x7CD2 # 0x7CD6 # -0x7CD8 # -0x7CDC # -0x7CDE # -0x7CDF # -0x7CE0 # -0x7CE2 # 0x7CE7 # -0x7CEF # -0x7CF2 # -0x7CF4 # -0x7CF6 # 0x7CF8 # -0x7CFA # 0x7CFB # 0x7CFE # 0x7D00 # -0x7D02 # 0x7D04 # 0x7D05 # -0x7D06 # -0x7D0A # 0x7D0B # 0x7D0D # -0x7D10 # 0x7D14 # -0x7D15 # -0x7D17 # -0x7D18 # 0x7D19 # 0x7D1A # 0x7D1B # -0x7D1C # 0x7D20 # 0x7D21 # 0x7D22 # 0x7D2B # -0x7D2C # -0x7D2E # 0x7D2F # 0x7D30 # -0x7D32 # 0x7D33 # -0x7D35 # 0x7D39 # 0x7D3A # -0x7D3F # 0x7D42 # -0x7D43 # 0x7D44 # -0x7D45 # -0x7D46 # -0x7D4B # 0x7D4C # -0x7D4E # -0x7D4F # 0x7D50 # -0x7D56 # -0x7D5B # 0x7D5E # 0x7D61 # -0x7D62 # -0x7D63 # 0x7D66 # -0x7D68 # -0x7D6E # 0x7D71 # -0x7D72 # -0x7D73 # 0x7D75 # 0x7D76 # 0x7D79 # -0x7D7D # -0x7D89 # -0x7D8F # -0x7D93 # 0x7D99 # 0x7D9A # -0x7D9B # -0x7D9C # -0x7D9F # -0x7DA2 # -0x7DA3 # -0x7DAB # -0x7DAC # 0x7DAD # -0x7DAE # -0x7DAF # -0x7DB0 # 0x7DB1 # 0x7DB2 # -0x7DB4 # -0x7DB5 # -0x7DB8 # -0x7DBA # 0x7DBB # -0x7DBD # -0x7DBE # 0x7DBF # -0x7DC7 # 0x7DCA # -0x7DCB # 0x7DCF # 0x7DD1 # 0x7DD2 # -0x7DD5 # -0x7DD8 # 0x7DDA # -0x7DDC # -0x7DDD # -0x7DDE # 0x7DE0 # -0x7DE1 # -0x7DE4 # 0x7DE8 # 0x7DE9 # -0x7DEC # 0x7DEF # -0x7DF2 # 0x7DF4 # 0x7DFB # 0x7E01 # 0x7E04 # -0x7E05 # -0x7E09 # -0x7E0A # -0x7E0B # -0x7E12 # 0x7E1B # -0x7E1E # -0x7E1F # -0x7E21 # -0x7E22 # -0x7E23 # 0x7E26 # 0x7E2B # 0x7E2E # -0x7E31 # -0x7E32 # -0x7E35 # -0x7E37 # -0x7E39 # -0x7E3A # -0x7E3B # -0x7E3D # 0x7E3E # 0x7E41 # -0x7E43 # -0x7E46 # 0x7E4A # -0x7E4B # -0x7E4D # 0x7E54 # 0x7E55 # -0x7E56 # -0x7E59 # -0x7E5A # -0x7E5D # -0x7E5E # -0x7E66 # -0x7E67 # -0x7E69 # -0x7E6A # 0x7E6D # 0x7E70 # -0x7E79 # -0x7E7B # -0x7E7C # -0x7E7D # -0x7E7F # -0x7E82 # -0x7E83 # -0x7E88 # -0x7E89 # -0x7E8C # -0x7E8E # -0x7E8F # -0x7E90 # -0x7E92 # -0x7E93 # -0x7E94 # -0x7E96 # -0x7E9B # -0x7E9C # 0x7F36 # -0x7F38 # -0x7F3A # -0x7F45 # -0x7F4C # -0x7F4D # -0x7F4E # -0x7F50 # -0x7F51 # -0x7F54 # -0x7F55 # -0x7F58 # -0x7F5F # -0x7F60 # -0x7F67 # -0x7F68 # -0x7F69 # 0x7F6A # -0x7F6B # 0x7F6E # 0x7F70 # 0x7F72 # 0x7F75 # 0x7F77 # -0x7F78 # -0x7F79 # -0x7F82 # -0x7F83 # 0x7F85 # -0x7F86 # -0x7F87 # -0x7F88 # 0x7F8A # -0x7F8C # 0x7F8E # -0x7F94 # -0x7F9A # -0x7F9D # 0x7F9E # -0x7FA3 # 0x7FA4 # 0x7FA8 # 0x7FA9 # -0x7FAE # -0x7FAF # -0x7FB2 # -0x7FB6 # -0x7FB8 # -0x7FB9 # 0x7FBD # 0x7FC1 # -0x7FC5 # -0x7FC6 # -0x7FCA # 0x7FCC # 0x7FD2 # -0x7FD4 # -0x7FD5 # -0x7FE0 # -0x7FE1 # -0x7FE6 # -0x7FE9 # -0x7FEB # -0x7FF0 # -0x7FF3 # -0x7FF9 # 0x7FFB # 0x7FFC # -0x8000 # 0x8001 # 0x8003 # -0x8004 # 0x8005 # -0x8006 # -0x800B # -0x800C # 0x8010 # -0x8012 # 0x8015 # 0x8017 # -0x8018 # -0x8019 # -0x801C # -0x8021 # -0x8028 # 0x8033 # -0x8036 # -0x803B # -0x803D # -0x803F # -0x8046 # -0x804A # -0x8052 # 0x8056 # -0x8058 # -0x805A # 0x805E # -0x805F # -0x8061 # -0x8062 # -0x8068 # -0x806F # -0x8070 # -0x8072 # -0x8073 # 0x8074 # -0x8076 # 0x8077 # -0x8079 # -0x807D # -0x807E # -0x807F # -0x8084 # -0x8085 # -0x8086 # -0x8087 # 0x8089 # -0x808B # 0x808C # -0x8093 # 0x8096 # 0x8098 # -0x809A # -0x809B # 0x809D # 0x80A1 # 0x80A2 # 0x80A5 # 0x80A9 # 0x80AA # -0x80AC # -0x80AD # 0x80AF # -0x80B1 # 0x80B2 # -0x80B4 # 0x80BA # 0x80C3 # -0x80C4 # 0x80C6 # 0x80CC # 0x80CE # -0x80D6 # -0x80D9 # -0x80DA # -0x80DB # -0x80DD # 0x80DE # -0x80E1 # -0x80E4 # -0x80E5 # -0x80EF # -0x80F1 # 0x80F4 # 0x80F8 # -0x80FC # 0x80FD # 0x8102 # 0x8105 # -0x8106 # 0x8107 # 0x8108 # -0x8109 # 0x810A # 0x811A # -0x811B # -0x8123 # -0x8129 # -0x812F # 0x8131 # 0x8133 # -0x8139 # -0x813E # -0x8146 # -0x814B # 0x814E # 0x8150 # -0x8151 # -0x8153 # -0x8154 # 0x8155 # -0x815F # -0x8165 # -0x8166 # 0x816B # -0x816E # 0x8170 # -0x8171 # -0x8174 # 0x8178 # 0x8179 # 0x817A # -0x817F # -0x8180 # -0x8182 # -0x8183 # -0x8188 # -0x818A # -0x818F # -0x8193 # -0x8195 # 0x819A # 0x819C # 0x819D # -0x81A0 # -0x81A3 # -0x81A4 # 0x81A8 # -0x81A9 # -0x81B0 # 0x81B3 # -0x81B5 # -0x81B8 # -0x81BA # -0x81BD # -0x81BE # -0x81BF # -0x81C0 # -0x81C2 # 0x81C6 # -0x81C8 # -0x81C9 # -0x81CD # -0x81D1 # 0x81D3 # -0x81D8 # -0x81D9 # -0x81DA # -0x81DF # -0x81E0 # 0x81E3 # -0x81E5 # -0x81E7 # 0x81E8 # 0x81EA # 0x81ED # 0x81F3 # 0x81F4 # -0x81FA # -0x81FB # 0x81FC # -0x81FE # -0x8201 # -0x8202 # -0x8205 # -0x8207 # 0x8208 # -0x8209 # -0x820A # 0x820C # -0x820D # 0x820E # -0x8210 # -0x8212 # -0x8216 # 0x8217 # -0x8218 # -0x821B # -0x821C # 0x821E # 0x821F # -0x8229 # 0x822A # -0x822B # 0x822C # -0x822E # -0x8233 # -0x8235 # 0x8236 # 0x8237 # -0x8238 # 0x8239 # -0x8240 # 0x8247 # -0x8258 # -0x8259 # -0x825A # -0x825D # -0x825F # -0x8262 # -0x8264 # 0x8266 # -0x8268 # -0x826A # -0x826B # -0x826E # 0x826F # -0x8271 # 0x8272 # 0x8276 # -0x8277 # -0x8278 # -0x827E # 0x828B # -0x828D # -0x8292 # -0x8299 # 0x829D # -0x829F # -0x82A5 # -0x82A6 # -0x82AB # -0x82AC # -0x82AD # 0x82AF # 0x82B1 # 0x82B3 # 0x82B8 # -0x82B9 # -0x82BB # 0x82BD # -0x82C5 # -0x82D1 # -0x82D2 # -0x82D3 # -0x82D4 # 0x82D7 # -0x82D9 # 0x82DB # -0x82DC # -0x82DE # -0x82DF # -0x82E1 # -0x82E3 # 0x82E5 # 0x82E6 # -0x82E7 # -0x82EB # 0x82F1 # -0x82F3 # -0x82F4 # -0x82F9 # -0x82FA # -0x82FB # 0x8302 # -0x8303 # -0x8304 # -0x8305 # -0x8306 # -0x8309 # 0x830E # -0x8316 # -0x8317 # -0x8318 # -0x831C # -0x8323 # 0x8328 # -0x832B # -0x832F # -0x8331 # -0x8332 # -0x8334 # -0x8335 # 0x8336 # -0x8338 # -0x8339 # -0x8340 # -0x8345 # 0x8349 # -0x834A # -0x834F # -0x8350 # 0x8352 # 0x8358 # -0x8373 # -0x8375 # 0x8377 # -0x837B # -0x837C # -0x8385 # -0x8387 # -0x8389 # -0x838A # -0x838E # -0x8393 # -0x8396 # -0x839A # -0x839E # -0x839F # -0x83A0 # -0x83A2 # -0x83A8 # -0x83AA # -0x83AB # -0x83B1 # -0x83B5 # -0x83BD # -0x83C1 # -0x83C5 # 0x83CA # 0x83CC # -0x83CE # 0x83D3 # -0x83D6 # -0x83D8 # 0x83DC # -0x83DF # -0x83E0 # -0x83E9 # -0x83EB # 0x83EF # -0x83F0 # -0x83F1 # -0x83F2 # -0x83F4 # -0x83F7 # -0x83FB # -0x83FD # -0x8403 # -0x8404 # -0x8407 # -0x840B # -0x840C # -0x840D # 0x840E # -0x8413 # -0x8420 # -0x8422 # -0x8429 # -0x842A # -0x842C # -0x8431 # -0x8435 # -0x8438 # -0x843C # 0x843D # -0x8446 # 0x8449 # -0x844E # 0x8457 # 0x845B # -0x8461 # -0x8462 # -0x8463 # -0x8466 # -0x8469 # -0x846B # 0x846C # -0x846D # -0x846E # -0x846F # -0x8471 # -0x8475 # -0x8477 # -0x8479 # -0x847A # -0x8482 # -0x8484 # -0x848B # -0x8490 # -0x8494 # -0x8499 # -0x849C # -0x849F # -0x84A1 # -0x84AD # -0x84B2 # 0x84B8 # -0x84B9 # -0x84BB # -0x84BC # -0x84BF # -0x84C1 # 0x84C4 # -0x84C6 # -0x84C9 # -0x84CA # 0x84CB # -0x84CD # -0x84D0 # -0x84D1 # -0x84D6 # -0x84D9 # -0x84DA # -0x84EC # -0x84EE # -0x84F4 # -0x84FC # -0x84FF # -0x8500 # -0x8506 # 0x8511 # -0x8513 # -0x8514 # -0x8515 # -0x8517 # -0x8518 # -0x851A # -0x851F # -0x8521 # -0x8526 # -0x852C # -0x852D # 0x8535 # 0x853D # -0x8540 # -0x8541 # -0x8543 # -0x8548 # -0x8549 # -0x854A # -0x854B # -0x854E # -0x8555 # -0x8557 # -0x8558 # -0x855A # -0x8563 # -0x8568 # -0x8569 # -0x856A # -0x856D # -0x8577 # -0x857E # -0x8580 # 0x8584 # -0x8587 # -0x8588 # -0x858A # -0x8590 # -0x8591 # -0x8594 # -0x8597 # -0x8599 # -0x859B # -0x859C # -0x85A4 # 0x85A6 # -0x85A8 # -0x85A9 # 0x85AA # 0x85AB # 0x85AC # -0x85AE # -0x85AF # -0x85B9 # -0x85BA # -0x85C1 # -0x85C9 # 0x85CD # -0x85CF # -0x85D0 # -0x85D5 # -0x85DC # -0x85DD # 0x85E4 # -0x85E5 # 0x85E9 # -0x85EA # -0x85F7 # -0x85F9 # -0x85FA # 0x85FB # -0x85FE # -0x8602 # -0x8606 # -0x8607 # -0x860A # -0x860B # -0x8613 # -0x8616 # -0x8617 # -0x861A # -0x8622 # -0x862D # -0x862F # -0x8630 # -0x863F # -0x864D # 0x864E # 0x8650 # -0x8654 # -0x8655 # 0x865A # 0x865C # 0x865E # -0x865F # -0x8667 # 0x866B # -0x8671 # 0x8679 # -0x867B # 0x868A # -0x868B # -0x868C # -0x8693 # 0x8695 # -0x86A3 # -0x86A4 # -0x86A9 # -0x86AA # -0x86AB # -0x86AF # -0x86B0 # -0x86B6 # -0x86C4 # -0x86C6 # 0x86C7 # -0x86C9 # -0x86CB # 0x86CD # -0x86CE # -0x86D4 # -0x86D9 # -0x86DB # -0x86DE # -0x86DF # -0x86E4 # -0x86E9 # -0x86EC # -0x86ED # 0x86EE # -0x86EF # -0x86F8 # -0x86F9 # -0x86FB # -0x86FE # -0x8700 # 0x8702 # -0x8703 # -0x8706 # -0x8708 # -0x8709 # -0x870A # -0x870D # -0x8711 # -0x8712 # -0x8718 # -0x871A # 0x871C # -0x8725 # -0x8729 # -0x8734 # -0x8737 # -0x873B # -0x873F # -0x8749 # -0x874B # -0x874C # -0x874E # -0x8753 # -0x8755 # -0x8757 # -0x8759 # -0x875F # -0x8760 # -0x8763 # -0x8766 # -0x8768 # -0x876A # -0x876E # -0x8774 # -0x8776 # -0x8778 # -0x877F # -0x8782 # 0x878D # -0x879F # -0x87A2 # -0x87AB # -0x87AF # -0x87B3 # -0x87BA # -0x87BB # -0x87BD # -0x87C0 # -0x87C4 # -0x87C6 # -0x87C7 # -0x87CB # -0x87D0 # -0x87D2 # -0x87E0 # -0x87EF # -0x87F2 # -0x87F6 # -0x87F7 # -0x87F9 # -0x87FB # -0x87FE # -0x8805 # -0x880D # -0x880E # -0x880F # -0x8811 # -0x8815 # -0x8816 # -0x8821 # -0x8822 # -0x8823 # -0x8827 # -0x8831 # -0x8836 # -0x8839 # -0x883B # 0x8840 # -0x8842 # -0x8844 # 0x8846 # 0x884C # -0x884D # -0x8852 # 0x8853 # 0x8857 # -0x8859 # 0x885B # 0x885D # -0x885E # 0x8861 # -0x8862 # 0x8863 # 0x8868 # -0x886B # 0x8870 # -0x8872 # -0x8875 # 0x8877 # -0x887D # -0x887E # -0x887F # -0x8881 # -0x8882 # -0x8888 # 0x888B # -0x888D # -0x8892 # 0x8896 # -0x8897 # -0x8899 # -0x889E # -0x88A2 # -0x88A4 # 0x88AB # -0x88AE # -0x88B0 # -0x88B1 # -0x88B4 # -0x88B5 # -0x88B7 # -0x88BF # 0x88C1 # 0x88C2 # -0x88C3 # -0x88C4 # 0x88C5 # 0x88CF # -0x88D4 # 0x88D5 # -0x88D8 # -0x88D9 # 0x88DC # -0x88DD # -0x88DF # -0x88E1 # -0x88E8 # -0x88F2 # -0x88F3 # -0x88F4 # 0x88F8 # -0x88F9 # -0x88FC # 0x88FD # 0x88FE # -0x8902 # -0x8904 # 0x8907 # -0x890A # -0x890C # 0x8910 # 0x8912 # -0x8913 # -0x891D # -0x891E # -0x8925 # -0x892A # -0x892B # -0x8936 # -0x8938 # -0x893B # -0x8941 # -0x8943 # -0x8944 # -0x894C # -0x894D # -0x8956 # -0x895E # 0x895F # -0x8960 # -0x8964 # -0x8966 # -0x896A # -0x896D # -0x896F # 0x8972 # -0x8974 # -0x8977 # -0x897E # 0x897F # 0x8981 # -0x8983 # 0x8986 # 0x8987 # -0x8988 # -0x898A # 0x898B # 0x898F # -0x8993 # 0x8996 # -0x8997 # -0x8998 # 0x899A # -0x89A1 # -0x89A6 # 0x89A7 # -0x89A9 # 0x89AA # -0x89AC # -0x89AF # -0x89B2 # 0x89B3 # -0x89BA # -0x89BD # -0x89BF # -0x89C0 # 0x89D2 # -0x89DA # -0x89DC # -0x89DD # 0x89E3 # 0x89E6 # -0x89E7 # -0x89F4 # -0x89F8 # 0x8A00 # 0x8A02 # 0x8A03 # 0x8A08 # -0x8A0A # -0x8A0C # 0x8A0E # -0x8A10 # 0x8A13 # -0x8A16 # 0x8A17 # 0x8A18 # -0x8A1B # -0x8A1D # 0x8A1F # -0x8A23 # -0x8A25 # 0x8A2A # 0x8A2D # 0x8A31 # 0x8A33 # 0x8A34 # -0x8A36 # 0x8A3A # -0x8A3B # 0x8A3C # -0x8A41 # -0x8A46 # -0x8A48 # 0x8A50 # -0x8A51 # -0x8A52 # 0x8A54 # 0x8A55 # -0x8A5B # 0x8A5E # 0x8A60 # -0x8A62 # 0x8A63 # 0x8A66 # 0x8A69 # -0x8A6B # -0x8A6C # -0x8A6D # 0x8A6E # 0x8A70 # 0x8A71 # 0x8A72 # 0x8A73 # -0x8A7C # -0x8A82 # -0x8A84 # -0x8A85 # 0x8A87 # 0x8A89 # 0x8A8C # 0x8A8D # -0x8A91 # 0x8A93 # 0x8A95 # 0x8A98 # -0x8A9A # 0x8A9E # 0x8AA0 # -0x8AA1 # -0x8AA3 # 0x8AA4 # -0x8AA5 # -0x8AA6 # -0x8AA8 # 0x8AAC # 0x8AAD # 0x8AB0 # 0x8AB2 # -0x8AB9 # -0x8ABC # 0x8ABF # -0x8AC2 # -0x8AC4 # 0x8AC7 # 0x8ACB # -0x8ACC # -0x8ACD # -0x8ACF # -0x8AD2 # 0x8AD6 # -0x8ADA # -0x8ADB # -0x8ADC # -0x8ADE # -0x8AE0 # -0x8AE1 # -0x8AE2 # -0x8AE4 # 0x8AE6 # 0x8AE7 # -0x8AEB # 0x8AED # 0x8AEE # -0x8AF1 # -0x8AF3 # -0x8AF7 # 0x8AF8 # -0x8AFA # 0x8AFE # 0x8B00 # 0x8B01 # -0x8B02 # 0x8B04 # -0x8B07 # -0x8B0C # 0x8B0E # -0x8B10 # -0x8B14 # -0x8B16 # -0x8B17 # 0x8B19 # -0x8B1A # 0x8B1B # 0x8B1D # -0x8B20 # 0x8B21 # -0x8B26 # -0x8B28 # -0x8B2B # -0x8B2C # -0x8B33 # 0x8B39 # -0x8B3E # -0x8B41 # -0x8B49 # -0x8B4C # -0x8B4E # -0x8B4F # -0x8B56 # 0x8B58 # -0x8B5A # -0x8B5B # 0x8B5C # -0x8B5F # 0x8B66 # -0x8B6B # -0x8B6C # -0x8B6F # 0x8B70 # -0x8B71 # 0x8B72 # -0x8B74 # 0x8B77 # -0x8B7D # -0x8B80 # -0x8B83 # -0x8B8A # -0x8B8C # -0x8B8E # -0x8B90 # -0x8B92 # -0x8B93 # -0x8B96 # -0x8B99 # -0x8B9A # 0x8C37 # -0x8C3A # -0x8C3F # -0x8C41 # 0x8C46 # -0x8C48 # 0x8C4A # -0x8C4C # -0x8C4E # -0x8C50 # -0x8C55 # 0x8C5A # 0x8C61 # -0x8C62 # 0x8C6A # -0x8C6B # -0x8C6C # -0x8C78 # -0x8C79 # -0x8C7A # -0x8C7C # -0x8C82 # -0x8C85 # -0x8C89 # -0x8C8A # 0x8C8C # -0x8C8D # -0x8C8E # -0x8C94 # -0x8C98 # 0x8C9D # 0x8C9E # 0x8CA0 # @@ -5348,1218 +2008,338 @@ 0x8CAA # 0x8CAB # 0x8CAC # -0x8CAD # -0x8CAE # 0x8CAF # -0x8CB0 # -0x8CB2 # -0x8CB3 # 0x8CB4 # -0x8CB6 # 0x8CB7 # 0x8CB8 # 0x8CBB # 0x8CBC # -0x8CBD # 0x8CBF # 0x8CC0 # -0x8CC1 # 0x8CC2 # 0x8CC3 # 0x8CC4 # 0x8CC7 # -0x8CC8 # 0x8CCA # -0x8CCD # -0x8CCE # -0x8CD1 # 0x8CD3 # -0x8CDA # 0x8CDB # 0x8CDC # 0x8CDE # 0x8CE0 # 0x8CE2 # -0x8CE3 # -0x8CE4 # 0x8CE6 # 0x8CEA # 0x8CED # -0x8CFA # -0x8CFB # 0x8CFC # -0x8CFD # -0x8D04 # -0x8D05 # -0x8D07 # 0x8D08 # -0x8D0A # -0x8D0B # -0x8D0D # -0x8D0F # -0x8D10 # -0x8D13 # -0x8D14 # -0x8D16 # 0x8D64 # 0x8D66 # -0x8D67 # -0x8D6B # -0x8D6D # 0x8D70 # -0x8D71 # -0x8D73 # 0x8D74 # 0x8D77 # -0x8D81 # 0x8D85 # 0x8D8A # -0x8D99 # 0x8DA3 # -0x8DA8 # 0x8DB3 # -0x8DBA # -0x8DBE # -0x8DC2 # -0x8DCB # -0x8DCC # -0x8DCF # -0x8DD6 # -0x8DDA # -0x8DDB # 0x8DDD # -0x8DDF # 0x8DE1 # -0x8DE3 # -0x8DE8 # -0x8DEA # -0x8DEB # 0x8DEF # 0x8DF3 # 0x8DF5 # -0x8DFC # -0x8DFF # -0x8E08 # -0x8E09 # 0x8E0A # 0x8E0F # -0x8E10 # -0x8E1D # -0x8E1E # -0x8E1F # 0x8E2A # -0x8E30 # -0x8E34 # -0x8E35 # -0x8E42 # -0x8E44 # -0x8E47 # -0x8E48 # -0x8E49 # -0x8E4A # -0x8E4C # -0x8E50 # -0x8E55 # -0x8E59 # -0x8E5F # -0x8E60 # -0x8E63 # -0x8E64 # -0x8E72 # 0x8E74 # -0x8E76 # -0x8E7C # -0x8E81 # -0x8E84 # -0x8E85 # -0x8E87 # -0x8E8A # -0x8E8B # 0x8E8D # -0x8E91 # -0x8E93 # -0x8E94 # -0x8E99 # -0x8EA1 # -0x8EAA # 0x8EAB # -0x8EAC # -0x8EAF # -0x8EB0 # -0x8EB1 # -0x8EBE # -0x8EC5 # -0x8EC6 # -0x8EC8 # 0x8ECA # -0x8ECB # 0x8ECC # 0x8ECD # 0x8ED2 # -0x8EDB # 0x8EDF # 0x8EE2 # -0x8EE3 # -0x8EEB # 0x8EF8 # -0x8EFB # -0x8EFC # 0x8EFD # -0x8EFE # 0x8F03 # -0x8F05 # 0x8F09 # -0x8F0A # -0x8F0C # -0x8F12 # -0x8F13 # -0x8F14 # -0x8F15 # -0x8F19 # -0x8F1B # -0x8F1C # 0x8F1D # -0x8F1F # -0x8F26 # 0x8F29 # 0x8F2A # -0x8F2F # -0x8F33 # 0x8F38 # -0x8F39 # -0x8F3B # -0x8F3E # -0x8F3F # -0x8F42 # 0x8F44 # -0x8F45 # -0x8F46 # -0x8F49 # -0x8F4C # -0x8F4D # -0x8F4E # -0x8F57 # -0x8F5C # -0x8F5F # -0x8F61 # -0x8F62 # -0x8F63 # -0x8F64 # 0x8F9B # -0x8F9C # 0x8F9E # -0x8F9F # 0x8FA3 # -0x8FA7 # -0x8FA8 # -0x8FAD # -0x8FAE # -0x8FAF # -0x8FB0 # 0x8FB1 # 0x8FB2 # -0x8FB7 # 0x8FBA # -0x8FBB # 0x8FBC # -0x8FBF # -0x8FC2 # -0x8FC4 # 0x8FC5 # 0x8FCE # 0x8FD1 # 0x8FD4 # -0x8FDA # -0x8FE2 # -0x8FE5 # -0x8FE6 # -0x8FE9 # -0x8FEA # 0x8FEB # 0x8FED # -0x8FEF # 0x8FF0 # -0x8FF4 # 0x8FF7 # -0x8FF8 # -0x8FF9 # -0x8FFA # 0x8FFD # 0x9000 # 0x9001 # 0x9003 # -0x9005 # 0x9006 # -0x900B # -0x900D # -0x900E # 0x900F # 0x9010 # -0x9011 # 0x9013 # 0x9014 # -0x9015 # -0x9016 # -0x9017 # -0x9019 # 0x901A # 0x901D # -0x901E # 0x901F # 0x9020 # -0x9021 # -0x9022 # 0x9023 # -0x9027 # 0x902E # 0x9031 # 0x9032 # -0x9035 # -0x9036 # 0x9038 # -0x9039 # -0x903C # -0x903E # -0x9041 # 0x9042 # 0x9045 # 0x9047 # -0x9049 # 0x904A # 0x904B # 0x904D # 0x904E # -0x904F # -0x9050 # -0x9051 # -0x9052 # 0x9053 # 0x9054 # 0x9055 # -0x9056 # -0x9058 # -0x9059 # 0x905C # -0x905E # 0x9060 # 0x9061 # 0x9063 # -0x9065 # -0x9068 # 0x9069 # 0x906D # 0x906E # -0x906F # -0x9072 # 0x9075 # -0x9076 # 0x9077 # 0x9078 # 0x907A # -0x907C # -0x907D # 0x907F # -0x9080 # -0x9081 # -0x9082 # -0x9083 # 0x9084 # -0x9087 # -0x9089 # -0x908A # -0x908F # -0x9091 # 0x90A3 # 0x90A6 # -0x90A8 # 0x90AA # -0x90AF # -0x90B1 # -0x90B5 # 0x90B8 # -0x90C1 # 0x90CA # 0x90CE # -0x90DB # 0x90E1 # -0x90E2 # -0x90E4 # 0x90E8 # 0x90ED # 0x90F5 # 0x90F7 # 0x90FD # -0x9102 # -0x9112 # -0x9119 # -0x912D # -0x9130 # -0x9132 # -0x9149 # -0x914A # -0x914B # 0x914C # 0x914D # 0x914E # 0x9152 # 0x9154 # -0x9156 # -0x9158 # 0x9162 # -0x9163 # -0x9165 # -0x9169 # 0x916A # 0x916C # -0x9172 # -0x9173 # 0x9175 # 0x9177 # 0x9178 # -0x9182 # -0x9187 # -0x9189 # -0x918B # -0x918D # -0x9190 # 0x9192 # -0x9197 # 0x919C # -0x91A2 # -0x91A4 # -0x91AA # -0x91AB # -0x91AF # -0x91B4 # -0x91B5 # 0x91B8 # -0x91BA # -0x91C0 # -0x91C1 # -0x91C6 # 0x91C7 # 0x91C8 # -0x91C9 # -0x91CB # 0x91CC # 0x91CD # 0x91CE # 0x91CF # -0x91D0 # 0x91D1 # -0x91D6 # -0x91D8 # -0x91DB # 0x91DC # 0x91DD # -0x91DF # -0x91E1 # 0x91E3 # -0x91E6 # -0x91E7 # -0x91F5 # -0x91F6 # -0x91FC # -0x91FF # 0x920D # -0x920E # -0x9211 # -0x9214 # -0x9215 # -0x921E # -0x9229 # -0x922C # 0x9234 # -0x9237 # -0x923F # 0x9244 # -0x9245 # -0x9248 # -0x9249 # -0x924B # -0x9250 # -0x9257 # -0x925A # 0x925B # -0x925E # 0x9262 # -0x9264 # -0x9266 # 0x9271 # -0x927E # 0x9280 # 0x9283 # 0x9285 # -0x9291 # -0x9293 # -0x9295 # -0x9296 # 0x9298 # -0x929A # -0x929B # -0x929C # 0x92AD # -0x92B7 # -0x92B9 # -0x92CF # -0x92D2 # -0x92E4 # -0x92E9 # -0x92EA # 0x92ED # -0x92F2 # 0x92F3 # -0x92F8 # -0x92FA # 0x92FC # -0x9306 # -0x930F # -0x9310 # -0x9318 # -0x9319 # -0x931A # 0x9320 # -0x9322 # -0x9323 # 0x9326 # -0x9328 # -0x932B # 0x932C # 0x932E # 0x932F # 0x9332 # -0x9335 # -0x933A # -0x933B # -0x9344 # 0x934B # -0x934D # -0x9354 # -0x9356 # 0x935B # -0x935C # -0x9360 # -0x936C # -0x936E # 0x9375 # -0x937C # -0x937E # 0x938C # -0x9394 # 0x9396 # -0x9397 # -0x939A # -0x93A7 # -0x93AC # -0x93AD # 0x93AE # -0x93B0 # -0x93B9 # -0x93C3 # -0x93C8 # -0x93D0 # -0x93D1 # -0x93D6 # -0x93D7 # -0x93D8 # -0x93DD # 0x93E1 # -0x93E4 # -0x93E5 # -0x93E8 # -0x9403 # -0x9407 # -0x9410 # -0x9413 # -0x9414 # 0x9418 # -0x9419 # -0x941A # -0x9421 # -0x942B # -0x9435 # -0x9436 # -0x9438 # -0x943A # -0x9441 # -0x9444 # 0x9451 # -0x9452 # -0x9453 # -0x945A # -0x945B # -0x945E # -0x9460 # -0x9462 # -0x946A # -0x9470 # -0x9475 # -0x9477 # -0x947C # -0x947D # -0x947E # -0x947F # -0x9481 # 0x9577 # 0x9580 # -0x9582 # -0x9583 # -0x9587 # 0x9589 # -0x958A # 0x958B # -0x958F # 0x9591 # 0x9593 # -0x9594 # -0x9596 # -0x9598 # -0x9599 # -0x95A0 # 0x95A2 # 0x95A3 # -0x95A4 # 0x95A5 # -0x95A7 # -0x95A8 # -0x95AD # 0x95B2 # -0x95B9 # -0x95BB # -0x95BC # -0x95BE # -0x95C3 # 0x95C7 # -0x95CA # -0x95CC # -0x95CD # -0x95D4 # -0x95D5 # -0x95D6 # 0x95D8 # -0x95DC # -0x95E1 # -0x95E2 # -0x95E5 # 0x961C # -0x9621 # -0x9628 # 0x962A # -0x962E # -0x962F # 0x9632 # 0x963B # -0x963F # -0x9640 # -0x9642 # 0x9644 # -0x964B # -0x964C # 0x964D # -0x964F # 0x9650 # 0x965B # -0x965C # -0x965D # -0x965E # -0x965F # 0x9662 # 0x9663 # 0x9664 # 0x9665 # -0x9666 # 0x966A # -0x966C # 0x9670 # -0x9672 # 0x9673 # 0x9675 # 0x9676 # -0x9677 # 0x9678 # 0x967A # 0x967D # 0x9685 # 0x9686 # -0x9688 # 0x968A # -0x968B # -0x968D # 0x968E # 0x968F # 0x9694 # -0x9695 # -0x9697 # -0x9698 # 0x9699 # 0x969B # 0x969C # 0x96A0 # 0x96A3 # -0x96A7 # -0x96A8 # -0x96AA # -0x96B0 # -0x96B1 # -0x96B2 # -0x96B4 # -0x96B6 # 0x96B7 # -0x96B8 # -0x96B9 # 0x96BB # -0x96BC # -0x96C0 # -0x96C1 # 0x96C4 # 0x96C5 # 0x96C6 # 0x96C7 # -0x96C9 # -0x96CB # 0x96CC # -0x96CD # -0x96CE # 0x96D1 # -0x96D5 # -0x96D6 # -0x96D9 # -0x96DB # -0x96DC # 0x96E2 # 0x96E3 # 0x96E8 # 0x96EA # -0x96EB # 0x96F0 # 0x96F2 # 0x96F6 # 0x96F7 # -0x96F9 # 0x96FB # 0x9700 # -0x9704 # -0x9706 # 0x9707 # -0x9708 # 0x970A # -0x970D # -0x970E # -0x970F # -0x9711 # -0x9713 # -0x9716 # -0x9719 # 0x971C # -0x971E # -0x9724 # 0x9727 # -0x972A # -0x9730 # 0x9732 # -0x9738 # -0x9739 # -0x973D # -0x973E # -0x9742 # -0x9744 # -0x9746 # -0x9748 # -0x9749 # 0x9752 # -0x9756 # 0x9759 # -0x975C # 0x975E # -0x9760 # -0x9761 # 0x9762 # -0x9764 # -0x9766 # -0x9768 # 0x9769 # -0x976B # -0x976D # -0x9771 # 0x9774 # -0x9779 # -0x977A # -0x977C # -0x9781 # -0x9784 # -0x9785 # -0x9786 # -0x978B # -0x978D # -0x978F # -0x9790 # -0x9798 # -0x979C # -0x97A0 # -0x97A3 # -0x97A6 # -0x97A8 # -0x97AB # -0x97AD # -0x97B3 # -0x97B4 # -0x97C3 # -0x97C6 # -0x97C8 # -0x97CB # 0x97D3 # -0x97DC # -0x97ED # -0x97EE # -0x97F2 # 0x97F3 # -0x97F5 # -0x97F6 # 0x97FB # 0x97FF # -0x9801 # 0x9802 # 0x9803 # 0x9805 # 0x9806 # 0x9808 # -0x980C # -0x980F # 0x9810 # 0x9811 # 0x9812 # 0x9813 # -0x9817 # 0x9818 # -0x981A # -0x9821 # -0x9824 # -0x982C # 0x982D # -0x9834 # -0x9837 # -0x9838 # +#0x9830 # # not in DroidSansJapanese 0x983B # 0x983C # -0x983D # -0x9846 # -0x984B # 0x984C # 0x984D # 0x984E # -0x984F # 0x9854 # 0x9855 # 0x9858 # -0x985B # 0x985E # 0x9867 # -0x986B # -0x986F # -0x9870 # -0x9871 # -0x9873 # -0x9874 # 0x98A8 # -0x98AA # -0x98AF # -0x98B1 # -0x98B6 # -0x98C3 # -0x98C4 # -0x98C6 # 0x98DB # -0x98DC # 0x98DF # 0x98E2 # -0x98E9 # -0x98EB # -0x98ED # -0x98EE # 0x98EF # 0x98F2 # -0x98F4 # 0x98FC # 0x98FD # 0x98FE # -0x9903 # 0x9905 # -0x9909 # 0x990A # 0x990C # -0x9910 # -0x9912 # 0x9913 # -0x9914 # -0x9918 # -0x991D # -0x991E # -0x9920 # -0x9921 # -0x9924 # 0x9928 # -0x992C # -0x992E # -0x993D # -0x993E # -0x9942 # -0x9945 # -0x9949 # -0x994B # -0x994C # -0x9950 # -0x9951 # -0x9952 # -0x9955 # -0x9957 # 0x9996 # -0x9997 # -0x9998 # 0x9999 # -0x99A5 # -0x99A8 # 0x99AC # -0x99AD # -0x99AE # -0x99B3 # -0x99B4 # -0x99BC # -0x99C1 # 0x99C4 # 0x99C5 # 0x99C6 # -0x99C8 # 0x99D0 # -0x99D1 # 0x99D2 # -0x99D5 # -0x99D8 # -0x99DB # -0x99DD # -0x99DF # -0x99E2 # -0x99ED # -0x99EE # -0x99F1 # -0x99F2 # -0x99F8 # -0x99FB # -0x99FF # -0x9A01 # -0x9A05 # 0x9A0E # -0x9A0F # 0x9A12 # 0x9A13 # -0x9A19 # -0x9A28 # -0x9A2B # 0x9A30 # -0x9A37 # -0x9A3E # -0x9A40 # -0x9A42 # -0x9A43 # -0x9A45 # -0x9A4D # -0x9A55 # -0x9A57 # 0x9A5A # -0x9A5B # -0x9A5F # -0x9A62 # -0x9A64 # -0x9A65 # -0x9A69 # -0x9A6A # -0x9A6B # 0x9AA8 # -0x9AAD # -0x9AB0 # 0x9AB8 # -0x9ABC # -0x9AC0 # 0x9AC4 # -0x9ACF # -0x9AD1 # -0x9AD3 # -0x9AD4 # 0x9AD8 # -0x9ADE # -0x9ADF # -0x9AE2 # -0x9AE3 # -0x9AE6 # 0x9AEA # -0x9AEB # -0x9AED # -0x9AEE # -0x9AEF # -0x9AF1 # -0x9AF4 # -0x9AF7 # -0x9AFB # -0x9B06 # -0x9B18 # -0x9B1A # -0x9B1F # -0x9B22 # -0x9B23 # -0x9B25 # -0x9B27 # -0x9B28 # -0x9B29 # -0x9B2A # -0x9B2E # -0x9B2F # 0x9B31 # -0x9B32 # -0x9B3B # 0x9B3C # -0x9B41 # 0x9B42 # -0x9B43 # -0x9B44 # 0x9B45 # -0x9B4D # -0x9B4E # -0x9B4F # -0x9B51 # 0x9B54 # -0x9B58 # 0x9B5A # -0x9B6F # -0x9B74 # -0x9B83 # -0x9B8E # -0x9B91 # -0x9B92 # -0x9B93 # -0x9B96 # -0x9B97 # -0x9B9F # -0x9BA0 # -0x9BA8 # -0x9BAA # -0x9BAB # -0x9BAD # 0x9BAE # -0x9BB4 # -0x9BB9 # -0x9BC0 # -0x9BC6 # -0x9BC9 # -0x9BCA # -0x9BCF # -0x9BD1 # -0x9BD2 # -0x9BD4 # -0x9BD6 # -0x9BDB # -0x9BE1 # -0x9BE2 # -0x9BE3 # -0x9BE4 # 0x9BE8 # -0x9BF0 # -0x9BF1 # -0x9BF2 # -0x9BF5 # -0x9C04 # -0x9C06 # -0x9C08 # -0x9C09 # -0x9C0A # -0x9C0C # -0x9C0D # -0x9C10 # -0x9C12 # -0x9C13 # -0x9C14 # -0x9C15 # -0x9C1B # -0x9C21 # -0x9C24 # -0x9C25 # -0x9C2D # -0x9C2E # -0x9C2F # -0x9C30 # -0x9C32 # -0x9C39 # -0x9C3A # -0x9C3B # -0x9C3E # -0x9C46 # -0x9C47 # -0x9C48 # -0x9C52 # -0x9C57 # -0x9C5A # -0x9C60 # -0x9C67 # -0x9C76 # -0x9C78 # 0x9CE5 # -0x9CE7 # -0x9CE9 # -0x9CEB # -0x9CEC # -0x9CF0 # -0x9CF3 # 0x9CF4 # -0x9CF6 # -0x9D03 # -0x9D06 # -0x9D07 # -0x9D08 # -0x9D09 # -0x9D0E # -0x9D12 # -0x9D15 # -0x9D1B # -0x9D1F # -0x9D23 # -0x9D26 # -0x9D28 # -0x9D2A # -0x9D2B # -0x9D2C # -0x9D3B # -0x9D3E # -0x9D3F # -0x9D41 # -0x9D44 # -0x9D46 # -0x9D48 # -0x9D50 # -0x9D51 # -0x9D59 # -0x9D5C # -0x9D5D # -0x9D5E # -0x9D60 # -0x9D61 # -0x9D64 # -0x9D6C # -0x9D6F # -0x9D72 # -0x9D7A # -0x9D87 # -0x9D89 # 0x9D8F # -0x9D9A # -0x9DA4 # -0x9DA9 # -0x9DAB # -0x9DAF # -0x9DB2 # 0x9DB4 # -0x9DB8 # -0x9DBA # -0x9DBB # -0x9DC1 # -0x9DC2 # -0x9DC4 # -0x9DC6 # -0x9DCF # -0x9DD3 # -0x9DD9 # -0x9DE6 # -0x9DED # -0x9DEF # -0x9DF2 # -0x9DF8 # -0x9DF9 # -0x9DFA # -0x9DFD # -0x9E1A # -0x9E1B # -0x9E1E # -0x9E75 # -0x9E78 # -0x9E79 # -0x9E7D # 0x9E7F # -0x9E81 # -0x9E88 # -0x9E8B # -0x9E8C # -0x9E91 # -0x9E92 # 0x9E93 # -0x9E95 # 0x9E97 # -0x9E9D # -0x9E9F # -0x9EA5 # 0x9EA6 # -0x9EA9 # -0x9EAA # -0x9EAD # -0x9EB8 # -0x9EB9 # 0x9EBA # 0x9EBB # -0x9EBC # -0x9EBE # -0x9EBF # 0x9EC4 # -0x9ECC # -0x9ECD # -0x9ECE # -0x9ECF # -0x9ED0 # 0x9ED2 # -0x9ED4 # -0x9ED8 # 0x9ED9 # -0x9EDB # -0x9EDC # -0x9EDD # -0x9EDE # -0x9EE0 # -0x9EE5 # -0x9EE8 # -0x9EEF # -0x9EF4 # -0x9EF6 # -0x9EF7 # -0x9EF9 # -0x9EFB # -0x9EFC # -0x9EFD # -0x9F07 # -0x9F08 # -0x9F0E # 0x9F13 # -0x9F15 # -0x9F20 # -0x9F21 # -0x9F2C # 0x9F3B # -0x9F3E # -0x9F4A # -0x9F4B # -0x9F4E # -0x9F4F # -0x9F52 # -0x9F54 # -0x9F5F # -0x9F60 # -0x9F61 # 0x9F62 # -0x9F63 # -0x9F66 # -0x9F67 # -0x9F6A # -0x9F6C # -0x9F72 # -0x9F76 # -0x9F77 # -0x9F8D # -0x9F95 # -0x9F9C # -0x9F9D # -0x9FA0 # -#0xFFE5 # FULLWIDTH YEN SIGN +#0x20B9F # -- 2.3.3 From 48c8b7938a0f1412d31dbe2f4e332e460f624068 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 13 May 2014 21:21:43 +0900 Subject: [PATCH] Allow the modification on FcTypeVoid with FcTypeLangSet and FcTypeCharSet FcTypeVoid is likely to happen when 'lang' and 'charset' is deleted by 'delete' or 'delete_all' mode in edit. Without this change, any modification on them are simply ignored. This is useful to make a lot of changes, particularly when one wants to add a few and delete a lot say. --- src/fccfg.c | 10 ++++++++++ src/fccharset.c | 15 +++++++++++++++ src/fcint.h | 3 +++ src/fclang.c | 27 +++++++++++++++------------ 4 files changed, 43 insertions(+), 12 deletions(-) diff --git a/src/fccfg.c b/src/fccfg.c index cdb8c0f..fe69eec 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -722,6 +722,16 @@ FcConfigPromote (FcValue v, FcValue u, FcValuePromotionBuffer *buf) v.u.l = FcLangSetPromote (v.u.s, buf); v.type = FcTypeLangSet; } + else if (v.type == FcTypeVoid && u.type == FcTypeLangSet) + { + v.u.l = FcLangSetPromote (NULL, buf); + v.type = FcTypeLangSet; + } + else if (v.type == FcTypeVoid && u.type == FcTypeCharSet) + { + v.u.c = FcCharSetPromote (buf); + v.type = FcTypeCharSet; + } if (buf && v.type == FcTypeDouble && u.type == FcTypeRange) { v.u.r = FcRangePromote (v.u.d, buf); diff --git a/src/fccharset.c b/src/fccharset.c index c9f928c..43a3cc0 100644 --- a/src/fccharset.c +++ b/src/fccharset.c @@ -43,6 +43,21 @@ FcCharSetCreate (void) } FcCharSet * +FcCharSetPromote (FcValuePromotionBuffer *vbuf) +{ + FcCharSet *fcs = (FcCharSet *) vbuf; + + FC_ASSERT_STATIC (sizeof (FcCharSet) <= sizeof (FcValuePromotionBuffer)); + + FcRefSetConst (&fcs->ref); + fcs->num = 0; + fcs->leaves_offset = 0; + fcs->numbers_offset = 0; + + return fcs; +} + +FcCharSet * FcCharSetNew (void) { return FcCharSetCreate (); diff --git a/src/fcint.h b/src/fcint.h index dd26fd8..3950e01 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -720,6 +720,9 @@ FcPrivate FcLangSet * FcLangSetSerialize(FcSerialize *serialize, const FcLangSet *l); /* fccharset.c */ +FcPrivate FcCharSet * +FcCharSetPromote (FcValuePromotionBuffer *vbuf); + FcPrivate void FcLangCharSetPopulate (void); diff --git a/src/fclang.c b/src/fclang.c index 9f685f6..b1fd1bc 100644 --- a/src/fclang.c +++ b/src/fclang.c @@ -720,19 +720,22 @@ FcLangSetPromote (const FcChar8 *lang, FcValuePromotionBuffer *vbuf) memset (buf->ls.map, '\0', sizeof (buf->ls.map)); buf->ls.map_size = NUM_LANG_SET_MAP; buf->ls.extra = 0; - id = FcLangSetIndex (lang); - if (id > 0) + if (lang) { - FcLangSetBitSet (&buf->ls, id); - } - else - { - buf->ls.extra = &buf->strs; - buf->strs.num = 1; - buf->strs.size = 1; - buf->strs.strs = &buf->str; - FcRefInit (&buf->strs.ref, 1); - buf->str = (FcChar8 *) lang; + id = FcLangSetIndex (lang); + if (id > 0) + { + FcLangSetBitSet (&buf->ls, id); + } + else + { + buf->ls.extra = &buf->strs; + buf->strs.num = 1; + buf->strs.size = 1; + buf->strs.strs = &buf->str; + FcRefInit (&buf->strs.ref, 1); + buf->str = (FcChar8 *) lang; + } } return &buf->ls; } -- 2.3.3 From e4d8847eee14ddfa9632057bca36cb60dfa1b35f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 16 May 2014 13:45:44 -0600 Subject: [PATCH] Remove unused code --- src/fchash.c | 41 ----------------------------------------- src/fcint.h | 4 ---- 2 files changed, 45 deletions(-) diff --git a/src/fchash.c b/src/fchash.c index 3830002..ede41d2 100644 --- a/src/fchash.c +++ b/src/fchash.c @@ -160,47 +160,6 @@ FcHashSHA256ToString (FcChar32 *hash) } FcChar8 * -FcHashGetSHA256Digest (const FcChar8 *input_strings, - size_t len) -{ - size_t i, round_len = len / 64; - char block[64]; - FcChar32 *ret = FcHashInitSHA256Digest (); - - if (!ret) - return NULL; - - for (i = 0; i < round_len; i++) - { - FcHashComputeSHA256Digest (ret, (const char *)&input_strings[i * 64]); - } - /* padding */ - if ((len % 64) != 0) - memcpy (block, &input_strings[len / 64], len % 64); - memset (&block[len % 64], 0, 64 - (len % 64)); - block[len % 64] = 0x80; - if ((64 - (len % 64)) < 9) - { - /* process a block once */ - FcHashComputeSHA256Digest (ret, block); - memset (block, 0, 64); - } - /* set input size at the end */ - len *= 8; - block[63 - 0] = (uint64_t)len & 0xff; - block[63 - 1] = ((uint64_t)len >> 8) & 0xff; - block[63 - 2] = ((uint64_t)len >> 16) & 0xff; - block[63 - 3] = ((uint64_t)len >> 24) & 0xff; - block[63 - 4] = ((uint64_t)len >> 32) & 0xff; - block[63 - 5] = ((uint64_t)len >> 40) & 0xff; - block[63 - 6] = ((uint64_t)len >> 48) & 0xff; - block[63 - 7] = ((uint64_t)len >> 56) & 0xff; - FcHashComputeSHA256Digest (ret, block); - - return FcHashSHA256ToString (ret); -} - -FcChar8 * FcHashGetSHA256DigestFromFile (const FcChar8 *filename) { FILE *fp = fopen ((const char *)filename, "rb"); diff --git a/src/fcint.h b/src/fcint.h index 3950e01..094e6e0 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -868,10 +868,6 @@ FcFontSetDeserialize (const FcFontSet *set); /* fchash.c */ FcPrivate FcChar8 * -FcHashGetSHA256Digest (const FcChar8 *input_strings, - size_t len); - -FcPrivate FcChar8 * FcHashGetSHA256DigestFromFile (const FcChar8 *filename); FcPrivate FcChar8 * -- 2.3.3 From 748e77e89f8f6ba297ce9d206ac3834ae087201d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 16 May 2014 14:03:19 -0600 Subject: [PATCH] Simplify hash code --- src/fcfreetype.c | 4 +-- src/fchash.c | 94 ++++++++++++++++++++++++++------------------------------ src/fcint.h | 6 ++-- 3 files changed, 48 insertions(+), 56 deletions(-) diff --git a/src/fcfreetype.c b/src/fcfreetype.c index d0932b3..cd354d5 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1715,7 +1715,7 @@ FcFreeTypeQueryFace (const FT_Face face, goto bail3; } memset (&fontdata[len], 0, alen - len); - hashstr = FcHashGetSHA256DigestFromMemory (fontdata, len); + hashstr = FcHashGetDigestFromMemory (fontdata, len); free (fontdata); } else if (err == FT_Err_Invalid_Face_Handle) @@ -1723,7 +1723,7 @@ FcFreeTypeQueryFace (const FT_Face face, /* font may not support SFNT. falling back to * read the font data from file directly */ - hashstr = FcHashGetSHA256DigestFromFile (file); + hashstr = FcHashGetDigestFromFile (file); } else { diff --git a/src/fchash.c b/src/fchash.c index ede41d2..66e73f0 100644 --- a/src/fchash.c +++ b/src/fchash.c @@ -3,7 +3,9 @@ * * Copyright © 2003 Keith Packard * Copyright © 2013 Red Hat, Inc. + * Copyright © 2014 Google, Inc. * Red Hat Author(s): Akira TAGOH + * Google Author(s): Behdad Esfahbod * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -27,6 +29,9 @@ #include #include +/* SHA256 */ + + #define ROTRN(w, v, n) ((((FcChar32)v) >> n) | (((FcChar32)v) << (w - n))) #define ROTR32(v, n) ROTRN(32, v, n) #define SHR(v, n) (v >> n) @@ -38,28 +43,22 @@ #define ss1(x) (ROTR32(x, 17) ^ ROTR32(x, 19) ^ SHR(x, 10)) -static FcChar32 * -FcHashInitSHA256Digest (void) +typedef FcChar32 FcHashDigest[8]; + +static void +FcHashInitDigest (FcHashDigest digest) { - int i; - static const FcChar32 h[] = { + static const FcHashDigest init = { 0x6a09e667UL, 0xbb67ae85UL, 0x3c6ef372UL, 0xa54ff53aUL, 0x510e527fUL, 0x9b05688cUL, 0x1f83d9abUL, 0x5be0cd19UL }; - FcChar32 *ret = malloc (sizeof (FcChar32) * 8); - - if (!ret) - return NULL; - - for (i = 0; i < 8; i++) - ret[i] = h[i]; - return ret; + memcpy (digest, init, sizeof (FcHashDigest)); } static void -FcHashComputeSHA256Digest (FcChar32 *hash, - const char *block) +FcHashDigestAddBlock (FcHashDigest digest, + const char block[64]) { static const FcChar32 k[] = { 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, @@ -82,7 +81,7 @@ FcHashComputeSHA256Digest (FcChar32 *hash, FcChar32 w[64], i, j, t1, t2; FcChar32 a, b, c, d, e, f, g, h; -#define H(n) (hash[n]) +#define H(n) (digest[n]) a = H(0); b = H(1); @@ -131,51 +130,46 @@ FcHashComputeSHA256Digest (FcChar32 *hash, } static FcChar8 * -FcHashSHA256ToString (FcChar32 *hash) +FcHashToString (const FcHashDigest digest) { FcChar8 *ret = NULL; static const char hex[] = "0123456789abcdef"; int i, j; - if (hash) + ret = malloc (sizeof (FcChar8) * (8 * 8 + 7 + 1)); + if (!ret) + return NULL; + memcpy (ret, "sha256:", 7); +#define H(n) digest[n] + for (i = 0; i < 8; i++) { - ret = malloc (sizeof (FcChar8) * (8 * 8 + 7 + 1)); - if (!ret) - return NULL; - memcpy (ret, "sha256:", 7); -#define H(n) hash[n] - for (i = 0; i < 8; i++) - { - FcChar32 v = H(i); + FcChar32 v = H(i); - for (j = 0; j < 8; j++) - ret[7 + (i * 8) + j] = hex[(v >> (28 - j * 4)) & 0xf]; - } - ret[7 + i * 8] = 0; -#undef H - free (hash); + for (j = 0; j < 8; j++) + ret[7 + (i * 8) + j] = hex[(v >> (28 - j * 4)) & 0xf]; } + ret[7 + i * 8] = 0; +#undef H return ret; } FcChar8 * -FcHashGetSHA256DigestFromFile (const FcChar8 *filename) +FcHashGetDigestFromFile (const FcChar8 *filename) { - FILE *fp = fopen ((const char *)filename, "rb"); + FcHashDigest digest; + FILE *fp; char ibuf[64]; - FcChar32 *ret; size_t len; struct stat st; + fp = fopen ((const char *)filename, "rb"); if (!fp) return NULL; - if (FcStat (filename, &st)) - goto bail0; + FcHashInitDigest (digest); - ret = FcHashInitSHA256Digest (); - if (!ret) + if (FcStat (filename, &st)) goto bail0; while (!feof (fp)) @@ -190,7 +184,7 @@ FcHashGetSHA256DigestFromFile (const FcChar8 *filename) if ((64 - len) < 9) { /* process a block once */ - FcHashComputeSHA256Digest (ret, ibuf); + FcHashDigestAddBlock (digest, ibuf); memset (ibuf, 0, 64); } /* set input size at the end */ @@ -203,17 +197,17 @@ FcHashGetSHA256DigestFromFile (const FcChar8 *filename) ibuf[63 - 5] = (v >> 40) & 0xff; ibuf[63 - 6] = (v >> 48) & 0xff; ibuf[63 - 7] = (v >> 56) & 0xff; - FcHashComputeSHA256Digest (ret, ibuf); + FcHashDigestAddBlock (digest, ibuf); break; } else { - FcHashComputeSHA256Digest (ret, ibuf); + FcHashDigestAddBlock (digest, ibuf); } } fclose (fp); - return FcHashSHA256ToString (ret); + return FcHashToString (digest); bail0: fclose (fp); @@ -222,16 +216,14 @@ bail0: } FcChar8 * -FcHashGetSHA256DigestFromMemory (const char *fontdata, +FcHashGetDigestFromMemory (const char *fontdata, size_t length) { + FcHashDigest digest; char ibuf[64]; - FcChar32 *ret; size_t i = 0; - ret = FcHashInitSHA256Digest (); - if (!ret) - return NULL; + FcHashInitDigest (digest); while (i <= length) { @@ -249,7 +241,7 @@ FcHashGetSHA256DigestFromMemory (const char *fontdata, if ((64 - n) < 9) { /* process a block once */ - FcHashComputeSHA256Digest (ret, ibuf); + FcHashDigestAddBlock (digest, ibuf); memset (ibuf, 0, 64); } /* set input size at the end */ @@ -262,15 +254,15 @@ FcHashGetSHA256DigestFromMemory (const char *fontdata, ibuf[63 - 5] = (v >> 40) & 0xff; ibuf[63 - 6] = (v >> 48) & 0xff; ibuf[63 - 7] = (v >> 56) & 0xff; - FcHashComputeSHA256Digest (ret, ibuf); + FcHashDigestAddBlock (digest, ibuf); break; } else { - FcHashComputeSHA256Digest (ret, &fontdata[i]); + FcHashDigestAddBlock (digest, &fontdata[i]); } i += 64; } - return FcHashSHA256ToString (ret); + return FcHashToString (digest); } diff --git a/src/fcint.h b/src/fcint.h index 094e6e0..b15123b 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -868,11 +868,11 @@ FcFontSetDeserialize (const FcFontSet *set); /* fchash.c */ FcPrivate FcChar8 * -FcHashGetSHA256DigestFromFile (const FcChar8 *filename); +FcHashGetDigestFromFile (const FcChar8 *filename); FcPrivate FcChar8 * -FcHashGetSHA256DigestFromMemory (const char *fontdata, - size_t length); +FcHashGetDigestFromMemory (const char *fontdata, + size_t length); /* fcinit.c */ FcPrivate FcConfig * -- 2.3.3 From 8284df49ef45678781fc6e05d18cc04acf04cf3c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 16 May 2014 14:17:45 -0600 Subject: [PATCH] Further simplify hash code --- src/fchash.c | 88 ++++++++++++++++++++++++++---------------------------------- 1 file changed, 38 insertions(+), 50 deletions(-) diff --git a/src/fchash.c b/src/fchash.c index 66e73f0..3fc51f7 100644 --- a/src/fchash.c +++ b/src/fchash.c @@ -129,6 +129,41 @@ FcHashDigestAddBlock (FcHashDigest digest, #undef H } +static void +FcHashDigestFinish (FcHashDigest digest, + const char *residual, /* < 64 bytes */ + size_t total_len) +{ + char ibuf[64]; + unsigned int len = total_len % 64; + uint64_t v; + + if (!len) + return; + + memcpy (ibuf, residual, len); + memset (ibuf + len, 0, 64 - len); + ibuf[len] = 0x80; + + if ((64 - len) < 9) + { + FcHashDigestAddBlock (digest, ibuf); + memset (ibuf, 0, 64); + } + + /* set input size at the end */ + v = (uint64_t) total_len * 8; + ibuf[63 - 0] = v & 0xff; + ibuf[63 - 1] = (v >> 8) & 0xff; + ibuf[63 - 2] = (v >> 16) & 0xff; + ibuf[63 - 3] = (v >> 24) & 0xff; + ibuf[63 - 4] = (v >> 32) & 0xff; + ibuf[63 - 5] = (v >> 40) & 0xff; + ibuf[63 - 6] = (v >> 48) & 0xff; + ibuf[63 - 7] = (v >> 56) & 0xff; + FcHashDigestAddBlock (digest, ibuf); +} + static FcChar8 * FcHashToString (const FcHashDigest digest) { @@ -176,28 +211,7 @@ FcHashGetDigestFromFile (const FcChar8 *filename) { if ((len = fread (ibuf, sizeof (char), 64, fp)) < 64) { - uint64_t v; - - /* add a padding */ - memset (&ibuf[len], 0, 64 - len); - ibuf[len] = 0x80; - if ((64 - len) < 9) - { - /* process a block once */ - FcHashDigestAddBlock (digest, ibuf); - memset (ibuf, 0, 64); - } - /* set input size at the end */ - v = (long)st.st_size * 8; - ibuf[63 - 0] = v & 0xff; - ibuf[63 - 1] = (v >> 8) & 0xff; - ibuf[63 - 2] = (v >> 16) & 0xff; - ibuf[63 - 3] = (v >> 24) & 0xff; - ibuf[63 - 4] = (v >> 32) & 0xff; - ibuf[63 - 5] = (v >> 40) & 0xff; - ibuf[63 - 6] = (v >> 48) & 0xff; - ibuf[63 - 7] = (v >> 56) & 0xff; - FcHashDigestAddBlock (digest, ibuf); + FcHashDigestFinish (digest, ibuf, st.st_size); break; } else @@ -217,10 +231,9 @@ bail0: FcChar8 * FcHashGetDigestFromMemory (const char *fontdata, - size_t length) + size_t length) { FcHashDigest digest; - char ibuf[64]; size_t i = 0; FcHashInitDigest (digest); @@ -229,32 +242,7 @@ FcHashGetDigestFromMemory (const char *fontdata, { if ((length - i) < 64) { - uint64_t v; - size_t n; - - /* add a padding */ - n = length - i; - if (n > 0) - memcpy (ibuf, &fontdata[i], n); - memset (&ibuf[n], 0, 64 - n); - ibuf[n] = 0x80; - if ((64 - n) < 9) - { - /* process a block once */ - FcHashDigestAddBlock (digest, ibuf); - memset (ibuf, 0, 64); - } - /* set input size at the end */ - v = length * 8; - ibuf[63 - 0] = v & 0xff; - ibuf[63 - 1] = (v >> 8) & 0xff; - ibuf[63 - 2] = (v >> 16) & 0xff; - ibuf[63 - 3] = (v >> 24) & 0xff; - ibuf[63 - 4] = (v >> 32) & 0xff; - ibuf[63 - 5] = (v >> 40) & 0xff; - ibuf[63 - 6] = (v >> 48) & 0xff; - ibuf[63 - 7] = (v >> 56) & 0xff; - FcHashDigestAddBlock (digest, ibuf); + FcHashDigestFinish (digest, fontdata+i, length); break; } else -- 2.3.3 From 3f992254f2a3b7f88df989067785141cbf265037 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 16 May 2014 15:02:58 -0600 Subject: [PATCH] Rewrite hashing to use FT_Stream directly This is more robust but introduces a small change in behavior: For .pcf.gz fonts, the new code calculates the hash of the uncompressed font data whereas the original code was calculating the hash of the compressed data. No big deal IMO. --- src/fcfreetype.c | 78 ++++++++++++++++++++++++++++++-------------------------- src/fchash.c | 75 +++-------------------------------------------------- src/fcint.h | 19 +++++++++++--- 3 files changed, 61 insertions(+), 111 deletions(-) diff --git a/src/fcfreetype.c b/src/fcfreetype.c index cd354d5..72da5ca 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1104,9 +1104,6 @@ FcFreeTypeQueryFace (const FT_Face face, char psname[256]; const char *tmp; - FcChar8 *hashstr = NULL; - FT_Error err; - FT_ULong len = 0, alen; FcRange *r = NULL; double lower_size = 0.0L, upper_size = DBL_MAX; @@ -1699,46 +1696,55 @@ FcFreeTypeQueryFace (const FT_Face face, if (!FcPatternAddBool (pat, FC_DECORATIVE, decorative)) goto bail1; - err = FT_Load_Sfnt_Table (face, 0, 0, NULL, &len); - if (err == FT_Err_Ok) + + /* + * Compute hash digest for the font + */ { - char *fontdata; - - alen = (len + 63) & ~63; - fontdata = malloc (alen); - if (!fontdata) - goto bail3; - err = FT_Load_Sfnt_Table (face, 0, 0, (FT_Byte *)fontdata, &len); - if (err != FT_Err_Ok) + FcChar8 *hashstr = NULL; + FcHashDigest digest; + + FcHashInitDigest (digest); + + if (face->stream->read == NULL) { - free (fontdata); - goto bail3; + const char *data = (const char *) face->stream->base; + size_t total_len = face->stream->size; + size_t len = total_len; + + while (len >= 64) + { + FcHashDigestAddBlock (digest, data); + data += 64; + len -= 64; + } + FcHashDigestFinish (digest, data, total_len); + } else { + char data[64]; + size_t total_len = 0; + size_t len = 0; + + while ((len = face->stream->read (face->stream, total_len, (unsigned char *) data, sizeof(data))) == 64) + { + FcHashDigestAddBlock (digest, data); + total_len += 64; + } + total_len += len; + FcHashDigestFinish (digest, data, total_len); } - memset (&fontdata[len], 0, alen - len); - hashstr = FcHashGetDigestFromMemory (fontdata, len); - free (fontdata); - } - else if (err == FT_Err_Invalid_Face_Handle) - { - /* font may not support SFNT. falling back to - * read the font data from file directly - */ - hashstr = FcHashGetDigestFromFile (file); - } - else - { - goto bail3; - } - if (hashstr) - { - if (!FcPatternAddString (pat, FC_HASH, hashstr)) + + hashstr = FcHashToString (digest); + if (hashstr) { + if (!FcPatternAddString (pat, FC_HASH, hashstr)) + { + free (hashstr); + goto bail1; + } free (hashstr); - goto bail1; } - free (hashstr); } -bail3: + /* * Compute the unicode coverage for the font diff --git a/src/fchash.c b/src/fchash.c index 3fc51f7..1526cfd 100644 --- a/src/fchash.c +++ b/src/fchash.c @@ -43,9 +43,8 @@ #define ss1(x) (ROTR32(x, 17) ^ ROTR32(x, 19) ^ SHR(x, 10)) -typedef FcChar32 FcHashDigest[8]; -static void +void FcHashInitDigest (FcHashDigest digest) { static const FcHashDigest init = { @@ -56,7 +55,7 @@ FcHashInitDigest (FcHashDigest digest) memcpy (digest, init, sizeof (FcHashDigest)); } -static void +void FcHashDigestAddBlock (FcHashDigest digest, const char block[64]) { @@ -129,7 +128,7 @@ FcHashDigestAddBlock (FcHashDigest digest, #undef H } -static void +void FcHashDigestFinish (FcHashDigest digest, const char *residual, /* < 64 bytes */ size_t total_len) @@ -164,7 +163,7 @@ FcHashDigestFinish (FcHashDigest digest, FcHashDigestAddBlock (digest, ibuf); } -static FcChar8 * +FcChar8 * FcHashToString (const FcHashDigest digest) { FcChar8 *ret = NULL; @@ -188,69 +187,3 @@ FcHashToString (const FcHashDigest digest) return ret; } - -FcChar8 * -FcHashGetDigestFromFile (const FcChar8 *filename) -{ - FcHashDigest digest; - FILE *fp; - char ibuf[64]; - size_t len; - struct stat st; - - fp = fopen ((const char *)filename, "rb"); - if (!fp) - return NULL; - - FcHashInitDigest (digest); - - if (FcStat (filename, &st)) - goto bail0; - - while (!feof (fp)) - { - if ((len = fread (ibuf, sizeof (char), 64, fp)) < 64) - { - FcHashDigestFinish (digest, ibuf, st.st_size); - break; - } - else - { - FcHashDigestAddBlock (digest, ibuf); - } - } - fclose (fp); - - return FcHashToString (digest); - -bail0: - fclose (fp); - - return NULL; -} - -FcChar8 * -FcHashGetDigestFromMemory (const char *fontdata, - size_t length) -{ - FcHashDigest digest; - size_t i = 0; - - FcHashInitDigest (digest); - - while (i <= length) - { - if ((length - i) < 64) - { - FcHashDigestFinish (digest, fontdata+i, length); - break; - } - else - { - FcHashDigestAddBlock (digest, &fontdata[i]); - } - i += 64; - } - - return FcHashToString (digest); -} diff --git a/src/fcint.h b/src/fcint.h index b15123b..3d41b0c 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -867,12 +867,23 @@ FcPrivate FcFontSet * FcFontSetDeserialize (const FcFontSet *set); /* fchash.c */ -FcPrivate FcChar8 * -FcHashGetDigestFromFile (const FcChar8 *filename); + +typedef FcChar32 FcHashDigest[8]; + +FcPrivate void +FcHashInitDigest (FcHashDigest digest); + +FcPrivate void +FcHashDigestAddBlock (FcHashDigest digest, + const char block[64]); + +FcPrivate void +FcHashDigestFinish (FcHashDigest digest, + const char *residual, /* < 64 bytes */ + size_t total_len); FcPrivate FcChar8 * -FcHashGetDigestFromMemory (const char *fontdata, - size_t length); +FcHashToString (const FcHashDigest digest); /* fcinit.c */ FcPrivate FcConfig * -- 2.3.3 From 58acd993cb13b58c61633174071ef42da3dcac85 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 16 May 2014 15:08:52 -0600 Subject: [PATCH] Allow passing NULL for file to FcFreeTypeQueryFace() --- src/fcfreetype.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fcfreetype.c b/src/fcfreetype.c index 72da5ca..3dd865a 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1321,7 +1321,7 @@ FcFreeTypeQueryFace (const FT_Face face, ++nstyle; } - if (!nfamily) + if (!nfamily && file && *file) { FcChar8 *start, *end; FcChar8 *family; @@ -1395,7 +1395,7 @@ FcFreeTypeQueryFace (const FT_Face face, if (!FcPatternAddString (pat, FC_POSTSCRIPT_NAME, (const FcChar8 *)psname)) goto bail1; - if (!FcPatternAddString (pat, FC_FILE, file)) + if (file && *file && !FcPatternAddString (pat, FC_FILE, file)) goto bail1; if (!FcPatternAddInteger (pat, FC_INDEX, id)) -- 2.3.3 From f44bfad235e63bb792c38e16ae1fbd281ec1453b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 5 Jun 2014 19:06:02 +0900 Subject: [PATCH] Workaround another race condition issue See https://bugzilla.redhat.com/show_bug.cgi?id=921706 --- src/fccache.c | 24 +++++++++++++++++++++++- src/fcdir.c | 30 ++++++++++++++++++++++++------ src/fcint.h | 7 ++++++- 3 files changed, 53 insertions(+), 8 deletions(-) diff --git a/src/fccache.c b/src/fccache.c index 5173e0b..085bd72 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -545,6 +545,26 @@ FcCacheTimeValid (FcCache *cache, struct stat *dir_stat) return cache->checksum == (int) dir_stat->st_mtime; } +static FcBool +FcCacheDirsValid (FcCache *cache) +{ + FcStrSet *dirs = FcStrSetCreate (); + FcBool ret = FcFalse; + + if (!dirs) + goto bail; + if (!FcDirScanOnly (dirs, FcCacheDir (cache))) + goto bail1; + ret = cache->dirs_count == dirs->num; + if (FcDebug () & FC_DBG_CACHE) + printf ("%s: cache: %d, fs: %d\n", FcCacheDir (cache), cache->dirs_count, dirs->num); + +bail1: + FcStrSetDestroy (dirs); +bail: + return ret; +} + /* * Map a cache file into memory */ @@ -559,7 +579,8 @@ FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat) cache = FcCacheFindByStat (fd_stat); if (cache) { - if (FcCacheTimeValid (cache, dir_stat)) + if (FcCacheTimeValid (cache, dir_stat) && + FcCacheDirsValid (cache)) return cache; FcDirCacheUnload (cache); cache = NULL; @@ -611,6 +632,7 @@ FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat) cache->version < FC_CACHE_CONTENT_VERSION || cache->size != (intptr_t) fd_stat->st_size || !FcCacheTimeValid (cache, dir_stat) || + !FcCacheDirsValid (cache) || !FcCacheInsert (cache, fd_stat)) { if (allocated) diff --git a/src/fcdir.c b/src/fcdir.c index 3bcd0b8..49259c1 100644 --- a/src/fcdir.c +++ b/src/fcdir.c @@ -164,7 +164,8 @@ FcDirScanConfig (FcFontSet *set, FcBlanks *blanks, const FcChar8 *dir, FcBool force, /* XXX unused */ - FcConfig *config) + FcConfig *config, + FcBool scanOnly) { DIR *d; struct dirent *e; @@ -180,7 +181,7 @@ FcDirScanConfig (FcFontSet *set, if (!set && !dirs) return FcTrue; - if (!blanks) + if (!blanks && !scanOnly) blanks = FcConfigGetBlanks (config); /* freed below */ @@ -233,7 +234,17 @@ FcDirScanConfig (FcFontSet *set, * Scan file files to build font patterns */ for (i = 0; i < files->num; i++) - FcFileScanConfig (set, dirs, blanks, files->strs[i], config); + { + if (scanOnly) + { + if (FcFileIsDir (files->strs[i])) + FcStrSetAdd (dirs, files->strs[i]); + } + else + { + FcFileScanConfig (set, dirs, blanks, files->strs[i], config); + } + } bail2: FcStrSetDestroy (files); @@ -257,7 +268,14 @@ FcDirScan (FcFontSet *set, if (cache || !force) return FcFalse; - return FcDirScanConfig (set, dirs, blanks, dir, force, FcConfigGetCurrent ()); + return FcDirScanConfig (set, dirs, blanks, dir, force, FcConfigGetCurrent (), FcFalse); +} + +FcBool +FcDirScanOnly (FcStrSet *dirs, + const FcChar8 *dir) +{ + return FcDirScanConfig (NULL, dirs, NULL, dir, FcTrue, NULL, FcTrue); } /* @@ -288,7 +306,7 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config) /* * Scan the dir */ - if (!FcDirScanConfig (set, dirs, NULL, dir, FcTrue, config)) + if (!FcDirScanConfig (set, dirs, NULL, dir, FcTrue, config, FcFalse)) goto bail2; /* @@ -330,7 +348,7 @@ FcDirCacheRescan (const FcChar8 *dir, FcConfig *config) /* * Scan the dir */ - if (!FcDirScanConfig (NULL, dirs, NULL, dir, FcTrue, config)) + if (!FcDirScanConfig (NULL, dirs, NULL, dir, FcTrue, config, FcFalse)) goto bail1; /* * Rebuild the cache object diff --git a/src/fcint.h b/src/fcint.h index 3d41b0c..a1b147f 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -849,7 +849,12 @@ FcDirScanConfig (FcFontSet *set, FcBlanks *blanks, const FcChar8 *dir, FcBool force, - FcConfig *config); + FcConfig *config, + FcBool scanOnly); + +FcPrivate FcBool +FcDirScanOnly (FcStrSet *dirs, + const FcChar8 *dir); /* fcfont.c */ FcPrivate int -- 2.3.3 From cd9631d83e51bab95413a8aa0e8ecc68f3e3a0fc Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 12 Jun 2014 17:01:07 -0400 Subject: [PATCH] [ko.orth] Remove U+3164 HANGUL FILLER Better not to reject a font just over that. Note that we do NOT list U+115F and U+1160 either. --- fc-lang/ko.orth | 1 - 1 file changed, 1 deletion(-) diff --git a/fc-lang/ko.orth b/fc-lang/ko.orth index 39114a5..4bb52c6 100644 --- a/fc-lang/ko.orth +++ b/fc-lang/ko.orth @@ -86,7 +86,6 @@ 0x3161 # HANGUL LETTER EU 0x3162 # HANGUL LETTER YI 0x3163 # HANGUL LETTER I -0x3164 # HANGUL FILLER 0x3165 # HANGUL LETTER SSANGNIEUN 0x3166 # HANGUL LETTER NIEUN-TIKEUT 0x3167 # HANGUL LETTER NIEUN-SIOS -- 2.3.3 From 75abdaf5c8e8b14c3e9e94ff5c563091594a32cf Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 9 Jun 2014 21:53:01 -0400 Subject: [PATCH] Deprecate FC_HASH and don't compute it It was added without proper measurement and a fuzzy possible use-case (font servers) in mind, but reality check shows that this significantly slows down caching. As such, deprecate it and do NOT compute hash during caching. Makes caching two to three times faster (ignoring the 2 second delay in fc-cache). --- doc/fontconfig-devel.sgml | 2 +- fontconfig/fontconfig.h | 2 +- src/fcfreetype.c | 2 ++ src/fcobjs.h | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/fontconfig-devel.sgml b/doc/fontconfig-devel.sgml index e2cb1c2..2b1122f 100644 --- a/doc/fontconfig-devel.sgml +++ b/doc/fontconfig-devel.sgml @@ -198,7 +198,7 @@ convenience for the application's rendering mechanism. stylelang and fullnamelang prgname FC_PRGNAME String Name of the running program hash FC_HASH String SHA256 hash value of the font data - with "sha256:" prefix. + with "sha256:" prefix (deprecated) postscriptname FC_POSTSCRIPT_NAME String Font name in PostScript diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h index 069cb60..8575cc4 100644 --- a/fontconfig/fontconfig.h +++ b/fontconfig/fontconfig.h @@ -115,7 +115,7 @@ typedef int FcBool; #define FC_FONT_FEATURES "fontfeatures" /* String */ #define FC_NAMELANG "namelang" /* String RFC 3866 langs */ #define FC_PRGNAME "prgname" /* String */ -#define FC_HASH "hash" /* String */ +#define FC_HASH "hash" /* String (deprecated) */ #define FC_POSTSCRIPT_NAME "postscriptname" /* String */ #define FC_CACHE_SUFFIX ".cache-" FC_CACHE_VERSION diff --git a/src/fcfreetype.c b/src/fcfreetype.c index 3dd865a..464bc00 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1697,6 +1697,7 @@ FcFreeTypeQueryFace (const FT_Face face, goto bail1; +#if 0 /* * Compute hash digest for the font */ @@ -1744,6 +1745,7 @@ FcFreeTypeQueryFace (const FT_Face face, free (hashstr); } } +#endif /* diff --git a/src/fcobjs.h b/src/fcobjs.h index 72e71f9..dc3d834 100644 --- a/src/fcobjs.h +++ b/src/fcobjs.h @@ -44,7 +44,7 @@ FC_OBJECT (AUTOHINT, FcTypeBool, NULL) FC_OBJECT (GLOBAL_ADVANCE, FcTypeBool, NULL) /* deprecated */ FC_OBJECT (FILE, FcTypeString, FcCompareFilename) FC_OBJECT (INDEX, FcTypeInteger, NULL) -FC_OBJECT (RASTERIZER, FcTypeString, FcCompareString) +FC_OBJECT (RASTERIZER, FcTypeString, FcCompareString) /* deprecated */ FC_OBJECT (OUTLINE, FcTypeBool, FcCompareBool) FC_OBJECT (SCALABLE, FcTypeBool, FcCompareBool) FC_OBJECT (DPI, FcTypeDouble, NULL) @@ -66,6 +66,6 @@ FC_OBJECT (LCD_FILTER, FcTypeInteger, NULL) FC_OBJECT (NAMELANG, FcTypeString, NULL) FC_OBJECT (FONT_FEATURES, FcTypeString, NULL) FC_OBJECT (PRGNAME, FcTypeString, NULL) -FC_OBJECT (HASH, FcTypeString, FcCompareHash) +FC_OBJECT (HASH, FcTypeString, FcCompareHash) /* deprecated */ FC_OBJECT (POSTSCRIPT_NAME, FcTypeString, FcComparePostScript) /* ^-------------- Add new objects here. */ -- 2.3.3 From 8f62ccaa962b13781d7916d4d1c061993b991e69 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 9 Jun 2014 22:00:25 -0400 Subject: [PATCH] Remove unused FcHash code now that FC_HASH is deprecated --- src/Makefile.am | 1 - src/fcfreetype.c | 51 --------------- src/fchash.c | 189 ------------------------------------------------------- src/fcint.h | 19 ------ 4 files changed, 260 deletions(-) delete mode 100644 src/fchash.c diff --git a/src/Makefile.am b/src/Makefile.am index be20eba..c1991b2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -139,7 +139,6 @@ libfontconfig_la_SOURCES = \ fcformat.c \ fcfreetype.c \ fcfs.c \ - fchash.c \ fcinit.c \ fclang.c \ fclist.c \ diff --git a/src/fcfreetype.c b/src/fcfreetype.c index 464bc00..baf13e5 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1697,57 +1697,6 @@ FcFreeTypeQueryFace (const FT_Face face, goto bail1; -#if 0 - /* - * Compute hash digest for the font - */ - { - FcChar8 *hashstr = NULL; - FcHashDigest digest; - - FcHashInitDigest (digest); - - if (face->stream->read == NULL) - { - const char *data = (const char *) face->stream->base; - size_t total_len = face->stream->size; - size_t len = total_len; - - while (len >= 64) - { - FcHashDigestAddBlock (digest, data); - data += 64; - len -= 64; - } - FcHashDigestFinish (digest, data, total_len); - } else { - char data[64]; - size_t total_len = 0; - size_t len = 0; - - while ((len = face->stream->read (face->stream, total_len, (unsigned char *) data, sizeof(data))) == 64) - { - FcHashDigestAddBlock (digest, data); - total_len += 64; - } - total_len += len; - FcHashDigestFinish (digest, data, total_len); - } - - hashstr = FcHashToString (digest); - if (hashstr) - { - if (!FcPatternAddString (pat, FC_HASH, hashstr)) - { - free (hashstr); - goto bail1; - } - free (hashstr); - } - } -#endif - - /* * Compute the unicode coverage for the font */ diff --git a/src/fchash.c b/src/fchash.c deleted file mode 100644 index 1526cfd..0000000 --- a/src/fchash.c +++ /dev/null @@ -1,189 +0,0 @@ -/* - * fontconfig/src/fchash.c - * - * Copyright © 2003 Keith Packard - * Copyright © 2013 Red Hat, Inc. - * Copyright © 2014 Google, Inc. - * Red Hat Author(s): Akira TAGOH - * Google Author(s): Behdad Esfahbod - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of the author(s) not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. The authors make no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ -#include "fcint.h" -#include -#include - -/* SHA256 */ - - -#define ROTRN(w, v, n) ((((FcChar32)v) >> n) | (((FcChar32)v) << (w - n))) -#define ROTR32(v, n) ROTRN(32, v, n) -#define SHR(v, n) (v >> n) -#define Ch(x, y, z) ((x & y) ^ (~x & z)) -#define Maj(x, y, z) ((x & y) ^ (x & z) ^ (y & z)) -#define SS0(x) (ROTR32(x, 2) ^ ROTR32(x, 13) ^ ROTR32(x, 22)) -#define SS1(x) (ROTR32(x, 6) ^ ROTR32(x, 11) ^ ROTR32(x, 25)) -#define ss0(x) (ROTR32(x, 7) ^ ROTR32(x, 18) ^ SHR(x, 3)) -#define ss1(x) (ROTR32(x, 17) ^ ROTR32(x, 19) ^ SHR(x, 10)) - - - -void -FcHashInitDigest (FcHashDigest digest) -{ - static const FcHashDigest init = { - 0x6a09e667UL, 0xbb67ae85UL, 0x3c6ef372UL, 0xa54ff53aUL, - 0x510e527fUL, 0x9b05688cUL, 0x1f83d9abUL, 0x5be0cd19UL - }; - - memcpy (digest, init, sizeof (FcHashDigest)); -} - -void -FcHashDigestAddBlock (FcHashDigest digest, - const char block[64]) -{ - static const FcChar32 k[] = { - 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, - 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, - 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL, - 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL, - 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL, - 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, - 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, - 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL, - 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL, - 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL, - 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, - 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, - 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL, - 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL, - 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL, - 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL - }; - FcChar32 w[64], i, j, t1, t2; - FcChar32 a, b, c, d, e, f, g, h; - -#define H(n) (digest[n]) - - a = H(0); - b = H(1); - c = H(2); - d = H(3); - e = H(4); - f = H(5); - g = H(6); - h = H(7); - - for (i = 0; i < 16; i++) - { - j = (block[(i * 4) + 0] & 0xff) << (8 * 3); - j |= (block[(i * 4) + 1] & 0xff) << (8 * 2); - j |= (block[(i * 4) + 2] & 0xff) << (8 * 1); - j |= (block[(i * 4) + 3] & 0xff); - w[i] = j; - } - for (i = 16; i < 64; i++) - w[i] = ss1(w[i - 2]) + w[i - 7] + ss0(w[i - 15]) + w[i - 16]; - - for (i = 0; i < 64; i++) - { - t1 = h + SS1(e) + Ch(e, f, g) + k[i] + w[i]; - t2 = SS0(a) + Maj(a, b, c); - h = g; - g = f; - f = e; - e = d + t1; - d = c; - c = b; - b = a; - a = t1 + t2; - } - - H(0) += a; - H(1) += b; - H(2) += c; - H(3) += d; - H(4) += e; - H(5) += f; - H(6) += g; - H(7) += h; - -#undef H -} - -void -FcHashDigestFinish (FcHashDigest digest, - const char *residual, /* < 64 bytes */ - size_t total_len) -{ - char ibuf[64]; - unsigned int len = total_len % 64; - uint64_t v; - - if (!len) - return; - - memcpy (ibuf, residual, len); - memset (ibuf + len, 0, 64 - len); - ibuf[len] = 0x80; - - if ((64 - len) < 9) - { - FcHashDigestAddBlock (digest, ibuf); - memset (ibuf, 0, 64); - } - - /* set input size at the end */ - v = (uint64_t) total_len * 8; - ibuf[63 - 0] = v & 0xff; - ibuf[63 - 1] = (v >> 8) & 0xff; - ibuf[63 - 2] = (v >> 16) & 0xff; - ibuf[63 - 3] = (v >> 24) & 0xff; - ibuf[63 - 4] = (v >> 32) & 0xff; - ibuf[63 - 5] = (v >> 40) & 0xff; - ibuf[63 - 6] = (v >> 48) & 0xff; - ibuf[63 - 7] = (v >> 56) & 0xff; - FcHashDigestAddBlock (digest, ibuf); -} - -FcChar8 * -FcHashToString (const FcHashDigest digest) -{ - FcChar8 *ret = NULL; - static const char hex[] = "0123456789abcdef"; - int i, j; - - ret = malloc (sizeof (FcChar8) * (8 * 8 + 7 + 1)); - if (!ret) - return NULL; - memcpy (ret, "sha256:", 7); -#define H(n) digest[n] - for (i = 0; i < 8; i++) - { - FcChar32 v = H(i); - - for (j = 0; j < 8; j++) - ret[7 + (i * 8) + j] = hex[(v >> (28 - j * 4)) & 0xf]; - } - ret[7 + i * 8] = 0; -#undef H - - return ret; -} diff --git a/src/fcint.h b/src/fcint.h index a1b147f..6871fdc 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -871,25 +871,6 @@ FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s); FcPrivate FcFontSet * FcFontSetDeserialize (const FcFontSet *set); -/* fchash.c */ - -typedef FcChar32 FcHashDigest[8]; - -FcPrivate void -FcHashInitDigest (FcHashDigest digest); - -FcPrivate void -FcHashDigestAddBlock (FcHashDigest digest, - const char block[64]); - -FcPrivate void -FcHashDigestFinish (FcHashDigest digest, - const char *residual, /* < 64 bytes */ - size_t total_len); - -FcPrivate FcChar8 * -FcHashToString (const FcHashDigest digest); - /* fcinit.c */ FcPrivate FcConfig * FcInitLoadOwnConfig (FcConfig *config); -- 2.3.3 From d17f556153fbaf8fe57fdb4fc1f0efa4313f0ecf Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 17 Jun 2014 20:08:24 +0900 Subject: [PATCH] Read the config files and fonts on the sysroot when --sysroot is given to fc-cache Fix for e96d7760886a3781a46b3271c76af99e15cb0146 https://bugs.freedesktop.org/show_bug.cgi?id=59456 --- fc-cache/fc-cache.c | 10 ++++--- src/fccache.c | 76 +++++++++++++++++++++++++++++++++++-------------- src/fccfg.c | 2 +- src/fcdir.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++------- src/fcinit.c | 17 +++++++++-- src/fcint.h | 3 +- src/fcxml.c | 12 ++++++-- 7 files changed, 158 insertions(+), 44 deletions(-) diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c index 90ebad3..406ac6a 100644 --- a/fc-cache/fc-cache.c +++ b/fc-cache/fc-cache.c @@ -128,7 +128,8 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, struct stat statb; FcBool was_valid; int i; - + const FcChar8 *sysroot = FcConfigGetSysRoot (config); + /* * Now scan all of the directories into separate databases * and write out the results @@ -138,9 +139,10 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, if (verbose) { if (!recursive) - printf ("Re-scanning %s: ", dir); - else - printf ("%s: ", dir); + printf ("Re-scanning "); + if (sysroot) + printf ("[%s]", sysroot); + printf ("%s: ", dir); fflush (stdout); } diff --git a/src/fccache.c b/src/fccache.c index 085bd72..25538bd 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -177,19 +177,28 @@ FcDirCacheOpenFile (const FcChar8 *cache_file, struct stat *file_stat) */ static FcBool FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, - FcBool (*callback) (int fd, struct stat *fd_stat, + FcBool (*callback) (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, void *closure), void *closure, FcChar8 **cache_file_ret) { int fd = -1; FcChar8 cache_base[CACHEBASE_LEN]; FcStrList *list; - FcChar8 *cache_dir; + FcChar8 *cache_dir, *d; struct stat file_stat, dir_stat; FcBool ret = FcFalse; + const FcChar8 *sysroot = FcConfigGetSysRoot (config); - if (FcStatChecksum (dir, &dir_stat) < 0) + if (sysroot) + d = FcStrBuildFilename (sysroot, dir, NULL); + else + d = FcStrdup (dir); + if (FcStatChecksum (d, &dir_stat) < 0) + { + FcStrFree (d); return FcFalse; + } + FcStrFree (d); FcDirCacheBasename (dir, cache_base); @@ -199,7 +208,6 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, while ((cache_dir = FcStrListNext (list))) { - const FcChar8 *sysroot = FcConfigGetSysRoot (config); FcChar8 *cache_hashed; if (sysroot) @@ -210,7 +218,7 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir, break; fd = FcDirCacheOpenFile (cache_hashed, &file_stat); if (fd >= 0) { - ret = (*callback) (fd, &file_stat, &dir_stat, closure); + ret = (*callback) (config, fd, &file_stat, &dir_stat, closure); close (fd); if (ret) { @@ -529,14 +537,25 @@ FcCacheFini (void) } static FcBool -FcCacheTimeValid (FcCache *cache, struct stat *dir_stat) +FcCacheTimeValid (FcConfig *config, FcCache *cache, struct stat *dir_stat) { struct stat dir_static; if (!dir_stat) { - if (FcStatChecksum (FcCacheDir (cache), &dir_static) < 0) + const FcChar8 *sysroot = FcConfigGetSysRoot (config); + FcChar8 *d; + + if (sysroot) + d = FcStrBuildFilename (sysroot, FcCacheDir (cache), NULL); + else + d = FcStrdup (FcCacheDir (cache)); + if (FcStatChecksum (d, &dir_static) < 0) + { + FcStrFree (d); return FcFalse; + } + FcStrFree (d); dir_stat = &dir_static; } if (FcDebug () & FC_DBG_CACHE) @@ -546,21 +565,28 @@ FcCacheTimeValid (FcCache *cache, struct stat *dir_stat) } static FcBool -FcCacheDirsValid (FcCache *cache) +FcCacheDirsValid (FcConfig *config, FcCache *cache) { FcStrSet *dirs = FcStrSetCreate (); FcBool ret = FcFalse; + const FcChar8 *sysroot = FcConfigGetSysRoot (config); + FcChar8 *d; if (!dirs) goto bail; - if (!FcDirScanOnly (dirs, FcCacheDir (cache))) + if (sysroot) + d = FcStrBuildFilename (sysroot, FcCacheDir (cache), NULL); + else + d = FcStrdup (FcCacheDir (cache)); + if (!FcDirScanOnly (dirs, d, config)) goto bail1; ret = cache->dirs_count == dirs->num; if (FcDebug () & FC_DBG_CACHE) - printf ("%s: cache: %d, fs: %d\n", FcCacheDir (cache), cache->dirs_count, dirs->num); + printf ("%s: cache: %d, fs: %d\n", d, cache->dirs_count, dirs->num); bail1: FcStrSetDestroy (dirs); + FcStrFree (d); bail: return ret; } @@ -569,7 +595,7 @@ bail: * Map a cache file into memory */ static FcCache * -FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat) +FcDirCacheMapFd (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat) { FcCache *cache; FcBool allocated = FcFalse; @@ -579,8 +605,8 @@ FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat) cache = FcCacheFindByStat (fd_stat); if (cache) { - if (FcCacheTimeValid (cache, dir_stat) && - FcCacheDirsValid (cache)) + if (FcCacheTimeValid (config, cache, dir_stat) && + FcCacheDirsValid (config, cache)) return cache; FcDirCacheUnload (cache); cache = NULL; @@ -631,8 +657,8 @@ FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat) if (cache->magic != FC_CACHE_MAGIC_MMAP || cache->version < FC_CACHE_CONTENT_VERSION || cache->size != (intptr_t) fd_stat->st_size || - !FcCacheTimeValid (cache, dir_stat) || - !FcCacheDirsValid (cache) || + !FcCacheTimeValid (config, cache, dir_stat) || + !FcCacheDirsValid (config, cache) || !FcCacheInsert (cache, fd_stat)) { if (allocated) @@ -671,9 +697,9 @@ FcDirCacheUnload (FcCache *cache) } static FcBool -FcDirCacheMapHelper (int fd, struct stat *fd_stat, struct stat *dir_stat, void *closure) +FcDirCacheMapHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, void *closure) { - FcCache *cache = FcDirCacheMapFd (fd, fd_stat, dir_stat); + FcCache *cache = FcDirCacheMapFd (config, fd, fd_stat, dir_stat); if (!cache) return FcFalse; @@ -690,6 +716,7 @@ FcDirCacheLoad (const FcChar8 *dir, FcConfig *config, FcChar8 **cache_file) FcDirCacheMapHelper, &cache, cache_file)) return NULL; + return cache; } @@ -705,7 +732,7 @@ FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat) fd = FcDirCacheOpenFile (cache_file, file_stat); if (fd < 0) return NULL; - cache = FcDirCacheMapFd (fd, file_stat, NULL); + cache = FcDirCacheMapFd (FcConfigGetCurrent (), fd, file_stat, NULL); close (fd); return cache; } @@ -715,7 +742,7 @@ FcDirCacheLoadFile (const FcChar8 *cache_file, struct stat *file_stat) * the magic number and the size field */ static FcBool -FcDirCacheValidateHelper (int fd, struct stat *fd_stat, struct stat *dir_stat, void *closure FC_UNUSED) +FcDirCacheValidateHelper (FcConfig *config, int fd, struct stat *fd_stat, struct stat *dir_stat, void *closure FC_UNUSED) { FcBool ret = FcTrue; FcCache c; @@ -1080,15 +1107,22 @@ FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose) } else { + FcChar8 *s; + target_dir = FcCacheDir (cache); - if (stat ((char *) target_dir, &target_stat) < 0) + if (sysroot) + s = FcStrBuildFilename (sysroot, target_dir, NULL); + else + s = FcStrdup (target_dir); + if (stat ((char *) s, &target_stat) < 0) { if (verbose || FcDebug () & FC_DBG_CACHE) printf ("%s: %s: missing directory: %s \n", - dir, ent->d_name, target_dir); + dir, ent->d_name, s); remove = FcTrue; } FcDirCacheUnload (cache); + FcStrFree (s); } if (remove) { diff --git a/src/fccfg.c b/src/fccfg.c index fe69eec..8b62e52 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -375,7 +375,7 @@ FcConfigAddDirList (FcConfig *config, FcSetName set, FcStrSet *dirSet) while ((dir = FcStrListNext (dirlist))) { if (FcDebug () & FC_DBG_FONTSET) - printf ("adding fonts from%s\n", dir); + printf ("adding fonts from %s\n", dir); cache = FcDirCacheRead (dir, FcFalse, config); if (!cache) continue; diff --git a/src/fcdir.c b/src/fcdir.c index 49259c1..b35997f 100644 --- a/src/fcdir.c +++ b/src/fcdir.c @@ -69,6 +69,7 @@ FcFileScanFontConfig (FcFontSet *set, FcBool ret = FcTrue; int id; int count = 0; + const FcChar8 *sysroot = FcConfigGetSysRoot (config); id = 0; do @@ -85,6 +86,28 @@ FcFileScanFontConfig (FcFontSet *set, font = FcFreeTypeQuery (file, id, blanks, &count); if (FcDebug () & FC_DBG_SCAN) printf ("done\n"); + /* + * Get rid of sysroot here so that targeting scan rule may contains FC_FILE pattern + * and they should usually expect without sysroot. + */ + if (sysroot) + { + size_t len = strlen ((const char *)sysroot); + FcChar8 *f = NULL; + + if (FcPatternObjectGetString (font, FC_FILE_OBJECT, 0, &f) == FcResultMatch && + strncmp ((const char *)f, (const char *)sysroot, len) == 0) + { + FcChar8 *s = FcStrdup (f); + FcPatternObjectDel (font, FC_FILE_OBJECT); + if (s[len] != '/') + len--; + else if (s[len+1] == '/') + len++; + FcPatternObjectAddString (font, FC_FILE_OBJECT, &s[len]); + FcStrFree (s); + } + } /* * Edit pattern with user-defined rules @@ -128,7 +151,23 @@ FcFileScanConfig (FcFontSet *set, FcConfig *config) { if (FcFileIsDir (file)) - return FcStrSetAdd (dirs, file); + { + const FcChar8 *sysroot = FcConfigGetSysRoot (config); + const FcChar8 *d; + size_t len = strlen ((const char *)sysroot); + + if (sysroot && strncmp ((const char *)file, (const char *)sysroot, len) == 0) + { + if (file[len] != '/') + len--; + else if (file[len+1] == '/') + len++; + d = &file[len]; + } + else + d = file; + return FcStrSetAdd (dirs, d); + } else { if (set) @@ -238,7 +277,7 @@ FcDirScanConfig (FcFontSet *set, if (scanOnly) { if (FcFileIsDir (files->strs[i])) - FcStrSetAdd (dirs, files->strs[i]); + FcFileScanConfig (NULL, dirs, NULL, files->strs[i], config); } else { @@ -273,9 +312,10 @@ FcDirScan (FcFontSet *set, FcBool FcDirScanOnly (FcStrSet *dirs, - const FcChar8 *dir) + const FcChar8 *dir, + FcConfig *config) { - return FcDirScanConfig (NULL, dirs, NULL, dir, FcTrue, NULL, FcTrue); + return FcDirScanConfig (NULL, dirs, NULL, dir, FcTrue, config, FcTrue); } /* @@ -288,11 +328,18 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config) FcFontSet *set; FcCache *cache = NULL; struct stat dir_stat; + const FcChar8 *sysroot = FcConfigGetSysRoot (config); + FcChar8 *d; + + if (sysroot) + d = FcStrBuildFilename (sysroot, dir, NULL); + else + d = FcStrdup (dir); if (FcDebug () & FC_DBG_FONTSET) - printf ("cache scan dir %s\n", dir); + printf ("cache scan dir %s\n", d); - if (FcStatChecksum (dir, &dir_stat) < 0) + if (FcStatChecksum (d, &dir_stat) < 0) goto bail; set = FcFontSetCreate(); @@ -306,7 +353,7 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config) /* * Scan the dir */ - if (!FcDirScanConfig (set, dirs, NULL, dir, FcTrue, config, FcFalse)) + if (!FcDirScanConfig (set, dirs, NULL, d, FcTrue, config, FcFalse)) goto bail2; /* @@ -326,20 +373,30 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config) bail1: FcFontSetDestroy (set); bail: + FcStrFree (d); + return cache; } FcCache * FcDirCacheRescan (const FcChar8 *dir, FcConfig *config) { - FcCache *cache = FcDirCacheLoad (dir, config, NULL); + FcCache *cache; FcCache *new = NULL; struct stat dir_stat; FcStrSet *dirs; + const FcChar8 *sysroot = FcConfigGetSysRoot (config); + FcChar8 *d = NULL; + cache = FcDirCacheLoad (dir, config, NULL); if (!cache) - return NULL; - if (FcStatChecksum (dir, &dir_stat) < 0) + goto bail; + + if (sysroot) + d = FcStrBuildFilename (sysroot, dir, NULL); + else + d = FcStrdup (dir); + if (FcStatChecksum (d, &dir_stat) < 0) goto bail; dirs = FcStrSetCreate (); if (!dirs) @@ -348,7 +405,7 @@ FcDirCacheRescan (const FcChar8 *dir, FcConfig *config) /* * Scan the dir */ - if (!FcDirScanConfig (NULL, dirs, NULL, dir, FcTrue, config, FcFalse)) + if (!FcDirScanConfig (NULL, dirs, NULL, d, FcTrue, config, FcFalse)) goto bail1; /* * Rebuild the cache object @@ -365,6 +422,9 @@ FcDirCacheRescan (const FcChar8 *dir, FcConfig *config) bail1: FcStrSetDestroy (dirs); bail: + if (d) + FcStrFree (d); + return new; } diff --git a/src/fcinit.c b/src/fcinit.c index b8d5d06..1e23c1f 100644 --- a/src/fcinit.c +++ b/src/fcinit.c @@ -36,13 +36,14 @@ #endif static FcConfig * -FcInitFallbackConfig (void) +FcInitFallbackConfig (const FcChar8 *sysroot) { FcConfig *config; config = FcConfigCreate (); if (!config) goto bail0; + FcConfigSetSysRoot (config, sysroot); if (!FcConfigAddDir (config, (FcChar8 *) FC_DEFAULT_FONTS)) goto bail1; if (!FcConfigAddCacheDir (config, (FcChar8 *) FC_CACHEDIR)) @@ -78,8 +79,12 @@ FcInitLoadOwnConfig (FcConfig *config) if (!FcConfigParseAndLoad (config, 0, FcTrue)) { + const FcChar8 *sysroot = FcConfigGetSysRoot (config); + FcConfig *fallback = FcInitFallbackConfig (sysroot); + FcConfigDestroy (config); - return FcInitFallbackConfig (); + + return fallback; } if (config->cacheDirs && config->cacheDirs->num == 0) @@ -108,13 +113,19 @@ FcInitLoadOwnConfig (FcConfig *config) if (!FcConfigAddCacheDir (config, (FcChar8 *) FC_CACHEDIR) || !FcConfigAddCacheDir (config, (FcChar8 *) prefix)) { + FcConfig *fallback; + const FcChar8 *sysroot; + bail: + sysroot = FcConfigGetSysRoot (config); fprintf (stderr, "Fontconfig error: out of memory"); if (prefix) FcStrFree (prefix); + fallback = FcInitFallbackConfig (sysroot); FcConfigDestroy (config); - return FcInitFallbackConfig (); + + return fallback; } FcStrFree (prefix); } diff --git a/src/fcint.h b/src/fcint.h index 6871fdc..d3079ed 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -854,7 +854,8 @@ FcDirScanConfig (FcFontSet *set, FcPrivate FcBool FcDirScanOnly (FcStrSet *dirs, - const FcChar8 *dir); + const FcChar8 *dir, + FcConfig *config); /* fcfont.c */ FcPrivate int diff --git a/src/fcxml.c b/src/fcxml.c index c68b0cf..3dc1357 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -3129,11 +3129,12 @@ FcConfigParseAndLoad (FcConfig *config, { XML_Parser p; - FcChar8 *filename; + FcChar8 *filename, *f; int fd; int len; FcConfigParse parse; FcBool error = FcTrue; + const FcChar8 *sysroot = FcConfigGetSysRoot (config); #ifdef ENABLE_LIBXML2 xmlSAXHandler sax; @@ -3158,9 +3159,14 @@ FcConfigParseAndLoad (FcConfig *config, } #endif - filename = FcConfigFilename (name); - if (!filename) + f = FcConfigFilename (name); + if (!f) goto bail0; + if (sysroot) + filename = FcStrBuildFilename (sysroot, f, NULL); + else + filename = FcStrdup (f); + FcStrFree (f); if (FcStrSetMember (config->configFiles, filename)) { -- 2.3.3 From 8915c15b9ee394ef19042f1acf75eb8b0592e5a7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 12 Jun 2014 17:56:04 -0400 Subject: [PATCH] Update list of blanks to Unicode 6.3.0 Some were bogus, some were missing. See: https://bugs.freedesktop.org/show_bug.cgi?id=79956 --- fonts.conf.in | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/fonts.conf.in b/fonts.conf.in index 6a8753d..5f6eccc 100644 --- a/fonts.conf.in +++ b/fonts.conf.in @@ -88,17 +88,15 @@ 0x00A0 0x00AD 0x034F - 0x0600 - 0x0601 - 0x0602 - 0x0603 - 0x06DD - 0x070F + 0x061C 0x115F 0x1160 0x1680 0x17B4 0x17B5 + 0x180B + 0x180C + 0x180D 0x180E 0x2000 0x2001 @@ -116,8 +114,6 @@ 0x200D 0x200E 0x200F - 0x2028 - 0x2029 0x202A 0x202B 0x202C @@ -129,6 +125,11 @@ 0x2061 0x2062 0x2063 + 0x2064 + 0x2066 + 0x2067 + 0x2068 + 0x2069 0x206A 0x206B 0x206C @@ -140,9 +141,6 @@ 0x3164 0xFEFF 0xFFA0 - 0xFFF9 - 0xFFFA - 0xFFFB 0xFEFF 0xFFA0 + 0x1BCA0 + 0x1BCA1 + 0x1BCA2 + 0x1BCA3 @@ -104,6 +100,10 @@ Luxi Sans sans-serif + + Trebuchet MS + serif + -- 2.3.3 From 748a2ce9d4bd6aae90b974724b795056e2bcb4d7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 6 Aug 2014 14:45:02 -0400 Subject: [PATCH] Fix previous commit Ouch! --- conf.d/45-latin.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf.d/45-latin.conf b/conf.d/45-latin.conf index 0cbf7c9..996fb81 100644 --- a/conf.d/45-latin.conf +++ b/conf.d/45-latin.conf @@ -102,7 +102,7 @@ Trebuchet MS - serif + sans-serif Nimbus Mono L @@ -418,10 +415,7 @@ but in an order preferring similar designs first. We do this in three steps: Times - Nimbus Roman No9 L -- 2.3.3 From b732bf057f4b3ec3bac539803005e9c42d056b2a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 6 Nov 2014 13:15:09 +0900 Subject: [PATCH] Update aliases for new URW fonts Patch from Tom Yan https://bugs.freedesktop.org/show_bug.cgi?id=85225 --- conf.d/30-metric-aliases.conf | 94 ++++++++++++++++++++++++++++++++++++++----- conf.d/45-latin.conf | 12 ++++++ conf.d/60-latin.conf | 3 ++ 3 files changed, 98 insertions(+), 11 deletions(-) diff --git a/conf.d/30-metric-aliases.conf b/conf.d/30-metric-aliases.conf index 49a9602..cd1e924 100644 --- a/conf.d/30-metric-aliases.conf +++ b/conf.d/30-metric-aliases.conf @@ -6,17 +6,17 @@ Alias similar/metric-compatible families from various sources: -PostScript fonts: URW fonts: GUST fonts: Windows fonts: -====================== ==================== ================= ================== -Helvetica Nimbus Sans L TeX Gyre Heros -Helvetica Condensed TeX Gyre Heros Cn -Times Nimbus Roman No9 L TeX Gyre Termes -Courier Nimbus Mono L TeX Gyre Cursor -ITC Avant Garde Gothic URW Gothic L TeX Gyre Adventor -ITC Bookman URW Bookman L TeX Gyre Bonum Bookman Old Style -ITC Zapf Chancery URW Chancery L TeX Gyre Chorus -Palatino URW Palladio L TeX Gyre Pagella Palatino Linotype -New Century Schoolbook Century Schoolbook L TeX Gyre Schola Century Schoolbook +PostScript fonts: URW fonts: GUST fonts: Windows fonts: +====================== ====================== ================= ================== +Helvetica Nimbus Sans TeX Gyre Heros +Helvetica Condensed Nimbus Sans Narrow TeX Gyre Heros Cn +Times Nimbus Roman TeX Gyre Termes +Courier Nimbus Mono TeX Gyre Cursor +ITC Avant Garde Gothic URW Gothic TeX Gyre Adventor +ITC Bookman Bookman URW TeX Gyre Bonum Bookman Old Style +ITC Zapf Chancery Chancery URW TeX Gyre Chorus +Palatino Palladio URW TeX Gyre Pagella Palatino Linotype +New Century Schoolbook Century SchoolBook URW TeX Gyre Schola Century Schoolbook Microsoft fonts: Liberation fonts: Google CrOS core fonts: StarOffice fonts: AMT fonts: ================ ====================== ======================= ================= ============== @@ -57,6 +57,13 @@ but in an order preferring similar designs first. We do this in three steps: + Nimbus Sans + + Helvetica + + + + TeX Gyre Heros Helvetica @@ -64,6 +71,13 @@ but in an order preferring similar designs first. We do this in three steps: + Nimbus Sans Narrow + + Helvetica Condensed + + + + TeX Gyre Heros Cn Helvetica Condensed @@ -78,6 +92,13 @@ but in an order preferring similar designs first. We do this in three steps: + Nimbus Roman + + Times + + + + TeX Gyre Termes Times @@ -92,6 +113,13 @@ but in an order preferring similar designs first. We do this in three steps: + Nimbus Mono + + Courier + + + + TeX Gyre Cursor Courier @@ -113,6 +141,13 @@ but in an order preferring similar designs first. We do this in three steps: + URW Gothic + + ITC Avant Garde Gothic + + + + TeX Gyre Adventor ITC Avant Garde Gothic @@ -134,6 +169,13 @@ but in an order preferring similar designs first. We do this in three steps: + Bookman URW + + ITC Bookman + + + + TeX Gyre Bonum ITC Bookman @@ -162,6 +204,13 @@ but in an order preferring similar designs first. We do this in three steps: + Chancery URW + + ITC Zapf Chancery + + + + TeX Gyre Chorus ITC Zapf Chancery @@ -176,6 +225,13 @@ but in an order preferring similar designs first. We do this in three steps: + Palladio URW + + Palatino + + + + TeX Gyre Pagella Palatino @@ -197,6 +253,13 @@ but in an order preferring similar designs first. We do this in three steps: + Century SchoolBook URW + + New Century Schoolbook + + + + TeX Gyre Schola New Century Schoolbook @@ -401,6 +464,7 @@ but in an order preferring similar designs first. We do this in three steps: Helvetica TeX Gyre Heros + Nimbus Sans Nimbus Sans L @@ -409,6 +473,7 @@ but in an order preferring similar designs first. We do this in three steps: Helvetica Condensed TeX Gyre Heros Cn + Nimbus Sans Narrow @@ -416,6 +481,7 @@ but in an order preferring similar designs first. We do this in three steps: Times TeX Gyre Termes + Nimbus Roman Nimbus Roman No9 L @@ -424,6 +490,7 @@ but in an order preferring similar designs first. We do this in three steps: Courier TeX Gyre Cursor + Nimbus Mono Nimbus Mono L @@ -432,6 +499,7 @@ but in an order preferring similar designs first. We do this in three steps: ITC Avant Garde Gothic TeX Gyre Adventor + URW Gothic URW Gothic L @@ -441,6 +509,7 @@ but in an order preferring similar designs first. We do this in three steps: Bookman Old Style TeX Gyre Bonum + Bookman URW URW Bookman L @@ -449,6 +518,7 @@ but in an order preferring similar designs first. We do this in three steps: ITC Zapf Chancery TeX Gyre Chorus + Chancery URW URW Chancery L @@ -458,6 +528,7 @@ but in an order preferring similar designs first. We do this in three steps: Palatino Linotype TeX Gyre Pagella + Palladio URW URW Palladio L @@ -467,6 +538,7 @@ but in an order preferring similar designs first. We do this in three steps: Century Schoolbook TeX Gyre Schola + Century SchoolBook URW Century Schoolbook L diff --git a/conf.d/45-latin.conf b/conf.d/45-latin.conf index 996fb81..72490f3 100644 --- a/conf.d/45-latin.conf +++ b/conf.d/45-latin.conf @@ -34,6 +34,10 @@ serif + Nimbus Roman + serif + + Luxi Serif serif @@ -97,6 +101,10 @@ sans-serif + Nimbus Sans + sans-serif + + Luxi Sans sans-serif @@ -151,6 +159,10 @@ Nimbus Mono L monospace + + Nimbus Mono + monospace + diff --git a/conf.d/60-latin.conf b/conf.d/60-latin.conf index 2107e31..35600ea 100644 --- a/conf.d/60-latin.conf +++ b/conf.d/60-latin.conf @@ -10,6 +10,7 @@ Thorndale AMT Luxi Serif Nimbus Roman No9 L + Nimbus Roman Times @@ -23,6 +24,7 @@ Albany AMT Luxi Sans Nimbus Sans L + Nimbus Sans Helvetica Lucida Sans Unicode BPG Glaho International @@ -40,6 +42,7 @@ Cumberland AMT Luxi Mono Nimbus Mono L + Nimbus Mono Courier -- 2.3.3 From 32ac7c75e8db0135ef37cf86f92d8b9be000c8bb Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 9 Dec 2014 19:06:46 +0900 Subject: [PATCH] Returns False if no fonts found https://bugs.freedesktop.org/show_bug.cgi?id=86950 --- doc/fcconfig.fncs | 10 ++++++---- src/fccfg.c | 23 +++++++++++++---------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/doc/fcconfig.fncs b/doc/fcconfig.fncs index 10f5afc..af328fc 100644 --- a/doc/fcconfig.fncs +++ b/doc/fcconfig.fncs @@ -219,8 +219,9 @@ If config is NULL, the current configuration is used. @PURPOSE@ Add font file to font database @DESC@ Adds an application-specific font to the configuration. Returns FcFalse -if the fonts cannot be added (due to allocation failure). Otherwise returns FcTrue. -If config is NULL, the current configuration is used. +if the fonts cannot be added (due to allocation failure or no fonts found). +Otherwise returns FcTrue. If config is NULL, +the current configuration is used. @@ @RET@ FcBool @@ -231,8 +232,9 @@ If config is NULL, the current configuration is used. @DESC@ Scans the specified directory for fonts, adding each one found to the application-specific set of fonts. Returns FcFalse -if the fonts cannot be added (due to allocation failure). Otherwise returns FcTrue. -If config is NULL, the current configuration is used. +if the fonts cannot be added (due to allocation failure or no fonts found). +Otherwise returns FcTrue. If config is NULL, +the current configuration is used. @@ @RET@ void diff --git a/src/fccfg.c b/src/fccfg.c index 55cb297..b27ab0b 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -367,6 +367,7 @@ FcConfigAddDirList (FcConfig *config, FcSetName set, FcStrSet *dirSet) FcStrList *dirlist; FcChar8 *dir; FcCache *cache; + FcBool ret = FcFalse; dirlist = FcStrListCreate (dirSet); if (!dirlist) @@ -381,9 +382,10 @@ FcConfigAddDirList (FcConfig *config, FcSetName set, FcStrSet *dirSet) continue; FcConfigAddCache (config, cache, set, dirSet); FcDirCacheUnload (cache); + ret = FcTrue; } FcStrListDone (dirlist); - return FcTrue; + return ret; } /* @@ -2185,6 +2187,7 @@ FcConfigAppFontAddFile (FcConfig *config, FcStrSet *subdirs; FcStrList *sublist; FcChar8 *subdir; + FcBool ret = FcFalse; if (!config) { @@ -2218,12 +2221,13 @@ FcConfigAppFontAddFile (FcConfig *config, { while ((subdir = FcStrListNext (sublist))) { - FcConfigAppFontAddDir (config, subdir); + if (FcConfigAppFontAddDir (config, subdir)) + ret = FcTrue; } FcStrListDone (sublist); } FcStrSetDestroy (subdirs); - return FcTrue; + return ret; } FcBool @@ -2232,6 +2236,7 @@ FcConfigAppFontAddDir (FcConfig *config, { FcFontSet *set; FcStrSet *dirs; + FcBool ret = FcTrue; if (!config) { @@ -2250,8 +2255,8 @@ FcConfigAppFontAddDir (FcConfig *config, set = FcFontSetCreate (); if (!set) { - FcStrSetDestroy (dirs); - return FcFalse; + ret = FcFalse; + goto bail; } FcConfigSetFonts (config, set, FcSetApplication); } @@ -2259,12 +2264,10 @@ FcConfigAppFontAddDir (FcConfig *config, FcStrSetAddFilename (dirs, dir); if (!FcConfigAddDirList (config, FcSetApplication, dirs)) - { - FcStrSetDestroy (dirs); - return FcFalse; - } + ret = FcFalse; +bail: FcStrSetDestroy (dirs); - return FcTrue; + return ret; } void -- 2.3.3 From fc7e1a9497919c88d790d9395eb01cd7d5121507 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 12 Dec 2014 21:42:35 -0800 Subject: [PATCH] Fix buffer overflow in copying PS name As reported on the mailing list by Tanel Liiv. Found using American Fuzzy Lop. --- src/fcfreetype.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fcfreetype.c b/src/fcfreetype.c index aca2f70..da66741 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1556,7 +1556,8 @@ FcFreeTypeQueryFace (const FT_Face face, } else { - strcpy (psname, tmp); + strncpy (psname, tmp, 255); + psname[255] = 0; } if (!FcPatternAddString (pat, FC_POSTSCRIPT_NAME, (const FcChar8 *)psname)) goto bail1; -- 2.3.3 From dbc7c4a2cfe1ba6c537957b3b68b625403ca99fd Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 14 Dec 2014 13:39:41 -0800 Subject: [PATCH] Add FC_COLOR Only adds "color" to pattern if FreeType version supports color. Based on patch from Jungshik Shin. --- doc/fontconfig-devel.sgml | 1 + fontconfig/fontconfig.h | 1 + src/fcfreetype.c | 6 ++++++ src/fcmatch.c | 1 + src/fcobjs.h | 1 + 5 files changed, 10 insertions(+) diff --git a/doc/fontconfig-devel.sgml b/doc/fontconfig-devel.sgml index 2b1122f..9f3613a 100644 --- a/doc/fontconfig-devel.sgml +++ b/doc/fontconfig-devel.sgml @@ -176,6 +176,7 @@ convenience for the application's rendering mechanism. scalable FC_SCALABLE Bool Whether glyphs can be scaled scale FC_SCALE Double Scale factor for point->pixel conversions + color FC_COLOR Bool Whether any glyphs have color dpi FC_DPI Double Target dots per inch rgba FC_RGBA Int unknown, rgb, bgr, vrgb, vbgr, none - subpixel geometry diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h index afc917c..85cdd6d 100644 --- a/fontconfig/fontconfig.h +++ b/fontconfig/fontconfig.h @@ -94,6 +94,7 @@ typedef int FcBool; #define FC_RASTERIZER "rasterizer" /* String (deprecated) */ #define FC_OUTLINE "outline" /* Bool */ #define FC_SCALABLE "scalable" /* Bool */ +#define FC_COLOR "color" /* Bool */ #define FC_SCALE "scale" /* double */ #define FC_DPI "dpi" /* double */ #define FC_RGBA "rgba" /* Int */ diff --git a/src/fcfreetype.c b/src/fcfreetype.c index da66741..2575a72 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1285,6 +1285,12 @@ FcFreeTypeQueryFace (const FT_Face face, (face->face_flags & FT_FACE_FLAG_SCALABLE) != 0)) goto bail1; +#ifdef FT_FACE_FLAG_COLOR + if (!FcPatternAddBool (pat, FC_COLOR, + (face->face_flags & FT_FACE_FLAG_COLOR) != 0)) + goto bail1; +#endif + /* * Get the OS/2 table diff --git a/src/fcmatch.c b/src/fcmatch.c index 25081e2..46d08bc 100644 --- a/src/fcmatch.c +++ b/src/fcmatch.c @@ -284,6 +284,7 @@ typedef enum _FcMatcherPriority { PRI1(FILE), PRI1(FONTFORMAT), PRI1(SCALABLE), + PRI1(COLOR), PRI1(FOUNDRY), PRI1(CHARSET), PRI_FAMILY_STRONG, diff --git a/src/fcobjs.h b/src/fcobjs.h index bfdf4b5..573fa61 100644 --- a/src/fcobjs.h +++ b/src/fcobjs.h @@ -68,4 +68,5 @@ FC_OBJECT (FONT_FEATURES, FcTypeString, NULL) FC_OBJECT (PRGNAME, FcTypeString, NULL) FC_OBJECT (HASH, FcTypeString, NULL) /* deprecated */ FC_OBJECT (POSTSCRIPT_NAME, FcTypeString, FcComparePostScript) +FC_OBJECT (COLOR, FcTypeBool, FcCompareBool) /* ^-------------- Add new objects here. */ -- 2.3.3 From 66db69a6d991945f96feb1da683a2e04ea396842 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 14 Dec 2014 13:55:53 -0800 Subject: [PATCH] Treat color fonts as scalable All color fonts are designed to be scaled, even if they only have bitmap strikes. Client is responsible to scale the bitmaps. This is in constrast to non-color strikes... Clients can still use FC_OUTLINE to distinguish bitmap vs outline fonts. Previously FC_OUTLINE and FC_SCALABLE always had the same value. Now FC_SCALABLE is set to (FC_OUTLINE || FC_COLOR). Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=87122 --- src/fcfreetype.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/fcfreetype.c b/src/fcfreetype.c index 2575a72..81ebda7 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1277,20 +1277,29 @@ FcFreeTypeQueryFace (const FT_Face face, if (!pat) goto bail0; - if (!FcPatternAddBool (pat, FC_OUTLINE, - (face->face_flags & FT_FACE_FLAG_SCALABLE) != 0)) - goto bail1; + { + int has_outline = !!(face->face_flags & FT_FACE_FLAG_SCALABLE); + int has_color = 0; - if (!FcPatternAddBool (pat, FC_SCALABLE, - (face->face_flags & FT_FACE_FLAG_SCALABLE) != 0)) - goto bail1; +#ifdef FT_FACE_FLAG_COLOR + has_color = !!(face->face_flags & FT_FACE_FLAG_COLOR); +#endif + + if (!FcPatternAddBool (pat, FC_OUTLINE, has_outline)) + goto bail1; #ifdef FT_FACE_FLAG_COLOR - if (!FcPatternAddBool (pat, FC_COLOR, - (face->face_flags & FT_FACE_FLAG_COLOR) != 0)) - goto bail1; + if (!FcPatternAddBool (pat, FC_COLOR, has_color)) + goto bail1; #endif + /* All color fonts are designed to be scaled, even if they only have + * bitmap strikes. Client is responsible to scale the bitmaps. This + * is in constrast to non-color strikes... */ + if (!FcPatternAddBool (pat, FC_SCALABLE, has_outline || has_color)) + goto bail1; + } + /* * Get the OS/2 table -- 2.3.3 From af5864419441e12f1951c7cfd0a742b6316934cc Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Sat, 13 Dec 2014 18:21:16 +0000 Subject: [PATCH] Generate documentation for FcWeight* functions. The SGML for these functions exists, and they are named as manpages, but because they are not mentioned in fontconfig-devel.sgml, no documentation is ever generated, and installation under --enable-docs fails. (The documentation I have written in fontconfig-devel.sgml is boilerplate so I can get the manpages generated. It's probably wrong.) --- doc/fontconfig-devel.sgml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/fontconfig-devel.sgml b/doc/fontconfig-devel.sgml index 9f3613a..7410ef0 100644 --- a/doc/fontconfig-devel.sgml +++ b/doc/fontconfig-devel.sgml @@ -20,6 +20,7 @@ + ]> - - 0x0020 - 0x00A0 - 0x00AD - 0x034F - 0x061C - 0x115F - 0x1160 - 0x1680 - 0x17B4 - 0x17B5 - 0x180B - 0x180C - 0x180D - 0x180E - 0x2000 - 0x2001 - 0x2002 - 0x2003 - 0x2004 - 0x2005 - 0x2006 - 0x2007 - 0x2008 - 0x2009 - 0x200A - 0x200B - 0x200C - 0x200D - 0x200E - 0x200F - 0x202A - 0x202B - 0x202C - 0x202D - 0x202E - 0x202F - 0x205F - 0x2060 - 0x2061 - 0x2062 - 0x2063 - 0x2064 - 0x2066 - 0x2067 - 0x2068 - 0x2069 - 0x206A - 0x206B - 0x206C - 0x206D - 0x206E - 0x206F - 0x2800 - 0x3000 - 0x3164 - 0xFEFF - 0xFFA0 - 0x1BCA0 - 0x1BCA1 - 0x1BCA2 - 0x1BCA3 - - diff --git a/src/fcblanks.c b/src/fcblanks.c index 46698bc..49f520b 100644 --- a/src/fcblanks.c +++ b/src/fcblanks.c @@ -41,6 +41,8 @@ FcBlanksCreate (void) void FcBlanksDestroy (FcBlanks *b) { + if (b->sblank == -1) + return; if (b->blanks) free (b->blanks); free (b); @@ -56,6 +58,11 @@ FcBlanksAdd (FcBlanks *b, FcChar32 ucs4) if (b->blanks[sblank] == ucs4) return FcTrue; + if (b->sblank == -1) + { + fprintf (stderr, "Unable to update the static FcBlanks: 0x%04x\n", ucs4); + return FcTrue; + } if (b->nblank == b->sblank) { sblank = b->sblank + 32; diff --git a/src/fccfg.c b/src/fccfg.c index b27ab0b..e2f7ea8 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -27,6 +27,7 @@ #include "fcint.h" #include #include +#include "../fc-blanks/fcblanks.h" #if defined (_WIN32) && !defined (R_OK) #define R_OK 4 @@ -109,7 +110,7 @@ FcConfigCreate (void) if (!config->cacheDirs) goto bail8; - config->blanks = 0; + config->blanks = &fcBlanks; config->substPattern = 0; config->substFont = 0; -- 2.3.3 From a9d4dba7492e060f9d225307c58d79bc50b16cd3 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 27 Feb 2015 15:48:54 +0900 Subject: [PATCH] Update the script to recognize the escaped space --- fc-blanks/fc-blanks.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/fc-blanks/fc-blanks.py b/fc-blanks/fc-blanks.py index fb01614..a2f0b95 100755 --- a/fc-blanks/fc-blanks.py +++ b/fc-blanks/fc-blanks.py @@ -44,13 +44,20 @@ for i in p: fescape = True elif i.lower() == 'u' and fescape == True: funicode = True + fescape = False elif i >= '0' and i <= '9' or i.lower() >= 'a' and i.lower() <= 'f': + if fescape == True: + raise RuntimeError, "Unexpected escape code" if funicode == True: v <<= 4 v += int(i, 16) else: raise RuntimeError, "Unable to parse Unicode" elif i == ' ': + if fescape == True: + funicode = True + fescape = False + v = 0x20 if frange == True and funicode == True: vend = v insert(l, vbegin, vend) @@ -60,13 +67,13 @@ for i in p: vend = v insert(l, vbegin, vend) fprocess = True - fescape = False funicode = False frange = False elif i == '-': + if fescape == True: + raise RuntimeError, "Unexpected escape code" vbegin = v v = 0 - fescape = False funicode = False frange = True else: @@ -88,8 +95,6 @@ elif funicode == True: vbegin = vend = v insert(l, vbegin, vend) -# somewhat missing 0x0020 in the list of code from Unicode Utilities -insert(l, 0x0020, 0x0020) ncode = 0 for i in l: ncode += (i[1] - i[0] + 1) @@ -98,6 +103,8 @@ a = int(x[0].split(' ')[0].replace(',', '')) if a != ncode: sys.stderr.write("Unexpected the amount of code points: %d (expected %d)\n" % (ncode, a)) sys.exit(1) + +# exception; BRAILLE PATTERN BLANK insert(l, 0x2800, 0x2800) while True: -- 2.3.3 From 724664e3fd056b864576f8e100a8de5c0e93a725 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 2 Mar 2015 11:34:53 +0900 Subject: [PATCH] Fix a build issue when $(srcdir) != $(builddir) --- fc-blanks/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fc-blanks/Makefile.am b/fc-blanks/Makefile.am index f9c2486..5b97000 100644 --- a/fc-blanks/Makefile.am +++ b/fc-blanks/Makefile.am @@ -27,8 +27,8 @@ TMPL = fcblanks.tmpl.h noinst_SCRIPTS = $(BLANKSPY) noinst_HEADERS = $(BLANKS_H) -$(BLANKS_H): $(BLANKSPY) $(TMPL) - $(AM_V_GEN) $(PYTHON) $(BLANKSPY) < $(TMPL) > $(BLANKS_H).tmp && \ +$(BLANKS_H): $(TMPL) $(BLANKSPY) + $(AM_V_GEN) $(PYTHON) $(srcdir)/$(BLANKSPY) < $< > $(BLANKS_H).tmp && \ mv $(BLANKS_H).tmp $(BLANKS_H) || ($(RM) $(BLANKS_H).tmp && false) EXTRA_DIST = \ -- 2.3.3 From f18f2f88f287a2438d2bf9b27773cb14606cbb11 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 9 Feb 2015 16:45:43 +0900 Subject: [PATCH] Don't add FC_LANG when it has "und" to avoid the situation to find the better fallback font. https://code.google.com/p/chromium/issues/detail?id=392724 has more words to explain the details. https://bugs.freedesktop.org/show_bug.cgi?id=81185 --- src/fccfg.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/fccfg.c b/src/fccfg.c index e2f7ea8..b92270b 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -1546,7 +1546,9 @@ FcConfigSubstituteWithPat (FcConfig *config, FcStrList *l = FcStrListCreate (strs); FcChar8 *lang; FcValue v; + FcLangSet *lsund = FcLangSetCreate (); + FcLangSetAdd (lsund, (const FcChar8 *)"und"); FcStrSetDestroy (strs); while (l && (lang = FcStrListNext (l))) { @@ -1570,10 +1572,16 @@ FcConfigSubstituteWithPat (FcConfig *config, FcLangSetDestroy (ls); if (b) goto bail_lang; + if (FcLangSetContains (vv.u.l, lsund)) + goto bail_lang; } else + { if (FcStrCmpIgnoreCase (vv.u.s, lang) == 0) goto bail_lang; + if (FcStrCmpIgnoreCase (vv.u.s, (const FcChar8 *)"und") == 0) + goto bail_lang; + } } } v.type = FcTypeString; @@ -1583,6 +1591,7 @@ FcConfigSubstituteWithPat (FcConfig *config, } bail_lang: FcStrListDone (l); + FcLangSetDestroy (lsund); } if (FcPatternObjectGet (p, FC_PRGNAME_OBJECT, 0, &v) == FcResultNoMatch) { -- 2.3.3 From 2f311c562d87c0bf95d27709e82afd196c2bff28 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 3 Mar 2015 11:30:12 +0900 Subject: [PATCH] Fix the array allocation --- src/fcstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fcstat.c b/src/fcstat.c index d444bf9..1734fa4 100644 --- a/src/fcstat.c +++ b/src/fcstat.c @@ -219,7 +219,7 @@ FcScandir (const char *dirp, dentlen = ((dentlen + ALIGNOF_VOID_P - 1) & ~(ALIGNOF_VOID_P - 1)); p = (struct dirent *) malloc (dentlen); memcpy (p, dent, dentlen); - if (n >= lsize) + if ((n + 1) >= lsize) { lsize += 128; dlp = (struct dirent **) realloc (dlist, sizeof (struct dirent *) * lsize); -- 2.3.3 From 9c99baba66d335738318dc7cacef64fafb699ebf Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 21 Jan 2015 14:32:51 -0800 Subject: [PATCH] Remove dead code after previous commit --- src/fcfreetype.c | 339 +------------------------------------------------------ 1 file changed, 3 insertions(+), 336 deletions(-) diff --git a/src/fcfreetype.c b/src/fcfreetype.c index f42004b..e8ab02e 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1986,227 +1986,13 @@ bail: #warning "No FT_Get_Next_Char: Please install freetype version 2.1.0 or newer" #endif -typedef struct _FcCharEnt { - FcChar16 bmp; - unsigned char encode; -} FcCharEnt; - -struct _FcCharMap { - const FcCharEnt *ent; - int nent; -}; - typedef struct _FcFontDecode { FT_Encoding encoding; - const FcCharMap *map; - FcChar32 max; } FcFontDecode; -static const FcCharEnt AdobeSymbolEnt[] = { - { 0x0020, 0x20 }, /* SPACE # space */ - { 0x0021, 0x21 }, /* EXCLAMATION MARK # exclam */ - { 0x0023, 0x23 }, /* NUMBER SIGN # numbersign */ - { 0x0025, 0x25 }, /* PERCENT SIGN # percent */ - { 0x0026, 0x26 }, /* AMPERSAND # ampersand */ - { 0x0028, 0x28 }, /* LEFT PARENTHESIS # parenleft */ - { 0x0029, 0x29 }, /* RIGHT PARENTHESIS # parenright */ - { 0x002B, 0x2B }, /* PLUS SIGN # plus */ - { 0x002C, 0x2C }, /* COMMA # comma */ - { 0x002E, 0x2E }, /* FULL STOP # period */ - { 0x002F, 0x2F }, /* SOLIDUS # slash */ - { 0x0030, 0x30 }, /* DIGIT ZERO # zero */ - { 0x0031, 0x31 }, /* DIGIT ONE # one */ - { 0x0032, 0x32 }, /* DIGIT TWO # two */ - { 0x0033, 0x33 }, /* DIGIT THREE # three */ - { 0x0034, 0x34 }, /* DIGIT FOUR # four */ - { 0x0035, 0x35 }, /* DIGIT FIVE # five */ - { 0x0036, 0x36 }, /* DIGIT SIX # six */ - { 0x0037, 0x37 }, /* DIGIT SEVEN # seven */ - { 0x0038, 0x38 }, /* DIGIT EIGHT # eight */ - { 0x0039, 0x39 }, /* DIGIT NINE # nine */ - { 0x003A, 0x3A }, /* COLON # colon */ - { 0x003B, 0x3B }, /* SEMICOLON # semicolon */ - { 0x003C, 0x3C }, /* LESS-THAN SIGN # less */ - { 0x003D, 0x3D }, /* EQUALS SIGN # equal */ - { 0x003E, 0x3E }, /* GREATER-THAN SIGN # greater */ - { 0x003F, 0x3F }, /* QUESTION MARK # question */ - { 0x005B, 0x5B }, /* LEFT SQUARE BRACKET # bracketleft */ - { 0x005D, 0x5D }, /* RIGHT SQUARE BRACKET # bracketright */ - { 0x005F, 0x5F }, /* LOW LINE # underscore */ - { 0x007B, 0x7B }, /* LEFT CURLY BRACKET # braceleft */ - { 0x007C, 0x7C }, /* VERTICAL LINE # bar */ - { 0x007D, 0x7D }, /* RIGHT CURLY BRACKET # braceright */ - { 0x00A0, 0x20 }, /* NO-BREAK SPACE # space */ - { 0x00AC, 0xD8 }, /* NOT SIGN # logicalnot */ - { 0x00B0, 0xB0 }, /* DEGREE SIGN # degree */ - { 0x00B1, 0xB1 }, /* PLUS-MINUS SIGN # plusminus */ - { 0x00B5, 0x6D }, /* MICRO SIGN # mu */ - { 0x00D7, 0xB4 }, /* MULTIPLICATION SIGN # multiply */ - { 0x00F7, 0xB8 }, /* DIVISION SIGN # divide */ - { 0x0192, 0xA6 }, /* LATIN SMALL LETTER F WITH HOOK # florin */ - { 0x0391, 0x41 }, /* GREEK CAPITAL LETTER ALPHA # Alpha */ - { 0x0392, 0x42 }, /* GREEK CAPITAL LETTER BETA # Beta */ - { 0x0393, 0x47 }, /* GREEK CAPITAL LETTER GAMMA # Gamma */ - { 0x0394, 0x44 }, /* GREEK CAPITAL LETTER DELTA # Delta */ - { 0x0395, 0x45 }, /* GREEK CAPITAL LETTER EPSILON # Epsilon */ - { 0x0396, 0x5A }, /* GREEK CAPITAL LETTER ZETA # Zeta */ - { 0x0397, 0x48 }, /* GREEK CAPITAL LETTER ETA # Eta */ - { 0x0398, 0x51 }, /* GREEK CAPITAL LETTER THETA # Theta */ - { 0x0399, 0x49 }, /* GREEK CAPITAL LETTER IOTA # Iota */ - { 0x039A, 0x4B }, /* GREEK CAPITAL LETTER KAPPA # Kappa */ - { 0x039B, 0x4C }, /* GREEK CAPITAL LETTER LAMDA # Lambda */ - { 0x039C, 0x4D }, /* GREEK CAPITAL LETTER MU # Mu */ - { 0x039D, 0x4E }, /* GREEK CAPITAL LETTER NU # Nu */ - { 0x039E, 0x58 }, /* GREEK CAPITAL LETTER XI # Xi */ - { 0x039F, 0x4F }, /* GREEK CAPITAL LETTER OMICRON # Omicron */ - { 0x03A0, 0x50 }, /* GREEK CAPITAL LETTER PI # Pi */ - { 0x03A1, 0x52 }, /* GREEK CAPITAL LETTER RHO # Rho */ - { 0x03A3, 0x53 }, /* GREEK CAPITAL LETTER SIGMA # Sigma */ - { 0x03A4, 0x54 }, /* GREEK CAPITAL LETTER TAU # Tau */ - { 0x03A5, 0x55 }, /* GREEK CAPITAL LETTER UPSILON # Upsilon */ - { 0x03A6, 0x46 }, /* GREEK CAPITAL LETTER PHI # Phi */ - { 0x03A7, 0x43 }, /* GREEK CAPITAL LETTER CHI # Chi */ - { 0x03A8, 0x59 }, /* GREEK CAPITAL LETTER PSI # Psi */ - { 0x03A9, 0x57 }, /* GREEK CAPITAL LETTER OMEGA # Omega */ - { 0x03B1, 0x61 }, /* GREEK SMALL LETTER ALPHA # alpha */ - { 0x03B2, 0x62 }, /* GREEK SMALL LETTER BETA # beta */ - { 0x03B3, 0x67 }, /* GREEK SMALL LETTER GAMMA # gamma */ - { 0x03B4, 0x64 }, /* GREEK SMALL LETTER DELTA # delta */ - { 0x03B5, 0x65 }, /* GREEK SMALL LETTER EPSILON # epsilon */ - { 0x03B6, 0x7A }, /* GREEK SMALL LETTER ZETA # zeta */ - { 0x03B7, 0x68 }, /* GREEK SMALL LETTER ETA # eta */ - { 0x03B8, 0x71 }, /* GREEK SMALL LETTER THETA # theta */ - { 0x03B9, 0x69 }, /* GREEK SMALL LETTER IOTA # iota */ - { 0x03BA, 0x6B }, /* GREEK SMALL LETTER KAPPA # kappa */ - { 0x03BB, 0x6C }, /* GREEK SMALL LETTER LAMDA # lambda */ - { 0x03BC, 0x6D }, /* GREEK SMALL LETTER MU # mu */ - { 0x03BD, 0x6E }, /* GREEK SMALL LETTER NU # nu */ - { 0x03BE, 0x78 }, /* GREEK SMALL LETTER XI # xi */ - { 0x03BF, 0x6F }, /* GREEK SMALL LETTER OMICRON # omicron */ - { 0x03C0, 0x70 }, /* GREEK SMALL LETTER PI # pi */ - { 0x03C1, 0x72 }, /* GREEK SMALL LETTER RHO # rho */ - { 0x03C2, 0x56 }, /* GREEK SMALL LETTER FINAL SIGMA # sigma1 */ - { 0x03C3, 0x73 }, /* GREEK SMALL LETTER SIGMA # sigma */ - { 0x03C4, 0x74 }, /* GREEK SMALL LETTER TAU # tau */ - { 0x03C5, 0x75 }, /* GREEK SMALL LETTER UPSILON # upsilon */ - { 0x03C6, 0x66 }, /* GREEK SMALL LETTER PHI # phi */ - { 0x03C7, 0x63 }, /* GREEK SMALL LETTER CHI # chi */ - { 0x03C8, 0x79 }, /* GREEK SMALL LETTER PSI # psi */ - { 0x03C9, 0x77 }, /* GREEK SMALL LETTER OMEGA # omega */ - { 0x03D1, 0x4A }, /* GREEK THETA SYMBOL # theta1 */ - { 0x03D2, 0xA1 }, /* GREEK UPSILON WITH HOOK SYMBOL # Upsilon1 */ - { 0x03D5, 0x6A }, /* GREEK PHI SYMBOL # phi1 */ - { 0x03D6, 0x76 }, /* GREEK PI SYMBOL # omega1 */ - { 0x2022, 0xB7 }, /* BULLET # bullet */ - { 0x2026, 0xBC }, /* HORIZONTAL ELLIPSIS # ellipsis */ - { 0x2032, 0xA2 }, /* PRIME # minute */ - { 0x2033, 0xB2 }, /* DOUBLE PRIME # second */ - { 0x2044, 0xA4 }, /* FRACTION SLASH # fraction */ - { 0x20AC, 0xA0 }, /* EURO SIGN # Euro */ - { 0x2111, 0xC1 }, /* BLACK-LETTER CAPITAL I # Ifraktur */ - { 0x2118, 0xC3 }, /* SCRIPT CAPITAL P # weierstrass */ - { 0x211C, 0xC2 }, /* BLACK-LETTER CAPITAL R # Rfraktur */ - { 0x2126, 0x57 }, /* OHM SIGN # Omega */ - { 0x2135, 0xC0 }, /* ALEF SYMBOL # aleph */ - { 0x2190, 0xAC }, /* LEFTWARDS ARROW # arrowleft */ - { 0x2191, 0xAD }, /* UPWARDS ARROW # arrowup */ - { 0x2192, 0xAE }, /* RIGHTWARDS ARROW # arrowright */ - { 0x2193, 0xAF }, /* DOWNWARDS ARROW # arrowdown */ - { 0x2194, 0xAB }, /* LEFT RIGHT ARROW # arrowboth */ - { 0x21B5, 0xBF }, /* DOWNWARDS ARROW WITH CORNER LEFTWARDS # carriagereturn */ - { 0x21D0, 0xDC }, /* LEFTWARDS DOUBLE ARROW # arrowdblleft */ - { 0x21D1, 0xDD }, /* UPWARDS DOUBLE ARROW # arrowdblup */ - { 0x21D2, 0xDE }, /* RIGHTWARDS DOUBLE ARROW # arrowdblright */ - { 0x21D3, 0xDF }, /* DOWNWARDS DOUBLE ARROW # arrowdbldown */ - { 0x21D4, 0xDB }, /* LEFT RIGHT DOUBLE ARROW # arrowdblboth */ - { 0x2200, 0x22 }, /* FOR ALL # universal */ - { 0x2202, 0xB6 }, /* PARTIAL DIFFERENTIAL # partialdiff */ - { 0x2203, 0x24 }, /* THERE EXISTS # existential */ - { 0x2205, 0xC6 }, /* EMPTY SET # emptyset */ - { 0x2206, 0x44 }, /* INCREMENT # Delta */ - { 0x2207, 0xD1 }, /* NABLA # gradient */ - { 0x2208, 0xCE }, /* ELEMENT OF # element */ - { 0x2209, 0xCF }, /* NOT AN ELEMENT OF # notelement */ - { 0x220B, 0x27 }, /* CONTAINS AS MEMBER # suchthat */ - { 0x220F, 0xD5 }, /* N-ARY PRODUCT # product */ - { 0x2211, 0xE5 }, /* N-ARY SUMMATION # summation */ - { 0x2212, 0x2D }, /* MINUS SIGN # minus */ - { 0x2215, 0xA4 }, /* DIVISION SLASH # fraction */ - { 0x2217, 0x2A }, /* ASTERISK OPERATOR # asteriskmath */ - { 0x221A, 0xD6 }, /* SQUARE ROOT # radical */ - { 0x221D, 0xB5 }, /* PROPORTIONAL TO # proportional */ - { 0x221E, 0xA5 }, /* INFINITY # infinity */ - { 0x2220, 0xD0 }, /* ANGLE # angle */ - { 0x2227, 0xD9 }, /* LOGICAL AND # logicaland */ - { 0x2228, 0xDA }, /* LOGICAL OR # logicalor */ - { 0x2229, 0xC7 }, /* INTERSECTION # intersection */ - { 0x222A, 0xC8 }, /* UNION # union */ - { 0x222B, 0xF2 }, /* INTEGRAL # integral */ - { 0x2234, 0x5C }, /* THEREFORE # therefore */ - { 0x223C, 0x7E }, /* TILDE OPERATOR # similar */ - { 0x2245, 0x40 }, /* APPROXIMATELY EQUAL TO # congruent */ - { 0x2248, 0xBB }, /* ALMOST EQUAL TO # approxequal */ - { 0x2260, 0xB9 }, /* NOT EQUAL TO # notequal */ - { 0x2261, 0xBA }, /* IDENTICAL TO # equivalence */ - { 0x2264, 0xA3 }, /* LESS-THAN OR EQUAL TO # lessequal */ - { 0x2265, 0xB3 }, /* GREATER-THAN OR EQUAL TO # greaterequal */ - { 0x2282, 0xCC }, /* SUBSET OF # propersubset */ - { 0x2283, 0xC9 }, /* SUPERSET OF # propersuperset */ - { 0x2284, 0xCB }, /* NOT A SUBSET OF # notsubset */ - { 0x2286, 0xCD }, /* SUBSET OF OR EQUAL TO # reflexsubset */ - { 0x2287, 0xCA }, /* SUPERSET OF OR EQUAL TO # reflexsuperset */ - { 0x2295, 0xC5 }, /* CIRCLED PLUS # circleplus */ - { 0x2297, 0xC4 }, /* CIRCLED TIMES # circlemultiply */ - { 0x22A5, 0x5E }, /* UP TACK # perpendicular */ - { 0x22C5, 0xD7 }, /* DOT OPERATOR # dotmath */ - { 0x2320, 0xF3 }, /* TOP HALF INTEGRAL # integraltp */ - { 0x2321, 0xF5 }, /* BOTTOM HALF INTEGRAL # integralbt */ - { 0x2329, 0xE1 }, /* LEFT-POINTING ANGLE BRACKET # angleleft */ - { 0x232A, 0xF1 }, /* RIGHT-POINTING ANGLE BRACKET # angleright */ - { 0x25CA, 0xE0 }, /* LOZENGE # lozenge */ - { 0x2660, 0xAA }, /* BLACK SPADE SUIT # spade */ - { 0x2663, 0xA7 }, /* BLACK CLUB SUIT # club */ - { 0x2665, 0xA9 }, /* BLACK HEART SUIT # heart */ - { 0x2666, 0xA8 }, /* BLACK DIAMOND SUIT # diamond */ - { 0xF6D9, 0xD3 }, /* COPYRIGHT SIGN SERIF # copyrightserif (CUS) */ - { 0xF6DA, 0xD2 }, /* REGISTERED SIGN SERIF # registerserif (CUS) */ - { 0xF6DB, 0xD4 }, /* TRADE MARK SIGN SERIF # trademarkserif (CUS) */ - { 0xF8E5, 0x60 }, /* RADICAL EXTENDER # radicalex (CUS) */ - { 0xF8E6, 0xBD }, /* VERTICAL ARROW EXTENDER # arrowvertex (CUS) */ - { 0xF8E7, 0xBE }, /* HORIZONTAL ARROW EXTENDER # arrowhorizex (CUS) */ - { 0xF8E8, 0xE2 }, /* REGISTERED SIGN SANS SERIF # registersans (CUS) */ - { 0xF8E9, 0xE3 }, /* COPYRIGHT SIGN SANS SERIF # copyrightsans (CUS) */ - { 0xF8EA, 0xE4 }, /* TRADE MARK SIGN SANS SERIF # trademarksans (CUS) */ - { 0xF8EB, 0xE6 }, /* LEFT PAREN TOP # parenlefttp (CUS) */ - { 0xF8EC, 0xE7 }, /* LEFT PAREN EXTENDER # parenleftex (CUS) */ - { 0xF8ED, 0xE8 }, /* LEFT PAREN BOTTOM # parenleftbt (CUS) */ - { 0xF8EE, 0xE9 }, /* LEFT SQUARE BRACKET TOP # bracketlefttp (CUS) */ - { 0xF8EF, 0xEA }, /* LEFT SQUARE BRACKET EXTENDER # bracketleftex (CUS) */ - { 0xF8F0, 0xEB }, /* LEFT SQUARE BRACKET BOTTOM # bracketleftbt (CUS) */ - { 0xF8F1, 0xEC }, /* LEFT CURLY BRACKET TOP # bracelefttp (CUS) */ - { 0xF8F2, 0xED }, /* LEFT CURLY BRACKET MID # braceleftmid (CUS) */ - { 0xF8F3, 0xEE }, /* LEFT CURLY BRACKET BOTTOM # braceleftbt (CUS) */ - { 0xF8F4, 0xEF }, /* CURLY BRACKET EXTENDER # braceex (CUS) */ - { 0xF8F5, 0xF4 }, /* INTEGRAL EXTENDER # integralex (CUS) */ - { 0xF8F6, 0xF6 }, /* RIGHT PAREN TOP # parenrighttp (CUS) */ - { 0xF8F7, 0xF7 }, /* RIGHT PAREN EXTENDER # parenrightex (CUS) */ - { 0xF8F8, 0xF8 }, /* RIGHT PAREN BOTTOM # parenrightbt (CUS) */ - { 0xF8F9, 0xF9 }, /* RIGHT SQUARE BRACKET TOP # bracketrighttp (CUS) */ - { 0xF8FA, 0xFA }, /* RIGHT SQUARE BRACKET EXTENDER # bracketrightex (CUS) */ - { 0xF8FB, 0xFB }, /* RIGHT SQUARE BRACKET BOTTOM # bracketrightbt (CUS) */ - { 0xF8FC, 0xFC }, /* RIGHT CURLY BRACKET TOP # bracerighttp (CUS) */ - { 0xF8FD, 0xFD }, /* RIGHT CURLY BRACKET MID # bracerightmid (CUS) */ - { 0xF8FE, 0xFE }, /* RIGHT CURLY BRACKET BOTTOM # bracerightbt (CUS) */ -}; - -static const FcCharMap AdobeSymbol = { - AdobeSymbolEnt, - sizeof (AdobeSymbolEnt) / sizeof (AdobeSymbolEnt[0]), -}; - static const FcFontDecode fcFontDecoders[] = { - { ft_encoding_unicode, 0, (1 << 21) - 1 }, - { ft_encoding_symbol, 0, (1 << 16) - 1 }, + { ft_encoding_unicode }, + { ft_encoding_symbol }, }; #define NUM_DECODE (int) (sizeof (fcFontDecoders) / sizeof (fcFontDecoders[0])) @@ -2215,54 +2001,6 @@ static const FcChar32 prefer_unicode[] = { 0x20ac, /* EURO SIGN */ }; -#define NUM_PREFER_UNICODE (int) (sizeof (prefer_unicode) / sizeof (prefer_unicode[0])) - -FcChar32 -FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map) -{ - int low, high, mid; - FcChar16 bmp; - - low = 0; - high = map->nent - 1; - if (ucs4 < map->ent[low].bmp || map->ent[high].bmp < ucs4) - return ~0; - while (low <= high) - { - mid = (high + low) >> 1; - bmp = map->ent[mid].bmp; - if (ucs4 == bmp) - return (FT_ULong) map->ent[mid].encode; - if (ucs4 < bmp) - high = mid - 1; - else - low = mid + 1; - } - return ~0; -} - -FcChar32 -FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map) -{ - int i; - - for (i = 0; i < map->nent; i++) - if (map->ent[i].encode == private) - return (FcChar32) map->ent[i].bmp; - return ~0; -} - -const FcCharMap * -FcFreeTypeGetPrivateMap (FT_Encoding encoding) -{ - int i; - - for (i = 0; i < NUM_DECODE; i++) - if (fcFontDecoders[i].encoding == encoding) - return fcFontDecoders[i].map; - return 0; -} - #include "../fc-glyphname/fcglyphname.h" static FcChar32 @@ -2390,8 +2128,6 @@ FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4) { int initial, offset, decode; FT_UInt glyphindex; - FcChar32 charcode; - int p; initial = 0; @@ -2409,12 +2145,6 @@ FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4) if (initial == NUM_DECODE) initial = 0; } - for (p = 0; p < NUM_PREFER_UNICODE; p++) - if (ucs4 == prefer_unicode[p]) - { - initial = 0; - break; - } /* * Check each encoding for the glyph, starting with the current one */ @@ -2424,15 +2154,7 @@ FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4) if (!face->charmap || face->charmap->encoding != fcFontDecoders[decode].encoding) if (FT_Select_Charmap (face, fcFontDecoders[decode].encoding) != 0) continue; - if (fcFontDecoders[decode].map) - { - charcode = FcFreeTypeUcs4ToPrivate (ucs4, fcFontDecoders[decode].map); - if (charcode == ~0U) - continue; - } - else - charcode = ucs4; - glyphindex = FT_Get_Char_Index (face, (FT_ULong) charcode); + glyphindex = FT_Get_Char_Index (face, (FT_ULong) ucs4); if (glyphindex) return glyphindex; } @@ -2525,9 +2247,7 @@ FcFreeTypeCharSetAndSpacingForSize (FT_Face face, FcBlanks *blanks, int *spacing #endif FcCharSet *fcs; FcCharLeaf *leaf; - const FcCharMap *map; int o; - int i; FT_UInt glyph; FT_Pos advance, advance_one = 0, advance_two = 0; FcBool has_advance = FcFalse, fixed_advance = FcTrue, dual_advance = FcFalse; @@ -2552,60 +2272,7 @@ FcFreeTypeCharSetAndSpacingForSize (FT_Face face, FcBlanks *blanks, int *spacing { if (FT_Select_Charmap (face, fcFontDecoders[o].encoding) != 0) continue; - map = fcFontDecoders[o].map; - if (map) - { - /* - * Non-Unicode tables are easy; there's a list of all possible - * characters - */ - for (i = 0; i < map->nent; i++) - { - ucs4 = map->ent[i].bmp; - glyph = FT_Get_Char_Index (face, map->ent[i].encode); - if (glyph && - FcFreeTypeCheckGlyph (face, ucs4, glyph, blanks, &advance, using_strike)) - { - /* - * ignore glyphs with zero advance. They’re - * combining characters, and while their behaviour - * isn’t well defined for monospaced applications in - * Unicode, there are many fonts which include - * zero-width combining characters in otherwise - * monospaced fonts. - */ - if (advance) - { - if (!has_advance) - { - has_advance = FcTrue; - advance_one = advance; - } - else if (!APPROXIMATELY_EQUAL (advance, advance_one)) - { - if (fixed_advance) - { - dual_advance = FcTrue; - fixed_advance = FcFalse; - advance_two = advance; - } - else if (!APPROXIMATELY_EQUAL (advance, advance_two)) - dual_advance = FcFalse; - } - } - leaf = FcCharSetFindLeafCreate (fcs, ucs4); - if (!leaf) - goto bail1; - leaf->map[(ucs4 & 0xff) >> 5] |= (1 << (ucs4 & 0x1f)); -#ifdef CHECK - if (ucs4 > font_max) - font_max = ucs4; -#endif - } - } - } - else { page = ~0; leaf = NULL; -- 2.3.3 From d997d7c770cd6a36159090fd0b8720a3dc426707 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 21 Jan 2015 14:35:03 -0800 Subject: [PATCH] Simplify some more --- src/fcfreetype.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/fcfreetype.c b/src/fcfreetype.c index e8ab02e..50ff348 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -1986,16 +1986,12 @@ bail: #warning "No FT_Get_Next_Char: Please install freetype version 2.1.0 or newer" #endif -typedef struct _FcFontDecode { - FT_Encoding encoding; -} FcFontDecode; - -static const FcFontDecode fcFontDecoders[] = { - { ft_encoding_unicode }, - { ft_encoding_symbol }, +static const FT_Encoding fcFontEncodings[] = { + FT_ENCODING_UNICODE, + FT_ENCODING_MS_SYMBOL }; -#define NUM_DECODE (int) (sizeof (fcFontDecoders) / sizeof (fcFontDecoders[0])) +#define NUM_DECODE (int) (sizeof (fcFontEncodings) / sizeof (fcFontEncodings[0])) static const FcChar32 prefer_unicode[] = { 0x20ac, /* EURO SIGN */ @@ -2140,7 +2136,7 @@ FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4) if (face->charmap) { for (; initial < NUM_DECODE; initial++) - if (fcFontDecoders[initial].encoding == face->charmap->encoding) + if (fcFontEncodings[initial] == face->charmap->encoding) break; if (initial == NUM_DECODE) initial = 0; @@ -2151,8 +2147,8 @@ FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4) for (offset = 0; offset < NUM_DECODE; offset++) { decode = (initial + offset) % NUM_DECODE; - if (!face->charmap || face->charmap->encoding != fcFontDecoders[decode].encoding) - if (FT_Select_Charmap (face, fcFontDecoders[decode].encoding) != 0) + if (!face->charmap || face->charmap->encoding != fcFontEncodings[decode]) + if (FT_Select_Charmap (face, fcFontEncodings[decode]) != 0) continue; glyphindex = FT_Get_Char_Index (face, (FT_ULong) ucs4); if (glyphindex) @@ -2270,7 +2266,7 @@ FcFreeTypeCharSetAndSpacingForSize (FT_Face face, FcBlanks *blanks, int *spacing #endif for (o = 0; o < NUM_DECODE; o++) { - if (FT_Select_Charmap (face, fcFontDecoders[o].encoding) != 0) + if (FT_Select_Charmap (face, fcFontEncodings[o]) != 0) continue; { -- 2.3.3 From 96a3f6879c13577cc9edd867b3f89b0cba469073 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 5 Mar 2015 17:52:04 +0900 Subject: [PATCH] Improve the performance on searching blanks After the change of d6a5cc665a1d7e91332944353e92c83ad114368c we have a lot of code points in FcBlanks. doing the linear search on the array isn't comfortable anymore. So re-implementing FcBlanksIsMember() to use the binary search. Figuring out how much improved after this change depends on how many fonts proceed with fc-cache say though, it's about 20 times faster here on testing. which sounds good enough for improvement. --- src/fcblanks.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/fcblanks.c b/src/fcblanks.c index 49f520b..f163a8f 100644 --- a/src/fcblanks.c +++ b/src/fcblanks.c @@ -82,11 +82,26 @@ FcBlanksAdd (FcBlanks *b, FcChar32 ucs4) FcBool FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4) { - int i; + int lower = 0, higher = b->nblank, middle; - for (i = 0; i < b->nblank; i++) - if (b->blanks[i] == ucs4) + if (b->nblank == 0 || + b->blanks[0] > ucs4 || + b->blanks[b->nblank - 1] < ucs4) + return FcFalse; + while (1) + { + middle = (lower + higher) / 2; + if (b->blanks[middle] == ucs4) return FcTrue; + if (middle == lower || + middle == higher) + break; + if (b->blanks[middle] < ucs4) + lower = middle + 1; + else + higher = middle - 1; + } + return FcFalse; } #define __fcblanks__ -- 2.3.3 From ed74a58ccc245bacd907cd91e0f3df64e427c163 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 6 Mar 2015 11:05:23 +0900 Subject: [PATCH] Fix a segfault when OOM happened. Reported by Matt Breedlove --- src/fcinit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fcinit.c b/src/fcinit.c index db62c21..6134ed4 100644 --- a/src/fcinit.c +++ b/src/fcinit.c @@ -209,6 +209,8 @@ FcInitBringUptoDate (void) FcConfig *config = FcConfigGetCurrent (); time_t now; + if (!config) + return FcFalse; /* * rescanInterval == 0 disables automatic up to date */ -- 2.3.3 From 484834c186dee281bcd13067d7b7bce1322b4e0b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 6 Mar 2015 11:15:26 +0900 Subject: [PATCH] Fix a bug in the previous change forFcBlanksIsMember() --- src/fcblanks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fcblanks.c b/src/fcblanks.c index f163a8f..9ac0d5b 100644 --- a/src/fcblanks.c +++ b/src/fcblanks.c @@ -93,8 +93,7 @@ FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4) middle = (lower + higher) / 2; if (b->blanks[middle] == ucs4) return FcTrue; - if (middle == lower || - middle == higher) + if (lower == higher) break; if (b->blanks[middle] < ucs4) lower = middle + 1; -- 2.3.3 From f5b1e0ab97daa0e08af8d667cabb700bb73da568 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 9 Mar 2015 12:18:03 +0900 Subject: [PATCH] Fix an infinite loop in FcBlanksIsMember() --- src/fcblanks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fcblanks.c b/src/fcblanks.c index 9ac0d5b..5132a51 100644 --- a/src/fcblanks.c +++ b/src/fcblanks.c @@ -93,7 +93,7 @@ FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4) middle = (lower + higher) / 2; if (b->blanks[middle] == ucs4) return FcTrue; - if (lower == higher) + if (lower >= higher) break; if (b->blanks[middle] < ucs4) lower = middle + 1; -- 2.3.3 From b75d809d1298b791f39596170950597bcfe98dd6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 9 Mar 2015 12:22:30 +0900 Subject: [PATCH] Fix a trivial bug for dist --- fc-blanks/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/fc-blanks/Makefile.am b/fc-blanks/Makefile.am index 5b97000..e9de1fe 100644 --- a/fc-blanks/Makefile.am +++ b/fc-blanks/Makefile.am @@ -32,6 +32,7 @@ $(BLANKS_H): $(TMPL) $(BLANKSPY) mv $(BLANKS_H).tmp $(BLANKS_H) || ($(RM) $(BLANKS_H).tmp && false) EXTRA_DIST = \ + $(BLANKSPY) \ $(BLANKS_H) \ $(TMPL) \ $(NULL) -- 2.3.3 From 69ff6b6e260584e383c38b1b7034ddcbb23d214f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 9 Mar 2015 12:22:40 +0900 Subject: [PATCH] Bump version to 2.11.93 --- README | 37 +++++++++++++++++++++++++++++++++++-- configure.ac | 6 +++--- fontconfig/fontconfig.h | 2 +- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/README b/README index 6ac1644..4a4dc30 100644 --- a/README +++ b/README @@ -1,12 +1,45 @@ Fontconfig Font configuration and customization library - Version 2.11.92 (2.12 RC2) - 2015-01-13 + Version 2.11.93 (2.12 RC3) + 2015-03-09 Check INSTALL for compilation and installation instructions. Report bugs to https://bugs.freedesktop.org in the fontconfig module. +2.11.93 (2.12 RC3) + +Akira TAGOH (18): + Fix a typo in docs + Add pkg.m4 to git + Fix a build fail on some non-POSIX platforms + ifdef'd the unnecessary code for win32 + Fix pointer cast warning on win32 + filter can be null + Copy the real size of struct dirent + Rework again to copy the struct dirent + Hardcode the blanks in the library + Update the script to recognize the escaped space + Fix a build issue when $(srcdir) != $(builddir) + Don't add FC_LANG when it has "und" + Fix the array allocation + Improve the performance on searching blanks + Fix a segfault when OOM happened. + Fix a bug in the previous change forFcBlanksIsMember() + Fix an infinite loop in FcBlanksIsMember() + Fix a trivial bug for dist + +Alan Coopersmith (1): + Fix configure to work with Solaris Studio compilers + +Behdad Esfahbod (3): + Fix symbol cmap handling + Remove dead code after previous commit + Simplify some more + +Michael Haubenwallner (1): + Ensure config.h is included first, bug#89336. + 2.11.92 (2.12 RC2) Akira TAGOH (1): diff --git a/configure.ac b/configure.ac index 8f0150e..bb98804 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,7 @@ dnl This is the package version number, not the shared library dnl version. This same version number must appear in fontconfig/fontconfig.h dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's dnl not possible to extract the version number here from fontconfig.h -AC_INIT([fontconfig], [2.11.92], [https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig]) +AC_INIT([fontconfig], [2.11.93], [https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig]) AM_INIT_AUTOMAKE([1.11 parallel-tests dist-bzip2]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) @@ -73,11 +73,11 @@ dnl libtool versioning dnl bump revision when fixing bugs dnl bump current and age, reset revision to zero when adding APIs dnl bump current, leave age, reset revision to zero when changing/removing APIS -LIBT_CURRENT=9 +LIBT_CURRENT=10 LIBT_REVISION=0 AC_SUBST(LIBT_CURRENT) AC_SUBST(LIBT_REVISION) -LIBT_AGE=8 +LIBT_AGE=9 LIBT_VERSION_INFO="$LIBT_CURRENT:$LIBT_REVISION:$LIBT_AGE" AC_SUBST(LIBT_VERSION_INFO) diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h index 600ed68..b14c961 100644 --- a/fontconfig/fontconfig.h +++ b/fontconfig/fontconfig.h @@ -52,7 +52,7 @@ typedef int FcBool; #define FC_MAJOR 2 #define FC_MINOR 11 -#define FC_REVISION 92 +#define FC_REVISION 93 #define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION)) -- 2.3.3