| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
#ifndef FONTFORGE_SPLINEFONT_H |
| 29 |
#define FONTFORGE_SPLINEFONT_H |
| 30 |
|
| 31 |
#include "basics.h" |
| 32 |
#include "dlist.h" |
| 33 |
#include "gwwiconv.h" |
| 34 |
#include "ustring.h" |
| 35 |
#include "splinechar.h" |
| 36 |
#include "splinefont_enums.h" |
| 37 |
|
| 38 |
#include <locale.h> |
| 39 |
|
| 40 |
#ifdef __cplusplus |
| 41 |
extern "C" { |
| 42 |
#endif |
| 43 |
|
| 44 |
#define extended double |
| 45 |
|
| 46 |
#define _EXTENDED |
| 47 |
|
| 48 |
#define CHR(ch1,ch2,ch3,ch4) (((ch1)<<24)|((ch2)<<16)|((ch3)<<8)|(ch4)) |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
#define BACK_LAYER_MAX 256 |
| 54 |
|
| 55 |
typedef struct dbasepoint { |
| 56 |
bigreal x; |
| 57 |
bigreal y; |
| 58 |
} DBasePoint; |
| 59 |
|
| 60 |
#define DBASEPOINT_EMPTY { (bigreal)0.0, (bigreal)0.0 } |
| 61 |
|
| 62 |
typedef struct ibounds { |
| 63 |
int minx, maxx; |
| 64 |
int miny, maxy; |
| 65 |
} IBounds; |
| 66 |
|
| 67 |
#define IBOUNDS_EMPTY { 0, 0, 0, 0 } |
| 68 |
|
| 69 |
|
| 70 |
enum val_type { v_int, v_real, v_str, v_unicode, v_lval, v_arr, v_arrfree, |
| 71 |
v_void }; |
| 72 |
|
| 73 |
enum val_flags { |
| 74 |
vf_none = 0, |
| 75 |
vf_dontfree = (1 << 1) |
| 76 |
}; |
| 77 |
|
| 78 |
typedef struct val { |
| 79 |
enum val_type type; |
| 80 |
enum val_flags flags; |
| 81 |
union { |
| 82 |
int ival; |
| 83 |
real fval; |
| 84 |
char *sval; |
| 85 |
struct val *lval; |
| 86 |
struct array *aval; |
| 87 |
} u; |
| 88 |
} Val; |
| 89 |
|
| 90 |
struct psdict { |
| 91 |
int cnt; |
| 92 |
int next; |
| 93 |
char **keys; |
| 94 |
char **values; |
| 95 |
}; |
| 96 |
|
| 97 |
struct pschars { |
| 98 |
int cnt, next; |
| 99 |
char **keys; |
| 100 |
uint8_t **values; |
| 101 |
int *lens; |
| 102 |
int bias; |
| 103 |
}; |
| 104 |
|
| 105 |
enum linejoin { |
| 106 |
lj_miter, |
| 107 |
lj_round, |
| 108 |
lj_bevel, |
| 109 |
lj_miterclip, |
| 110 |
lj_nib, |
| 111 |
lj_arcs, |
| 112 |
lj_inherited |
| 113 |
}; |
| 114 |
enum linecap { |
| 115 |
lc_butt, |
| 116 |
lc_round, |
| 117 |
lc_square, |
| 118 |
lc_nib, |
| 119 |
lc_bevel, |
| 120 |
lc_inherited |
| 121 |
}; |
| 122 |
enum stroke_rmov { |
| 123 |
srmov_layer = 0, |
| 124 |
srmov_contour = 1, |
| 125 |
srmov_none = 2 |
| 126 |
}; |
| 127 |
enum stroke_arclimit { |
| 128 |
sal_auto = 0, |
| 129 |
sal_svg2 = 1, |
| 130 |
sal_ratio = 2 |
| 131 |
}; |
| 132 |
|
| 133 |
#define JLIMIT_INHERITED (-1) |
| 134 |
|
| 135 |
struct spline; |
| 136 |
enum si_type { si_round, si_calligraphic, si_nib, si_centerline }; |
| 137 |
|
| 138 |
|
| 139 |
typedef struct strokeinfo { |
| 140 |
bigreal width; |
| 141 |
enum linejoin join; |
| 142 |
enum linecap cap; |
| 143 |
enum si_type stroke_type; |
| 144 |
enum stroke_rmov rmov; |
| 145 |
enum stroke_arclimit al; |
| 146 |
|
| 147 |
int removeinternal, removeexternal, simplify, extrema; |
| 148 |
int leave_users_center, jlrelative, ecrelative; |
| 149 |
bigreal penangle, height, extendcap, joinlimit, accuracy_target; |
| 150 |
struct splinepointlist *nib; |
| 151 |
|
| 152 |
real radius2; |
| 153 |
int pressure1, pressure2; |
| 154 |
void *data; |
| 155 |
bigreal (*factor)(void *data,struct spline *spline,real t); |
| 156 |
|
| 157 |
} StrokeInfo; |
| 158 |
|
| 159 |
extern StrokeInfo *InitializeStrokeInfo(StrokeInfo *sip); |
| 160 |
extern void SITranslatePSArgs(StrokeInfo *sip, enum linejoin lj, |
| 161 |
enum linecap lc); |
| 162 |
|
| 163 |
enum overlap_type { over_remove, over_rmselected, over_intersect, over_intersel, |
| 164 |
over_exclude, over_findinter, over_fisel }; |
| 165 |
|
| 166 |
enum simpify_flags { sf_cleanup=-1, sf_normal=0, sf_ignoreslopes=1, |
| 167 |
sf_ignoreextremum=2, sf_smoothcurves=4, sf_choosehv=8, |
| 168 |
sf_forcelines=0x10, sf_nearlyhvlines=0x20, |
| 169 |
sf_mergelines=0x40, sf_setstart2extremum=0x80, |
| 170 |
sf_rmsingletonpoints=0x100 }; |
| 171 |
struct simplifyinfo { |
| 172 |
int flags; |
| 173 |
bigreal err; |
| 174 |
bigreal tan_bounds; |
| 175 |
bigreal linefixup; |
| 176 |
bigreal linelenmax; |
| 177 |
int set_as_default; |
| 178 |
int check_selected_contours; |
| 179 |
}; |
| 180 |
|
| 181 |
struct hsquash { double lsb_percent, stem_percent, counter_percent, rsb_percent; }; |
| 182 |
|
| 183 |
enum serif_type { srf_flat, srf_simpleslant, srf_complexslant }; |
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
typedef struct italicinfo { |
| 190 |
double italic_angle; |
| 191 |
double xheight_percent; |
| 192 |
struct hsquash lc, uc, neither; |
| 193 |
enum serif_type secondary_serif; |
| 194 |
|
| 195 |
unsigned int transform_bottom_serifs: 1; |
| 196 |
unsigned int transform_top_xh_serifs: 1; |
| 197 |
unsigned int transform_top_as_serifs: 1; |
| 198 |
unsigned int transform_diagon_serifs: 1; |
| 199 |
|
| 200 |
unsigned int a_from_d: 1; |
| 201 |
|
| 202 |
unsigned int f_long_tail: 1; |
| 203 |
unsigned int f_rotate_top: 1; |
| 204 |
unsigned int pq_deserif: 1; |
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
unsigned int cyrl_phi: 1; |
| 213 |
unsigned int cyrl_i: 1; |
| 214 |
unsigned int cyrl_pi: 1; |
| 215 |
unsigned int cyrl_te: 1; |
| 216 |
unsigned int cyrl_sha: 1; |
| 217 |
unsigned int cyrl_dje: 1; |
| 218 |
unsigned int cyrl_dzhe: 1; |
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
double tan_ia; |
| 235 |
double x_height; |
| 236 |
double pq_depth; |
| 237 |
double ascender_height; |
| 238 |
double emsize; |
| 239 |
int order2; |
| 240 |
struct splinefont *sf; |
| 241 |
int layer; |
| 242 |
double serif_extent, serif_height; |
| 243 |
struct splinepoint *f_start, *f_end; |
| 244 |
struct splinepoint *ff_start1, *ff_end1, *ff_start2, *ff_end2; |
| 245 |
double f_height, ff_height; |
| 246 |
} ItalicInfo; |
| 247 |
|
| 248 |
#define ITALICINFO_REMAINDER 0, 0, 0, 0, 0, 0, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0 |
| 249 |
|
| 250 |
|
| 251 |
typedef struct bluedata { |
| 252 |
real xheight, xheighttop; |
| 253 |
real caph, caphtop; |
| 254 |
real base, basebelow; |
| 255 |
real ascent; |
| 256 |
real descent; |
| 257 |
real numh, numhtop; |
| 258 |
int bluecnt; |
| 259 |
real blues[12][2]; |
| 260 |
} BlueData; |
| 261 |
|
| 262 |
#define BLUEDATA_EMPTY { \ |
| 263 |
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, \ |
| 264 |
{ { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, \ |
| 265 |
{ 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 } \ |
| 266 |
} \ |
| 267 |
} |
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
#define DEFAULT_LANG CHR('d','f','l','t') |
| 272 |
|
| 273 |
|
| 274 |
#define DEFAULT_SCRIPT CHR('D','F','L','T') |
| 275 |
#define REQUIRED_FEATURE CHR(' ','R','Q','D') |
| 276 |
|
| 277 |
enum otlookup_type { |
| 278 |
ot_undef = 0, |
| 279 |
gsub_start = 0x000, |
| 280 |
gsub_single = 0x001, |
| 281 |
gsub_multiple = 0x002, |
| 282 |
gsub_alternate = 0x003, |
| 283 |
gsub_ligature = 0x004, |
| 284 |
gsub_context = 0x005, |
| 285 |
gsub_contextchain = 0x006, |
| 286 |
|
| 287 |
gsub_reversecchain = 0x008, |
| 288 |
|
| 289 |
morx_indic = 0x0fd, |
| 290 |
morx_context = 0x0fe, |
| 291 |
morx_insert = 0x0ff, |
| 292 |
|
| 293 |
gpos_start = 0x100, |
| 294 |
|
| 295 |
gpos_single = 0x101, |
| 296 |
gpos_pair = 0x102, |
| 297 |
gpos_cursive = 0x103, |
| 298 |
gpos_mark2base = 0x104, |
| 299 |
gpos_mark2ligature = 0x105, |
| 300 |
gpos_mark2mark = 0x106, |
| 301 |
gpos_context = 0x107, |
| 302 |
gpos_contextchain = 0x108, |
| 303 |
|
| 304 |
kern_statemachine = 0x1ff |
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
}; |
| 309 |
|
| 310 |
enum otlookup_typemasks { |
| 311 |
gsub_single_mask = 0x00001, |
| 312 |
gsub_multiple_mask = 0x00002, |
| 313 |
gsub_alternate_mask = 0x00004, |
| 314 |
gsub_ligature_mask = 0x00008, |
| 315 |
gsub_context_mask = 0x00010, |
| 316 |
gsub_contextchain_mask = 0x00020, |
| 317 |
gsub_reversecchain_mask = 0x00040, |
| 318 |
morx_indic_mask = 0x00080, |
| 319 |
morx_context_mask = 0x00100, |
| 320 |
morx_insert_mask = 0x00200, |
| 321 |
|
| 322 |
gpos_single_mask = 0x00400, |
| 323 |
gpos_pair_mask = 0x00800, |
| 324 |
gpos_cursive_mask = 0x01000, |
| 325 |
gpos_mark2base_mask = 0x02000, |
| 326 |
gpos_mark2ligature_mask = 0x04000, |
| 327 |
gpos_mark2mark_mask = 0x08000, |
| 328 |
gpos_context_mask = 0x10000, |
| 329 |
gpos_contextchain_mask = 0x20000, |
| 330 |
kern_statemachine_mask = 0x40000 |
| 331 |
}; |
| 332 |
|
| 333 |
#define MAX_LANG 4 |
| 334 |
struct scriptlanglist { |
| 335 |
uint32_t script; |
| 336 |
uint32_t langs[MAX_LANG]; |
| 337 |
uint32_t *morelangs; |
| 338 |
int lang_cnt; |
| 339 |
struct scriptlanglist *next; |
| 340 |
}; |
| 341 |
|
| 342 |
extern struct opentype_feature_friendlynames { |
| 343 |
uint32_t tag; |
| 344 |
char *tagstr; |
| 345 |
char *friendlyname; |
| 346 |
int masks; |
| 347 |
} friendlies[]; |
| 348 |
|
| 349 |
#define OPENTYPE_FEATURE_FRIENDLYNAMES_EMPTY { 0, NULL, NULL, 0 } |
| 350 |
|
| 351 |
|
| 352 |
typedef struct featurescriptlanglist { |
| 353 |
uint32_t featuretag; |
| 354 |
struct scriptlanglist *scripts; |
| 355 |
struct featurescriptlanglist *next; |
| 356 |
unsigned int ismac: 1; |
| 357 |
} FeatureScriptLangList; |
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
enum pst_flags { pst_r2l=1, pst_ignorebaseglyphs=2, pst_ignoreligatures=4, |
| 362 |
pst_ignorecombiningmarks=8, pst_usemarkfilteringset=0x10, |
| 363 |
pst_markclass=0xff00 }; |
| 364 |
#define pst_markset 0xffff0000 |
| 365 |
|
| 366 |
struct lookup_subtable { |
| 367 |
char *subtable_name; |
| 368 |
char *suffix; |
| 369 |
int16_t separation, minkern; |
| 370 |
struct otlookup *lookup; |
| 371 |
unsigned int unused: 1; |
| 372 |
unsigned int per_glyph_pst_or_kern: 1; |
| 373 |
unsigned int anchor_classes: 1; |
| 374 |
unsigned int vertical_kerning: 1; |
| 375 |
unsigned int ticked: 1; |
| 376 |
unsigned int kerning_by_touch: 1; |
| 377 |
unsigned int onlyCloser: 1; |
| 378 |
unsigned int dontautokern: 1; |
| 379 |
struct kernclass *kc; |
| 380 |
struct generic_fpst *fpst; |
| 381 |
struct generic_asm *sm; |
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
struct lookup_subtable *next; |
| 390 |
int32_t subtable_offset; |
| 391 |
int32_t *extra_subtables; |
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
}; |
| 397 |
|
| 398 |
typedef struct otlookup { |
| 399 |
struct otlookup *next; |
| 400 |
enum otlookup_type lookup_type; |
| 401 |
uint32_t lookup_flags; |
| 402 |
char *lookup_name; |
| 403 |
FeatureScriptLangList *features; |
| 404 |
struct lookup_subtable *subtables; |
| 405 |
unsigned int unused: 1; |
| 406 |
unsigned int empty: 1; |
| 407 |
unsigned int store_in_afm: 1; |
| 408 |
|
| 409 |
unsigned int needs_extension: 1; |
| 410 |
unsigned int temporary_kern: 1; |
| 411 |
unsigned int def_lang_checked: 1; |
| 412 |
unsigned int def_lang_found: 1; |
| 413 |
unsigned int ticked: 1; |
| 414 |
unsigned int in_gpos: 1; |
| 415 |
unsigned int in_jstf: 1; |
| 416 |
unsigned int only_jstf: 1; |
| 417 |
int16_t subcnt; |
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
int lookup_index; |
| 422 |
uint32_t lookup_offset; |
| 423 |
uint32_t lookup_length; |
| 424 |
char *tempname; |
| 425 |
} OTLookup; |
| 426 |
|
| 427 |
#define LOOKUP_SUBTABLE_EMPTY { NULL, NULL, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, 0, NULL } |
| 428 |
#define OTLOOKUP_EMPTY { NULL, 0, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL } |
| 429 |
|
| 430 |
|
| 431 |
typedef struct devicetab { |
| 432 |
uint16_t first_pixel_size, last_pixel_size; |
| 433 |
int8_t *corrections; |
| 434 |
} DeviceTable; |
| 435 |
|
| 436 |
typedef struct valdev { |
| 437 |
DeviceTable xadjust; |
| 438 |
DeviceTable yadjust; |
| 439 |
DeviceTable xadv; |
| 440 |
DeviceTable yadv; |
| 441 |
} ValDevTab; |
| 442 |
|
| 443 |
enum anchorclass_type { act_mark, act_mkmk, act_curs, act_mklg, act_unknown }; |
| 444 |
typedef struct anchorclass { |
| 445 |
char *name; |
| 446 |
struct lookup_subtable *subtable; |
| 447 |
uint8_t type; |
| 448 |
uint8_t has_base; |
| 449 |
uint8_t processed, has_mark, matches, ac_num; |
| 450 |
uint8_t ticked; |
| 451 |
struct anchorclass *next; |
| 452 |
} AnchorClass; |
| 453 |
|
| 454 |
enum anchor_type { at_mark, at_basechar, at_baselig, at_basemark, at_centry, at_cexit, at_max }; |
| 455 |
typedef struct anchorpoint { |
| 456 |
AnchorClass *anchor; |
| 457 |
BasePoint me; |
| 458 |
DeviceTable xadjust, yadjust; |
| 459 |
unsigned int type: 4; |
| 460 |
unsigned int selected: 1; |
| 461 |
unsigned int ticked: 1; |
| 462 |
unsigned int has_ttf_pt: 1; |
| 463 |
uint16_t ttf_pt_index; |
| 464 |
int16_t lig_index; |
| 465 |
struct anchorpoint *next; |
| 466 |
} AnchorPoint; |
| 467 |
|
| 468 |
typedef struct kernpair { |
| 469 |
|
| 470 |
struct lookup_subtable *subtable; |
| 471 |
struct splinechar *sc; |
| 472 |
int16_t off; |
| 473 |
uint16_t kcid; |
| 474 |
DeviceTable *adjust; |
| 475 |
struct kernpair *next; |
| 476 |
} KernPair; |
| 477 |
|
| 478 |
#define FF_KERNCLASS_FLAG_NATIVE 2 // If set, the class goes into groups.plist or kerning.plist. |
| 479 |
#define FF_KERNCLASS_FLAG_FEATURE 4 // If set, the class or rule goes into the feature file. In the present configuration, this ought to be zero always. |
| 480 |
#define FF_KERNCLASS_FLAG_NAMETYPE 8 // If unset (default), the class has a standard name, which translates to a U. F. O. name starting in public.kern, which may be illegal in the feature file. If set, it has a name like @MMK_. |
| 481 |
#define FF_KERNCLASS_FLAG_NAMELEGACY 16 // If set, the class has a U. F. O. name starting in @kc as FontForge liked to do in the past. |
| 482 |
#define FF_KERNCLASS_FLAG_VIRTUAL 32 // If unset (default), the class is a real character class and does not conflict with same-sided classes. If set, FontForge mostly ignores the class except for U. F. O. input/output. |
| 483 |
#define FF_KERNCLASS_FLAG_FLATTEN 64 // If unset (default), the class gets exported as a class. If set, it gets exported as its first member (in order to support class-character kerns). |
| 484 |
#define FF_KERNCLASS_FLAG_SINGLECHAR (FF_KERNCLASS_FLAG_VIRTUAL | FF_KERNCLASS_FLAG_FLATTEN) // We expect to see these used together. |
| 485 |
|
| 486 |
typedef struct kernclass { |
| 487 |
int first_cnt, second_cnt; |
| 488 |
char **firsts; |
| 489 |
char **seconds; |
| 490 |
|
| 491 |
char **firsts_names; |
| 492 |
char **seconds_names; |
| 493 |
int *firsts_flags; |
| 494 |
int *seconds_flags; |
| 495 |
struct lookup_subtable *subtable; |
| 496 |
uint16_t kcid; |
| 497 |
int16_t *offsets; |
| 498 |
int *offsets_flags; |
| 499 |
DeviceTable *adjusts; |
| 500 |
struct kernclass *next; |
| 501 |
int feature; |
| 502 |
} KernClass; |
| 503 |
|
| 504 |
typedef struct generic_pst { |
| 505 |
unsigned int ticked: 1; |
| 506 |
unsigned int temporary: 1; |
| 507 |
uint8_t type; |
| 508 |
struct lookup_subtable *subtable; |
| 509 |
struct generic_pst *next; |
| 510 |
union { |
| 511 |
struct vr pos; |
| 512 |
struct { char *paired; struct vr *vr; } pair; |
| 513 |
struct { char *variant; } subs; |
| 514 |
struct { char *components; } mult, alt; |
| 515 |
struct { char *components; struct splinechar *lig; } lig; |
| 516 |
struct { int16_t *carets; int cnt; } lcaret; |
| 517 |
} u; |
| 518 |
} PST; |
| 519 |
|
| 520 |
typedef struct liglist { |
| 521 |
PST *lig; |
| 522 |
struct splinechar *first; |
| 523 |
struct splinecharlist *components; |
| 524 |
struct liglist *next; |
| 525 |
int ccnt; |
| 526 |
} LigList; |
| 527 |
|
| 528 |
enum fpossub_format { pst_glyphs, pst_class, pst_coverage, |
| 529 |
pst_reversecoverage, pst_formatmax }; |
| 530 |
|
| 531 |
struct seqlookup { |
| 532 |
int seq; |
| 533 |
struct otlookup *lookup; |
| 534 |
}; |
| 535 |
|
| 536 |
struct fpg { char *names, *back, *fore; }; |
| 537 |
struct fpc { int ncnt, bcnt, fcnt; uint16_t *nclasses, *bclasses, *fclasses, *allclasses; }; |
| 538 |
struct fpv { int ncnt, bcnt, fcnt; char **ncovers, **bcovers, **fcovers; }; |
| 539 |
struct fpr { int always1, bcnt, fcnt; char **ncovers, **bcovers, **fcovers; char *replacements; }; |
| 540 |
|
| 541 |
struct fpst_rule { |
| 542 |
union { |
| 543 |
|
| 544 |
|
| 545 |
struct fpg glyph; |
| 546 |
struct fpc fpc_class; |
| 547 |
struct fpv coverage; |
| 548 |
struct fpr rcoverage; |
| 549 |
} u; |
| 550 |
int lookup_cnt; |
| 551 |
struct seqlookup *lookups; |
| 552 |
}; |
| 553 |
|
| 554 |
typedef struct generic_fpst { |
| 555 |
uint16_t type; |
| 556 |
uint16_t format; |
| 557 |
struct lookup_subtable *subtable; |
| 558 |
struct generic_fpst *next; |
| 559 |
uint16_t nccnt, bccnt, fccnt; |
| 560 |
uint16_t rule_cnt; |
| 561 |
char **nclass, **bclass, **fclass; |
| 562 |
struct fpst_rule *rules; |
| 563 |
uint8_t ticked; |
| 564 |
uint8_t effectively_by_glyphs; |
| 565 |
char **nclassnames, **bclassnames, **fclassnames; |
| 566 |
} FPST; |
| 567 |
|
| 568 |
enum asm_type { asm_indic, asm_context, asm_lig, asm_simple=4, asm_insert, |
| 569 |
asm_kern=0x11 }; |
| 570 |
enum asm_flags { asm_vert=0x8000, asm_descending=0x4000, asm_always=0x2000 }; |
| 571 |
|
| 572 |
struct asm_state { |
| 573 |
uint16_t next_state; |
| 574 |
uint16_t flags; |
| 575 |
union { |
| 576 |
struct { |
| 577 |
struct otlookup *mark_lookup; |
| 578 |
struct otlookup *cur_lookup; |
| 579 |
} context; |
| 580 |
struct { |
| 581 |
char *mark_ins; |
| 582 |
char *cur_ins; |
| 583 |
} insert; |
| 584 |
struct { |
| 585 |
int16_t *kerns; |
| 586 |
int kcnt; |
| 587 |
} kern; |
| 588 |
} u; |
| 589 |
}; |
| 590 |
|
| 591 |
typedef struct generic_asm { |
| 592 |
struct generic_asm *next; |
| 593 |
uint16_t type; |
| 594 |
struct lookup_subtable *subtable; |
| 595 |
uint16_t flags; |
| 596 |
uint8_t ticked; |
| 597 |
|
| 598 |
uint16_t class_cnt, state_cnt; |
| 599 |
char **classes; |
| 600 |
struct asm_state *state; |
| 601 |
} ASM; |
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
|
| 614 |
|
| 615 |
|
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
|
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
|
| 632 |
|
| 633 |
|
| 634 |
struct jstf_prio { |
| 635 |
OTLookup **enableShrink; |
| 636 |
OTLookup **disableShrink; |
| 637 |
OTLookup **maxShrink; |
| 638 |
OTLookup **enableExtend; |
| 639 |
OTLookup **disableExtend; |
| 640 |
OTLookup **maxExtend; |
| 641 |
}; |
| 642 |
|
| 643 |
struct jstf_lang { |
| 644 |
uint32_t lang; |
| 645 |
struct jstf_lang *next; |
| 646 |
int cnt; |
| 647 |
struct jstf_prio *prios; |
| 648 |
}; |
| 649 |
|
| 650 |
typedef struct jstf_script { |
| 651 |
uint32_t script; |
| 652 |
struct jstf_script *next; |
| 653 |
char *extenders; |
| 654 |
struct jstf_lang *langs; |
| 655 |
} Justify; |
| 656 |
|
| 657 |
struct macname { |
| 658 |
struct macname *next; |
| 659 |
uint16_t enc; |
| 660 |
uint16_t lang; |
| 661 |
char *name; |
| 662 |
}; |
| 663 |
|
| 664 |
|
| 665 |
|
| 666 |
|
| 667 |
struct otfname { |
| 668 |
struct otfname *next; |
| 669 |
uint16_t lang; |
| 670 |
char *name; |
| 671 |
}; |
| 672 |
|
| 673 |
enum otffn_field { |
| 674 |
otffn_featname, otffn_tooltiptext, otffn_sampletext, |
| 675 |
otffn_characters , |
| 676 |
otffn_paramname_begin |
| 677 |
|
| 678 |
}; |
| 679 |
struct otffeatname { |
| 680 |
uint32_t tag; |
| 681 |
struct otfname *names; |
| 682 |
struct otffeatname *next; |
| 683 |
enum otffn_field field; |
| 684 |
uint16_t nid; |
| 685 |
}; |
| 686 |
|
| 687 |
struct macsetting { |
| 688 |
struct macsetting *next; |
| 689 |
uint16_t setting; |
| 690 |
uint16_t strid; |
| 691 |
struct macname *setname; |
| 692 |
unsigned int initially_enabled: 1; |
| 693 |
}; |
| 694 |
|
| 695 |
typedef struct macfeat { |
| 696 |
struct macfeat *next; |
| 697 |
uint16_t feature; |
| 698 |
uint8_t ismutex; |
| 699 |
uint8_t default_setting; |
| 700 |
uint16_t strid; |
| 701 |
struct macname *featname; |
| 702 |
struct macsetting *settings; |
| 703 |
} MacFeat; |
| 704 |
|
| 705 |
enum sfundotype |
| 706 |
{ |
| 707 |
sfut_none=0, |
| 708 |
sfut_lookups, |
| 709 |
sfut_lookups_kerns, |
| 710 |
sfut_fontinfo, |
| 711 |
sfut_noop |
| 712 |
}; |
| 713 |
|
| 714 |
|
| 715 |
|
| 716 |
|
| 717 |
|
| 718 |
|
| 719 |
|
| 720 |
|
| 721 |
|
| 722 |
|
| 723 |
|
| 724 |
|
| 725 |
|
| 726 |
typedef struct sfundoes { |
| 727 |
struct dlistnode ln; |
| 728 |
char* msg; |
| 729 |
enum sfundotype type; |
| 730 |
union { |
| 731 |
int dummy; |
| 732 |
} u; |
| 733 |
char* sfdchunk; |
| 734 |
} SFUndoes; |
| 735 |
|
| 736 |
|
| 737 |
typedef struct enc { |
| 738 |
char *enc_name; |
| 739 |
int char_cnt; |
| 740 |
int32_t *unicode; |
| 741 |
char **psnames; |
| 742 |
struct enc *next; |
| 743 |
unsigned int builtin: 1; |
| 744 |
unsigned int hidden: 1; |
| 745 |
unsigned int only_1byte: 1; |
| 746 |
unsigned int has_1byte: 1; |
| 747 |
unsigned int has_2byte: 1; |
| 748 |
unsigned int is_unicodebmp: 1; |
| 749 |
unsigned int is_unicodefull: 1; |
| 750 |
unsigned int is_custom: 1; |
| 751 |
unsigned int is_original: 1; |
| 752 |
unsigned int is_compact: 1; |
| 753 |
unsigned int is_japanese: 1; |
| 754 |
unsigned int is_korean: 1; |
| 755 |
unsigned int is_tradchinese: 1; |
| 756 |
unsigned int is_simplechinese: 1; |
| 757 |
char iso_2022_escape[8]; |
| 758 |
int iso_2022_escape_len; |
| 759 |
int low_page, high_page; |
| 760 |
char *iconv_name; |
| 761 |
iconv_t tounicode; |
| 762 |
iconv_t fromunicode; |
| 763 |
int (*tounicode_func)(int); |
| 764 |
int (*fromunicode_func)(int); |
| 765 |
unsigned int is_temporary: 1; |
| 766 |
int char_max; |
| 767 |
} Encoding; |
| 768 |
|
| 769 |
struct renames { char *from; char *to; }; |
| 770 |
|
| 771 |
typedef struct namelist { |
| 772 |
struct namelist *basedon; |
| 773 |
char *title; |
| 774 |
const char ***unicode[17]; |
| 775 |
struct namelist *next; |
| 776 |
struct renames *renames; |
| 777 |
int uses_unicode; |
| 778 |
char *a_utf8_name; |
| 779 |
} NameList; |
| 780 |
|
| 781 |
enum uni_interp { ui_unset= -1, ui_none, ui_adobe, ui_greek, ui_japanese, |
| 782 |
ui_trad_chinese, ui_simp_chinese, ui_korean, ui_ams }; |
| 783 |
|
| 784 |
struct remap { uint32_t firstenc, lastenc; int32_t infont; }; |
| 785 |
|
| 786 |
typedef struct encmap { |
| 787 |
int32_t *map; |
| 788 |
int32_t *backmap; |
| 789 |
int enccount; |
| 790 |
|
| 791 |
|
| 792 |
|
| 793 |
int encmax; |
| 794 |
int backmax; |
| 795 |
struct remap *remap; |
| 796 |
Encoding *enc; |
| 797 |
unsigned int ticked: 1; |
| 798 |
} EncMap; |
| 799 |
|
| 800 |
enum property_type { prt_string, prt_atom, prt_int, prt_uint, prt_property=0x10 }; |
| 801 |
|
| 802 |
typedef struct bdfprops { |
| 803 |
char *name; |
| 804 |
int type; |
| 805 |
union { |
| 806 |
char *str; |
| 807 |
char *atom; |
| 808 |
int val; |
| 809 |
} u; |
| 810 |
} BDFProperties; |
| 811 |
|
| 812 |
typedef struct bdffont { |
| 813 |
struct splinefont *sf; |
| 814 |
int glyphcnt, glyphmax; |
| 815 |
BDFChar **glyphs; |
| 816 |
int16_t pixelsize; |
| 817 |
int16_t ascent, descent; |
| 818 |
int16_t layer; |
| 819 |
unsigned int piecemeal: 1; |
| 820 |
unsigned int bbsized: 1; |
| 821 |
unsigned int ticked: 1; |
| 822 |
unsigned int unhinted_freetype: 1; |
| 823 |
unsigned int recontext_freetype: 1; |
| 824 |
struct bdffont *next; |
| 825 |
struct clut *clut; |
| 826 |
char *foundry; |
| 827 |
int res; |
| 828 |
void *freetype_context; |
| 829 |
uint16_t truesize; |
| 830 |
int16_t prop_cnt; |
| 831 |
int16_t prop_max; |
| 832 |
BDFProperties *props; |
| 833 |
uint16_t ptsize, dpi; |
| 834 |
} BDFFont; |
| 835 |
|
| 836 |
struct gv_part { |
| 837 |
char *component; |
| 838 |
unsigned int is_extender: 1; |
| 839 |
uint16_t startConnectorLength; |
| 840 |
uint16_t endConnectorLength; |
| 841 |
uint16_t fullAdvance; |
| 842 |
}; |
| 843 |
|
| 844 |
|
| 845 |
struct glyphvariants { |
| 846 |
char *variants; |
| 847 |
|
| 848 |
int16_t italic_correction; |
| 849 |
DeviceTable *italic_adjusts; |
| 850 |
int part_cnt; |
| 851 |
struct gv_part *parts; |
| 852 |
}; |
| 853 |
|
| 854 |
struct mathkerndata { |
| 855 |
int16_t height,kern; |
| 856 |
DeviceTable *height_adjusts; |
| 857 |
DeviceTable *kern_adjusts; |
| 858 |
}; |
| 859 |
|
| 860 |
|
| 861 |
struct mathkernvertex { |
| 862 |
int cnt; |
| 863 |
|
| 864 |
|
| 865 |
|
| 866 |
struct mathkerndata *mkd; |
| 867 |
}; |
| 868 |
|
| 869 |
struct mathkern { |
| 870 |
struct mathkernvertex top_right; |
| 871 |
struct mathkernvertex top_left; |
| 872 |
struct mathkernvertex bottom_right; |
| 873 |
struct mathkernvertex bottom_left; |
| 874 |
}; |
| 875 |
|
| 876 |
enum privatedict_state { |
| 877 |
pds_odd = 0x1, |
| 878 |
pds_outoforder = 0x2, |
| 879 |
pds_toomany = 0x4, |
| 880 |
pds_tooclose = 0x8, |
| 881 |
pds_notintegral= 0x10, |
| 882 |
pds_toobig = 0x20, |
| 883 |
pds_shift = 8, |
| 884 |
|
| 885 |
pds_missingblue = 0x010000, |
| 886 |
pds_badbluefuzz = 0x020000, |
| 887 |
pds_badbluescale = 0x040000, |
| 888 |
pds_badstdhw = 0x080000, |
| 889 |
pds_badstdvw = 0x100000, |
| 890 |
pds_badstemsnaph = 0x200000, |
| 891 |
pds_badstemsnapv = 0x400000, |
| 892 |
pds_stemsnapnostdh = 0x0800000, |
| 893 |
pds_stemsnapnostdv = 0x1000000, |
| 894 |
pds_badblueshift = 0x2000000 |
| 895 |
|
| 896 |
}; |
| 897 |
|
| 898 |
enum validation_state { vs_unknown = 0, |
| 899 |
vs_known=0x01, |
| 900 |
vs_opencontour=0x02, |
| 901 |
vs_selfintersects=0x04, |
| 902 |
vs_wrongdirection=0x08, |
| 903 |
vs_flippedreferences=0x10, |
| 904 |
vs_missingextrema=0x20, |
| 905 |
vs_missingglyphnameingsub=0x40, |
| 906 |
|
| 907 |
vs_toomanypoints=0x80, |
| 908 |
vs_toomanyhints=0x100, |
| 909 |
vs_badglyphname=0x200, |
| 910 |
|
| 911 |
|
| 912 |
vs_maxp_toomanypoints =0x400, |
| 913 |
vs_maxp_toomanypaths =0x800, |
| 914 |
vs_maxp_toomanycomppoints=0x1000, |
| 915 |
vs_maxp_toomanycomppaths =0x2000, |
| 916 |
vs_maxp_instrtoolong =0x4000, |
| 917 |
vs_maxp_toomanyrefs =0x8000, |
| 918 |
vs_maxp_refstoodeep =0x10000, |
| 919 |
|
| 920 |
|
| 921 |
vs_pointstoofarapart = 0x40000, |
| 922 |
vs_nonintegral = 0x80000, |
| 923 |
vs_missinganchor = 0x100000, |
| 924 |
vs_dupname = 0x200000, |
| 925 |
vs_dupunicode = 0x400000, |
| 926 |
vs_overlappedhints = 0x800000, |
| 927 |
|
| 928 |
vs_last = vs_overlappedhints, |
| 929 |
vs_maskps = 0x3fe | vs_pointstoofarapart | vs_missinganchor | vs_dupname | vs_dupunicode | vs_overlappedhints, |
| 930 |
vs_maskcid = 0x1fe | vs_pointstoofarapart | vs_missinganchor | vs_dupname | vs_overlappedhints, |
| 931 |
vs_maskttf = 0x7e | vs_pointstoofarapart | vs_nonintegral | vs_missinganchor | vs_dupunicode, |
| 932 |
vs_maskfindproblems = 0x1be | vs_pointstoofarapart | vs_nonintegral | vs_missinganchor | vs_overlappedhints |
| 933 |
}; |
| 934 |
|
| 935 |
struct splinecharlist { struct splinechar *sc; struct splinecharlist *next;}; |
| 936 |
|
| 937 |
struct altuni { struct altuni *next; int32_t unienc, vs; uint32_t fid; }; |
| 938 |
|
| 939 |
|
| 940 |
|
| 941 |
|
| 942 |
|
| 943 |
|
| 944 |
|
| 945 |
|
| 946 |
|
| 947 |
#define TEX_UNDEF 0x7fff |
| 948 |
|
| 949 |
enum ttfnames { ttf_copyright=0, ttf_family, ttf_subfamily, ttf_uniqueid, |
| 950 |
ttf_fullname, ttf_version, ttf_postscriptname, ttf_trademark, |
| 951 |
ttf_manufacturer, ttf_designer, ttf_descriptor, ttf_venderurl, |
| 952 |
ttf_designerurl, ttf_license, ttf_licenseurl, ttf_idontknow, |
| 953 |
ttf_preffamilyname, ttf_prefmodifiers, ttf_compatfull, ttf_sampletext, |
| 954 |
ttf_cidfindfontname, ttf_wwsfamily, ttf_wwssubfamily, ttf_namemax }; |
| 955 |
struct ttflangname { |
| 956 |
int lang; |
| 957 |
char *names[ttf_namemax]; |
| 958 |
int frommac[(ttf_namemax+31)/32]; |
| 959 |
struct ttflangname *next; |
| 960 |
}; |
| 961 |
|
| 962 |
struct MATH { |
| 963 |
|
| 964 |
int16_t ScriptPercentScaleDown; |
| 965 |
int16_t ScriptScriptPercentScaleDown; |
| 966 |
uint16_t DelimitedSubFormulaMinHeight; |
| 967 |
uint16_t DisplayOperatorMinHeight; |
| 968 |
int16_t MathLeading; |
| 969 |
DeviceTable *MathLeading_adjust; |
| 970 |
int16_t AxisHeight; |
| 971 |
DeviceTable *AxisHeight_adjust; |
| 972 |
int16_t AccentBaseHeight; |
| 973 |
DeviceTable *AccentBaseHeight_adjust; |
| 974 |
int16_t FlattenedAccentBaseHeight; |
| 975 |
DeviceTable *FlattenedAccentBaseHeight_adjust; |
| 976 |
int16_t SubscriptShiftDown; |
| 977 |
DeviceTable *SubscriptShiftDown_adjust; |
| 978 |
int16_t SubscriptTopMax; |
| 979 |
DeviceTable *SubscriptTopMax_adjust; |
| 980 |
int16_t SubscriptBaselineDropMin; |
| 981 |
DeviceTable *SubscriptBaselineDropMin_adjust; |
| 982 |
int16_t SuperscriptShiftUp; |
| 983 |
DeviceTable *SuperscriptShiftUp_adjust; |
| 984 |
int16_t SuperscriptShiftUpCramped; |
| 985 |
DeviceTable *SuperscriptShiftUpCramped_adjust; |
| 986 |
int16_t SuperscriptBottomMin; |
| 987 |
DeviceTable *SuperscriptBottomMin_adjust; |
| 988 |
int16_t SuperscriptBaselineDropMax; |
| 989 |
DeviceTable *SuperscriptBaselineDropMax_adjust; |
| 990 |
int16_t SubSuperscriptGapMin; |
| 991 |
DeviceTable *SubSuperscriptGapMin_adjust; |
| 992 |
int16_t SuperscriptBottomMaxWithSubscript; |
| 993 |
DeviceTable *SuperscriptBottomMaxWithSubscript_adjust; |
| 994 |
int16_t SpaceAfterScript; |
| 995 |
DeviceTable *SpaceAfterScript_adjust; |
| 996 |
int16_t UpperLimitGapMin; |
| 997 |
DeviceTable *UpperLimitGapMin_adjust; |
| 998 |
int16_t UpperLimitBaselineRiseMin; |
| 999 |
DeviceTable *UpperLimitBaselineRiseMin_adjust; |
| 1000 |
int16_t LowerLimitGapMin; |
| 1001 |
DeviceTable *LowerLimitGapMin_adjust; |
| 1002 |
int16_t LowerLimitBaselineDropMin; |
| 1003 |
DeviceTable *LowerLimitBaselineDropMin_adjust; |
| 1004 |
int16_t StackTopShiftUp; |
| 1005 |
DeviceTable *StackTopShiftUp_adjust; |
| 1006 |
int16_t StackTopDisplayStyleShiftUp; |
| 1007 |
DeviceTable *StackTopDisplayStyleShiftUp_adjust; |
| 1008 |
int16_t StackBottomShiftDown; |
| 1009 |
DeviceTable *StackBottomShiftDown_adjust; |
| 1010 |
int16_t StackBottomDisplayStyleShiftDown; |
| 1011 |
DeviceTable *StackBottomDisplayStyleShiftDown_adjust; |
| 1012 |
int16_t StackGapMin; |
| 1013 |
DeviceTable *StackGapMin_adjust; |
| 1014 |
int16_t StackDisplayStyleGapMin; |
| 1015 |
DeviceTable *StackDisplayStyleGapMin_adjust; |
| 1016 |
int16_t StretchStackTopShiftUp; |
| 1017 |
DeviceTable *StretchStackTopShiftUp_adjust; |
| 1018 |
int16_t StretchStackBottomShiftDown; |
| 1019 |
DeviceTable *StretchStackBottomShiftDown_adjust; |
| 1020 |
int16_t StretchStackGapAboveMin; |
| 1021 |
DeviceTable *StretchStackGapAboveMin_adjust; |
| 1022 |
int16_t StretchStackGapBelowMin; |
| 1023 |
DeviceTable *StretchStackGapBelowMin_adjust; |
| 1024 |
int16_t FractionNumeratorShiftUp; |
| 1025 |
DeviceTable *FractionNumeratorShiftUp_adjust; |
| 1026 |
int16_t FractionNumeratorDisplayStyleShiftUp; |
| 1027 |
DeviceTable *FractionNumeratorDisplayStyleShiftUp_adjust; |
| 1028 |
int16_t FractionDenominatorShiftDown; |
| 1029 |
DeviceTable *FractionDenominatorShiftDown_adjust; |
| 1030 |
int16_t FractionDenominatorDisplayStyleShiftDown; |
| 1031 |
DeviceTable *FractionDenominatorDisplayStyleShiftDown_adjust; |
| 1032 |
int16_t FractionNumeratorGapMin; |
| 1033 |
DeviceTable *FractionNumeratorGapMin_adjust; |
| 1034 |
int16_t FractionNumeratorDisplayStyleGapMin; |
| 1035 |
DeviceTable *FractionNumeratorDisplayStyleGapMin_adjust; |
| 1036 |
int16_t FractionRuleThickness; |
| 1037 |
DeviceTable *FractionRuleThickness_adjust; |
| 1038 |
int16_t FractionDenominatorGapMin; |
| 1039 |
DeviceTable *FractionDenominatorGapMin_adjust; |
| 1040 |
int16_t FractionDenominatorDisplayStyleGapMin; |
| 1041 |
DeviceTable *FractionDenominatorDisplayStyleGapMin_adjust; |
| 1042 |
int16_t SkewedFractionHorizontalGap; |
| 1043 |
DeviceTable *SkewedFractionHorizontalGap_adjust; |
| 1044 |
int16_t SkewedFractionVerticalGap; |
| 1045 |
DeviceTable *SkewedFractionVerticalGap_adjust; |
| 1046 |
int16_t OverbarVerticalGap; |
| 1047 |
DeviceTable *OverbarVerticalGap_adjust; |
| 1048 |
int16_t OverbarRuleThickness; |
| 1049 |
DeviceTable *OverbarRuleThickness_adjust; |
| 1050 |
int16_t OverbarExtraAscender; |
| 1051 |
DeviceTable *OverbarExtraAscender_adjust; |
| 1052 |
int16_t UnderbarVerticalGap; |
| 1053 |
DeviceTable *UnderbarVerticalGap_adjust; |
| 1054 |
int16_t UnderbarRuleThickness; |
| 1055 |
DeviceTable *UnderbarRuleThickness_adjust; |
| 1056 |
int16_t UnderbarExtraDescender; |
| 1057 |
DeviceTable *UnderbarExtraDescender_adjust; |
| 1058 |
int16_t RadicalVerticalGap; |
| 1059 |
DeviceTable *RadicalVerticalGap_adjust; |
| 1060 |
int16_t RadicalDisplayStyleVerticalGap; |
| 1061 |
DeviceTable *RadicalDisplayStyleVerticalGap_adjust; |
| 1062 |
int16_t RadicalRuleThickness; |
| 1063 |
DeviceTable *RadicalRuleThickness_adjust; |
| 1064 |
int16_t RadicalExtraAscender; |
| 1065 |
DeviceTable *RadicalExtraAscender_adjust; |
| 1066 |
int16_t RadicalKernBeforeDegree; |
| 1067 |
DeviceTable *RadicalKernBeforeDegree_adjust; |
| 1068 |
int16_t RadicalKernAfterDegree; |
| 1069 |
DeviceTable *RadicalKernAfterDegree_adjust; |
| 1070 |
uint16_t RadicalDegreeBottomRaisePercent; |
| 1071 |
|
| 1072 |
uint16_t MinConnectorOverlap; |
| 1073 |
}; |
| 1074 |
|
| 1075 |
enum backedup_state { bs_dontknow=0, bs_not=1, bs_backedup=2 }; |
| 1076 |
enum loadvalidation_state { |
| 1077 |
lvs_bad_ps_fontname = 0x001, |
| 1078 |
lvs_bad_glyph_table = 0x002, |
| 1079 |
lvs_bad_cff_table = 0x004, |
| 1080 |
lvs_bad_metrics_table = 0x008, |
| 1081 |
lvs_bad_cmap_table = 0x010, |
| 1082 |
lvs_bad_bitmaps_table = 0x020, |
| 1083 |
lvs_bad_gx_table = 0x040, |
| 1084 |
lvs_bad_ot_table = 0x080, |
| 1085 |
lvs_bad_os2_version = 0x100, |
| 1086 |
lvs_bad_sfnt_header = 0x200 |
| 1087 |
}; |
| 1088 |
|
| 1089 |
typedef struct layerinfo { |
| 1090 |
char *name; |
| 1091 |
unsigned int background: 1; |
| 1092 |
unsigned int order2: 1; |
| 1093 |
|
| 1094 |
unsigned int ticked: 1; |
| 1095 |
char * ufo_path; |
| 1096 |
} LayerInfo; |
| 1097 |
|
| 1098 |
|
| 1099 |
struct baselangextent { |
| 1100 |
uint32_t lang; |
| 1101 |
struct baselangextent *next; |
| 1102 |
int16_t ascent, descent; |
| 1103 |
struct baselangextent *features; |
| 1104 |
}; |
| 1105 |
|
| 1106 |
struct basescript { |
| 1107 |
uint32_t script; |
| 1108 |
struct basescript *next; |
| 1109 |
int def_baseline; |
| 1110 |
int16_t *baseline_pos; |
| 1111 |
struct baselangextent *langs; |
| 1112 |
|
| 1113 |
}; |
| 1114 |
|
| 1115 |
struct Base { |
| 1116 |
int baseline_cnt; |
| 1117 |
uint32_t *baseline_tags; |
| 1118 |
|
| 1119 |
|
| 1120 |
struct basescript *scripts; |
| 1121 |
}; |
| 1122 |
|
| 1123 |
struct pfminfo { |
| 1124 |
unsigned int pfmset: 1; |
| 1125 |
unsigned int winascent_add: 1; |
| 1126 |
unsigned int windescent_add: 1; |
| 1127 |
unsigned int hheadascent_add: 1; |
| 1128 |
unsigned int hheaddescent_add: 1; |
| 1129 |
unsigned int typoascent_add: 1; |
| 1130 |
unsigned int typodescent_add: 1; |
| 1131 |
unsigned int subsuper_set: 1; |
| 1132 |
unsigned int panose_set: 1; |
| 1133 |
unsigned int hheadset: 1; |
| 1134 |
unsigned int vheadset: 1; |
| 1135 |
unsigned int hascodepages: 1; |
| 1136 |
unsigned int hasunicoderanges: 1; |
| 1137 |
unsigned char pfmfamily; |
| 1138 |
int16_t weight; |
| 1139 |
int16_t width; |
| 1140 |
char panose[10]; |
| 1141 |
|
| 1142 |
|
| 1143 |
|
| 1144 |
int16_t stylemap; |
| 1145 |
int16_t fstype; |
| 1146 |
int16_t linegap; |
| 1147 |
int16_t vlinegap; |
| 1148 |
int16_t hhead_ascent, hhead_descent; |
| 1149 |
int16_t os2_typoascent, os2_typodescent, os2_typolinegap; |
| 1150 |
int16_t os2_winascent, os2_windescent; |
| 1151 |
int16_t os2_subxsize, os2_subysize, os2_subxoff, os2_subyoff; |
| 1152 |
int16_t os2_supxsize, os2_supysize, os2_supxoff, os2_supyoff; |
| 1153 |
int16_t os2_strikeysize, os2_strikeypos; |
| 1154 |
int16_t os2_capheight, os2_xheight; |
| 1155 |
char os2_vendor[4]; |
| 1156 |
int16_t os2_family_class; |
| 1157 |
uint32_t codepages[2]; |
| 1158 |
uint32_t unicoderanges[4]; |
| 1159 |
}; |
| 1160 |
|
| 1161 |
struct ttf_table { |
| 1162 |
uint32_t tag; |
| 1163 |
uint32_t len, maxlen; |
| 1164 |
uint8_t *data; |
| 1165 |
struct ttf_table *next; |
| 1166 |
FILE *temp; |
| 1167 |
}; |
| 1168 |
|
| 1169 |
enum texdata_type { tex_unset, tex_text, tex_math, tex_mathext }; |
| 1170 |
|
| 1171 |
struct texdata { |
| 1172 |
enum texdata_type type; |
| 1173 |
int32_t params[22]; |
| 1174 |
}; |
| 1175 |
|
| 1176 |
struct gasp { |
| 1177 |
uint16_t ppem; |
| 1178 |
uint16_t flags; |
| 1179 |
}; |
| 1180 |
|
| 1181 |
struct ff_glyphclasses { |
| 1182 |
|
| 1183 |
|
| 1184 |
|
| 1185 |
char *classname, *glyphs; |
| 1186 |
struct ff_glyphclasses *next; |
| 1187 |
}; |
| 1188 |
|
| 1189 |
struct ff_rawoffsets { |
| 1190 |
|
| 1191 |
|
| 1192 |
char *left; |
| 1193 |
char *right; |
| 1194 |
int offset; |
| 1195 |
struct ff_rawoffsets *next; |
| 1196 |
}; |
| 1197 |
|
| 1198 |
typedef struct splinefont { |
| 1199 |
char *fontname, *fullname, *familyname, *weight; |
| 1200 |
char *familyname_with_timestamp; |
| 1201 |
char *copyright; |
| 1202 |
char *filename; |
| 1203 |
char *defbasefilename; |
| 1204 |
char *version; |
| 1205 |
real italicangle, upos, uwidth; |
| 1206 |
int ascent, descent, invalidem; |
| 1207 |
int uniqueid; |
| 1208 |
int glyphcnt, glyphmax; |
| 1209 |
SplineChar **glyphs; |
| 1210 |
unsigned int changed: 1; |
| 1211 |
unsigned int changed_since_autosave: 1; |
| 1212 |
unsigned int changed_since_xuidchanged: 1; |
| 1213 |
unsigned int display_antialias: 1; |
| 1214 |
unsigned int display_bbsized: 1; |
| 1215 |
unsigned int dotlesswarn: 1; |
| 1216 |
unsigned int onlybitmaps: 1; |
| 1217 |
unsigned int serifcheck: 1; |
| 1218 |
unsigned int issans: 1; |
| 1219 |
unsigned int isserif: 1; |
| 1220 |
unsigned int hasvmetrics: 1; |
| 1221 |
unsigned int loading_cid_map: 1; |
| 1222 |
unsigned int dupnamewarn: 1; |
| 1223 |
unsigned int encodingchanged: 1; |
| 1224 |
unsigned int multilayer: 1; |
| 1225 |
|
| 1226 |
unsigned int strokedfont: 1; |
| 1227 |
unsigned int isnew: 1; |
| 1228 |
unsigned int compacted: 1; |
| 1229 |
unsigned int backedup: 2; |
| 1230 |
unsigned int use_typo_metrics: 1; |
| 1231 |
|
| 1232 |
|
| 1233 |
|
| 1234 |
unsigned int weight_width_slope_only: 1; |
| 1235 |
unsigned int save_to_dir: 1; |
| 1236 |
unsigned int head_optimized_for_cleartype: 1; |
| 1237 |
unsigned int ticked: 1; |
| 1238 |
unsigned int internal_temp: 1; |
| 1239 |
unsigned int complained_about_spiros: 1; |
| 1240 |
unsigned int use_xuid: 1; |
| 1241 |
unsigned int use_uniqueid: 1; |
| 1242 |
|
| 1243 |
struct fontviewbase *fv; |
| 1244 |
struct metricsview *metrics; |
| 1245 |
enum uni_interp uni_interp; |
| 1246 |
NameList *for_new_glyphs; |
| 1247 |
EncMap *map; |
| 1248 |
Layer grid; |
| 1249 |
BDFFont *bitmaps; |
| 1250 |
char *origname; |
| 1251 |
char *autosavename; |
| 1252 |
int display_size; |
| 1253 |
struct psdict *private_dict; |
| 1254 |
char *xuid; |
| 1255 |
struct pfminfo pfminfo; |
| 1256 |
struct ttflangname *names; |
| 1257 |
char *cidregistry, *ordering; |
| 1258 |
int supplement; |
| 1259 |
int subfontcnt; |
| 1260 |
struct splinefont **subfonts; |
| 1261 |
struct splinefont *cidmaster; |
| 1262 |
float cidversion; |
| 1263 |
#if HANYANG |
| 1264 |
struct compositionrules *rules; |
| 1265 |
#endif |
| 1266 |
char *comments; |
| 1267 |
char *fontlog; |
| 1268 |
int tempuniqueid; |
| 1269 |
int top_enc; |
| 1270 |
uint16_t desired_row_cnt, desired_col_cnt; |
| 1271 |
struct glyphnamehash *glyphnames; |
| 1272 |
struct ttf_table *ttf_tables, *ttf_tab_saved; |
| 1273 |
|
| 1274 |
char **cvt_names; |
| 1275 |
|
| 1276 |
#define END_CVT_NAMES ((char *) (~(intptr_t) 0)) |
| 1277 |
struct instrdata *instr_dlgs; |
| 1278 |
struct shortview *cvt_dlg; |
| 1279 |
struct kernclasslistdlg *kcld, *vkcld; |
| 1280 |
struct kernclassdlg *kcd; |
| 1281 |
struct texdata texdata; |
| 1282 |
OTLookup *gsub_lookups, *gpos_lookups; |
| 1283 |
|
| 1284 |
AnchorClass *anchor; |
| 1285 |
KernClass *kerns, *vkerns; |
| 1286 |
FPST *possub; |
| 1287 |
ASM *sm; |
| 1288 |
MacFeat *features; |
| 1289 |
char *chosenname; |
| 1290 |
struct mmset *mm; |
| 1291 |
int16_t macstyle; |
| 1292 |
char *fondname; |
| 1293 |
|
| 1294 |
|
| 1295 |
|
| 1296 |
|
| 1297 |
|
| 1298 |
|
| 1299 |
uint16_t design_size; |
| 1300 |
uint16_t fontstyle_id; |
| 1301 |
struct otfname *fontstyle_name; |
| 1302 |
uint16_t design_range_bottom, design_range_top; |
| 1303 |
struct otffeatname *feat_names; |
| 1304 |
real strokewidth; |
| 1305 |
|
| 1306 |
|
| 1307 |
int mark_class_cnt; |
| 1308 |
char **mark_classes; |
| 1309 |
char **mark_class_names; |
| 1310 |
|
| 1311 |
|
| 1312 |
int mark_set_cnt; |
| 1313 |
char **mark_sets; |
| 1314 |
char **mark_set_names; |
| 1315 |
struct ff_glyphclasses *groups; |
| 1316 |
struct ff_rawoffsets *groupkerns; |
| 1317 |
struct ff_rawoffsets *groupvkerns; |
| 1318 |
long long creationtime; |
| 1319 |
long long modificationtime; |
| 1320 |
short os2_version; |
| 1321 |
short compression; |
| 1322 |
short gasp_version; |
| 1323 |
short gasp_cnt; |
| 1324 |
struct gasp *gasp; |
| 1325 |
struct MATH *MATH; |
| 1326 |
float sfd_version; |
| 1327 |
struct gfi_data *fontinfo; |
| 1328 |
struct val_data *valwin; |
| 1329 |
#if !defined(_NO_PYTHON) |
| 1330 |
void *python_temporary; |
| 1331 |
#endif |
| 1332 |
void *python_persistent; |
| 1333 |
int python_persistent_has_lists; |
| 1334 |
enum loadvalidation_state loadvalidation_state; |
| 1335 |
LayerInfo *layers; |
| 1336 |
int layer_cnt; |
| 1337 |
int display_layer; |
| 1338 |
struct Base *horiz_base, *vert_base; |
| 1339 |
Justify *justify; |
| 1340 |
int extrema_bound; |
| 1341 |
int width_separation; |
| 1342 |
int sfntRevision; |
| 1343 |
#define sfntRevisionUnset 0x44445555 |
| 1344 |
int woffMajor; |
| 1345 |
#define woffUnset 0x4455 |
| 1346 |
int woffMinor; |
| 1347 |
char *woffMetadata; |
| 1348 |
real ufo_ascent, ufo_descent; |
| 1349 |
|
| 1350 |
struct sfundoes *undoes; |
| 1351 |
int preferred_kerning; |
| 1352 |
} SplineFont; |
| 1353 |
|
| 1354 |
struct axismap { |
| 1355 |
int points; |
| 1356 |
real *blends; |
| 1357 |
real *designs; |
| 1358 |
real min, def, max; |
| 1359 |
struct macname *axisnames; |
| 1360 |
}; |
| 1361 |
|
| 1362 |
struct named_instance { |
| 1363 |
real *coords; |
| 1364 |
struct macname *names; |
| 1365 |
}; |
| 1366 |
|
| 1367 |
|
| 1368 |
|
| 1369 |
|
| 1370 |
|
| 1371 |
|
| 1372 |
|
| 1373 |
typedef struct mmset { |
| 1374 |
int axis_count; |
| 1375 |
char *axes[4]; |
| 1376 |
int instance_count; |
| 1377 |
SplineFont **instances; |
| 1378 |
SplineFont *normal; |
| 1379 |
real *positions; |
| 1380 |
real *defweights; |
| 1381 |
|
| 1382 |
struct axismap *axismaps; |
| 1383 |
char *cdv, *ndv; |
| 1384 |
int named_instance_count; |
| 1385 |
struct named_instance *named_instances; |
| 1386 |
unsigned int changed: 1; |
| 1387 |
unsigned int apple: 1; |
| 1388 |
} MMSet; |
| 1389 |
|
| 1390 |
|
| 1391 |
enum style_flags { sf_bold = 1, sf_italic = 2, sf_underline = 4, sf_outline = 8, |
| 1392 |
sf_shadow = 0x10, sf_condense = 0x20, sf_extend = 0x40 }; |
| 1393 |
|
| 1394 |
struct sflist { |
| 1395 |
SplineFont *sf; |
| 1396 |
int32_t *sizes; |
| 1397 |
FILE *tempttf; |
| 1398 |
int id; |
| 1399 |
int* ids; |
| 1400 |
BDFFont **bdfs; |
| 1401 |
EncMap *map; |
| 1402 |
struct sflist *next; |
| 1403 |
char **former_names; |
| 1404 |
int len; |
| 1405 |
}; |
| 1406 |
|
| 1407 |
|
| 1408 |
typedef struct anchorpos { |
| 1409 |
SplineChar *sc; |
| 1410 |
int x,y; |
| 1411 |
AnchorPoint *apm; |
| 1412 |
AnchorPoint *apb; |
| 1413 |
int base_index; |
| 1414 |
unsigned int ticked: 1; |
| 1415 |
} AnchorPos; |
| 1416 |
|
| 1417 |
enum archive_list_style { ars_tar, ars_zip }; |
| 1418 |
|
| 1419 |
struct archivers { |
| 1420 |
char *ext, *unarchive, *archive, *listargs, *extractargs, *appendargs; |
| 1421 |
enum archive_list_style ars; |
| 1422 |
}; |
| 1423 |
#define ARCHIVERS_EMPTY { NULL, NULL, NULL, NULL, NULL, NULL, 0 } |
| 1424 |
|
| 1425 |
struct fontdict; |
| 1426 |
struct pschars; |
| 1427 |
struct findsel; |
| 1428 |
struct charprocs; |
| 1429 |
struct enc; |
| 1430 |
|
| 1431 |
#define chunkalloc(size) calloc(1,size) |
| 1432 |
#define chunkfree(item,size) free(item) |
| 1433 |
|
| 1434 |
extern char *strconcat(const char *str, const char *str2); |
| 1435 |
|
| 1436 |
extern void SFApplyFeatureFile(SplineFont *sf,FILE *file,char *filename,bool ignore_invalid_replacement); |
| 1437 |
extern struct pschars *SplineFont2ChrsSubrs(SplineFont *sf, int iscjk, |
| 1438 |
struct pschars *subrs,int flags,enum fontformat format,int layer); |
| 1439 |
struct cidbytes; |
| 1440 |
struct fd2data; |
| 1441 |
struct ttfinfo; |
| 1442 |
struct alltabs; |
| 1443 |
|
| 1444 |
typedef struct growbuf { |
| 1445 |
unsigned char *pt; |
| 1446 |
unsigned char *base; |
| 1447 |
unsigned char *end; |
| 1448 |
} GrowBuf; |
| 1449 |
extern void GrowBuffer(GrowBuf *gb); |
| 1450 |
|
| 1451 |
struct glyphdata; |
| 1452 |
extern struct pschars *CID2ChrsSubrs(SplineFont *cidmaster,struct cidbytes *cidbytes,int flags,int layer); |
| 1453 |
extern const char *GetAuthor(void); |
| 1454 |
extern int WriteUFOFont(const char *fontname, SplineFont *sf, enum fontformat format, int flags, const EncMap *enc,int layer, int version); |
| 1455 |
extern int SLIContainsR2L(SplineFont *sf,int sli); |
| 1456 |
extern void SFFindNearTop(SplineFont *); |
| 1457 |
extern void SFRestoreNearTop(SplineFont *); |
| 1458 |
extern const char *_GetModifiers(const char *fontname, const char *familyname, const char *weight); |
| 1459 |
extern const char *SFGetModifiers(const SplineFont *sf); |
| 1460 |
extern const unichar_t *_uGetModifiers(const unichar_t *fontname, const unichar_t *familyname, |
| 1461 |
const unichar_t *weight); |
| 1462 |
extern void ttfdumpbitmap(SplineFont *sf,struct alltabs *at,int32_t *sizes); |
| 1463 |
extern void SplineFontSetUnChanged(SplineFont *sf); |
| 1464 |
|
| 1465 |
extern bool RealNear(real a,real b); |
| 1466 |
|
| 1467 |
|
| 1468 |
extern void UndoesFree(Undoes *undo); |
| 1469 |
extern void StemInfosFree(StemInfo *h); |
| 1470 |
extern void StemInfoFree(StemInfo *h); |
| 1471 |
extern void SCOrderAP(SplineChar *sc); |
| 1472 |
extern int AnchorClassesNextMerge(AnchorClass *ac); |
| 1473 |
extern void AnchorClassMerge(SplineFont *sf,AnchorClass *into,AnchorClass *from); |
| 1474 |
extern void SCInsertPST(SplineChar *sc,PST *new_); |
| 1475 |
extern void PSTFree(PST *lig); |
| 1476 |
extern uint16_t PSTDefaultFlags(enum possub_type type,SplineChar *sc ); |
| 1477 |
extern StemInfo *StemInfoCopy(StemInfo *h); |
| 1478 |
extern void SPChangePointType(SplinePoint *sp, int pointtype); |
| 1479 |
|
| 1480 |
struct lookup_cvt { OTLookup *from, *to; int old;}; |
| 1481 |
struct sub_cvt { struct lookup_subtable *from, *to; int old;}; |
| 1482 |
struct ac_cvt { AnchorClass *from, *to; int old;}; |
| 1483 |
|
| 1484 |
struct sfmergecontext { |
| 1485 |
SplineFont *sf_from, *sf_to; |
| 1486 |
int lcnt; |
| 1487 |
struct lookup_cvt *lks; |
| 1488 |
int scnt; |
| 1489 |
struct sub_cvt *subs; |
| 1490 |
int acnt; |
| 1491 |
struct ac_cvt *acs; |
| 1492 |
char *prefix; |
| 1493 |
int preserveCrossFontKerning; |
| 1494 |
int lmax; |
| 1495 |
}; |
| 1496 |
extern void AltUniRemove(SplineChar *sc,int uni); |
| 1497 |
extern void AltUniAdd(SplineChar *sc,int uni); |
| 1498 |
extern void AltUniAdd_DontCheckDups(SplineChar *sc,int uni); |
| 1499 |
extern SplineChar *SplineCharCreate(int layer_cnt); |
| 1500 |
extern void SCAddRef(SplineChar *sc,SplineChar *rsc,int layer, real xoff, real yoff); |
| 1501 |
extern void SplineCharFree(SplineChar *sc); |
| 1502 |
extern void ScriptLangListFree(struct scriptlanglist *sl); |
| 1503 |
|
| 1504 |
enum pconvert_flags { |
| 1505 |
|
| 1506 |
pconvert_flag_none = 0x01, |
| 1507 |
pconvert_flag_all = 0x02, |
| 1508 |
pconvert_flag_smooth = 0x04, |
| 1509 |
pconvert_flag_incompat = 0x08, |
| 1510 |
|
| 1511 |
pconvert_flag_by_geom = 0x100, |
| 1512 |
pconvert_flag_force_type = 0x200, |
| 1513 |
pconvert_flag_downgrade = 0x400, |
| 1514 |
pconvert_flag_check_compat = 0x0800, |
| 1515 |
|
| 1516 |
pconvert_flag_hvcurve = 0x4000 |
| 1517 |
}; |
| 1518 |
|
| 1519 |
#if 1 |
| 1520 |
|
| 1521 |
#define GROUP_NAME_KERNING_UFO 1 |
| 1522 |
#define GROUP_NAME_KERNING_FEATURE 2 |
| 1523 |
#define GROUP_NAME_VERTICAL 4 // Otherwise horizontal. |
| 1524 |
#define GROUP_NAME_RIGHT 8 // Otherwise left (or above). |
| 1525 |
#endif |
| 1526 |
extern void MMSetFree(MMSet *mm); |
| 1527 |
extern void SFRemoveUndoes(SplineFont *sf,uint8_t *selected,EncMap *map); |
| 1528 |
extern void SplineRefigure(Spline *spline); |
| 1529 |
extern void SPLCategorizePoints(SplinePointList *spl); |
| 1530 |
extern int _SPLCategorizePoints(SplinePointList *spl, int flags); |
| 1531 |
extern SplinePointList *SplinePointListCopy(const SplinePointList *base); |
| 1532 |
|
| 1533 |
|
| 1534 |
enum transformPointType { tpt_OnlySelected, tpt_AllPoints, tpt_OnlySelectedInterpCPs }; |
| 1535 |
|
| 1536 |
|
| 1537 |
|
| 1538 |
|
| 1539 |
enum transformPointMask { |
| 1540 |
tpmask_dontFixControlPoints = 1 << 1, |
| 1541 |
tpmask_operateOnSelectedBCP = 1 << 2, |
| 1542 |
tpmask_dontTrimValues = 1 << 3 |
| 1543 |
}; |
| 1544 |
extern SplinePointList *SplinePointListTransform(SplinePointList *base, real transform[6], enum transformPointType allpoints ); |
| 1545 |
extern void SCReinstanciateRef(SplineChar *sc,SplineChar *rsc,int layer); |
| 1546 |
extern SplineChar *MakeDupRef(SplineChar *base, int local_enc, int uni_enc); |
| 1547 |
extern void BDFClut(BDFFont *bdf, int linear_scale); |
| 1548 |
struct xlfd_components { |
| 1549 |
char foundry[80]; |
| 1550 |
char family[100]; |
| 1551 |
char weight[80]; |
| 1552 |
char slant[40]; |
| 1553 |
char setwidth[50]; |
| 1554 |
char add_style[50]; |
| 1555 |
int pixel_size; |
| 1556 |
int point_size; |
| 1557 |
int res_x; |
| 1558 |
int res_y; |
| 1559 |
char spacing[40]; |
| 1560 |
int avg_width; |
| 1561 |
char cs_reg[80]; |
| 1562 |
char cs_enc[80]; |
| 1563 |
int char_cnt; |
| 1564 |
}; |
| 1565 |
struct std_bdf_props { |
| 1566 |
const char *name; |
| 1567 |
int type; |
| 1568 |
int defaultable; |
| 1569 |
}; |
| 1570 |
#define STD_BDF_PROPS_EMPTY { NULL, 0, 0 } |
| 1571 |
|
| 1572 |
extern int CubicSolve(const Spline1D *sp,bigreal sought,extended ts[3]); |
| 1573 |
|
| 1574 |
extern extended SplineSolve(const Spline1D *sp, real tmin, real tmax, extended sought_y); |
| 1575 |
|
| 1576 |
extern extended SplineSolveFixup(const Spline1D *sp, real tmin, real tmax, extended sought_y); |
| 1577 |
|
| 1578 |
|
| 1579 |
|
| 1580 |
|
| 1581 |
#define CURVATURE_ERROR INFINITY |
| 1582 |
|
| 1583 |
extern bigreal SplineLength(Spline *spline); |
| 1584 |
extern int SplineIsLinear(Spline *spline); |
| 1585 |
extern void SFOrderBitmapList(SplineFont *sf); |
| 1586 |
|
| 1587 |
extern Spline *SplineMake(SplinePoint *from, SplinePoint *to, int order2); |
| 1588 |
extern Spline *SFSplineMake(SplineFont *sf,SplinePoint *from, SplinePoint *to); |
| 1589 |
|
| 1590 |
|
| 1591 |
extern double BlueScaleFigure(struct psdict *private_,real bluevalues[], real otherblues[]); |
| 1592 |
|
| 1593 |
typedef struct bluezone { |
| 1594 |
real base; |
| 1595 |
int cvtindex; |
| 1596 |
real family_base; |
| 1597 |
int family_cvtindex; |
| 1598 |
real overshoot; |
| 1599 |
int highest; |
| 1600 |
int lowest; |
| 1601 |
} BlueZone; |
| 1602 |
|
| 1603 |
typedef struct stdstem { |
| 1604 |
real width; |
| 1605 |
int cvtindex; |
| 1606 |
struct stdstem *snapto; |
| 1607 |
int stopat; |
| 1608 |
} StdStem; |
| 1609 |
|
| 1610 |
typedef struct globalinstrct { |
| 1611 |
SplineFont *sf; |
| 1612 |
int layer; |
| 1613 |
BlueData *bd; |
| 1614 |
double fudge; |
| 1615 |
|
| 1616 |
|
| 1617 |
|
| 1618 |
int cvt_done; |
| 1619 |
int fpgm_done; |
| 1620 |
int prep_done; |
| 1621 |
|
| 1622 |
|
| 1623 |
BlueZone blues[12]; |
| 1624 |
int bluecnt; |
| 1625 |
StdStem stdhw; |
| 1626 |
StdStem *stemsnaph; |
| 1627 |
int stemsnaphcnt; |
| 1628 |
StdStem stdvw; |
| 1629 |
StdStem *stemsnapv; |
| 1630 |
int stemsnapvcnt; |
| 1631 |
} GlobalInstrCt; |
| 1632 |
|
| 1633 |
extern void InitGlobalInstrCt( GlobalInstrCt *gic,SplineFont *sf,int layer, |
| 1634 |
BlueData *bd ); |
| 1635 |
extern void FreeGlobalInstrCt( GlobalInstrCt *gic ); |
| 1636 |
extern void NowakowskiSCAutoInstr( GlobalInstrCt *gic,SplineChar *sc ); |
| 1637 |
extern void CVT_ImportPrivate(SplineFont *sf); |
| 1638 |
|
| 1639 |
extern void SplineFontAutoHint( SplineFont *sf, int layer); |
| 1640 |
extern int SCDrawsSomething(SplineChar *sc); |
| 1641 |
extern int SCSetMetaData(SplineChar *sc,const char *name,int unienc, |
| 1642 |
const char *comment); |
| 1643 |
|
| 1644 |
extern char* DumpSplineFontMetadata( SplineFont *sf ); |
| 1645 |
|
| 1646 |
|
| 1647 |
enum ttfflags { ttf_onlystrikes=1, ttf_onlyonestrike=2, ttf_onlykerns=4, ttf_onlynames=8 }; |
| 1648 |
extern SplineFont *SFReadUFO(char *filename,int flags); |
| 1649 |
extern SplineFont *LoadSplineFont(const char *filename,enum openflags); |
| 1650 |
extern SplineFont *_ReadSplineFont(FILE *file, const char *filename, enum openflags openflags); |
| 1651 |
extern SplineFont *ReadSplineFont(const char *filename,enum openflags); |
| 1652 |
extern void ArchiveCleanup(char *archivedir); |
| 1653 |
extern char *Unarchive(char *name, char **_archivedir); |
| 1654 |
extern char *Decompress(char *name); |
| 1655 |
extern uint16_t MacStyleCode( SplineFont *sf, uint16_t *psstyle ); |
| 1656 |
extern char **NamesReadUFO(char *filename); |
| 1657 |
extern char *SFSubfontnameStart(char *fname); |
| 1658 |
|
| 1659 |
|
| 1660 |
extern const char *UnicodeRange(int unienc); |
| 1661 |
extern SplineChar *SCBuildDummy(SplineChar *dummy,SplineFont *sf,EncMap *map,int i); |
| 1662 |
extern SplineChar *SFMakeChar(SplineFont *sf,EncMap *map,int i); |
| 1663 |
extern char *AdobeLigatureFormat(char *name); |
| 1664 |
extern uint32_t LigTagFromUnicode(int uni); |
| 1665 |
extern void SCLigCaretheck(SplineChar *sc,int clean); |
| 1666 |
|
| 1667 |
extern void SCUndoSetLBearingChange(SplineChar *sc,int lb); |
| 1668 |
|
| 1669 |
|
| 1670 |
|
| 1671 |
extern SplineSet *SplinePointListInterpretGlif(SplineFont *sf,char *filename,char *memory, int memlen, int em_size, int ascent,int stroked); |
| 1672 |
#define UNDEFINED_WIDTH -999999 |
| 1673 |
struct pscontext { |
| 1674 |
int is_type2; |
| 1675 |
int painttype; |
| 1676 |
int instance_count; |
| 1677 |
real blend_values[17]; |
| 1678 |
int blend_warn; |
| 1679 |
}; |
| 1680 |
|
| 1681 |
extern int NameToEncoding(SplineFont *sf,EncMap *map,const char *uname); |
| 1682 |
extern SplineChar *SFGetOrMakeChar(SplineFont *sf, int unienc, const char *name ); |
| 1683 |
extern SplineChar *SFGetOrMakeCharFromUnicode( SplineFont *sf, EncMap *map, int ch ); |
| 1684 |
|
| 1685 |
extern int DoAutoRecovery(int); |
| 1686 |
typedef void (*DoAutoRecoveryPostRecoverFunc)(SplineFont *sf); |
| 1687 |
|
| 1688 |
extern int SFPrivateGuess(SplineFont *sf,int layer, struct psdict *private_dict, |
| 1689 |
char *name, int onlyone); |
| 1690 |
|
| 1691 |
extern void SFRemoveLayer(SplineFont *sf,int l); |
| 1692 |
extern void SFAddLayer(SplineFont *sf,char *name,int order2, int background); |
| 1693 |
extern void SFLayerSetBackground(SplineFont *sf,int layer,int is_back); |
| 1694 |
|
| 1695 |
extern void SplineSetsRound2Int(SplineSet *spl,real factor,int inspiro,int onlysel); |
| 1696 |
extern void SCRound2Int(SplineChar *sc,int layer, real factor); |
| 1697 |
|
| 1698 |
extern void SFFlatten(SplineFont **cidmaster); |
| 1699 |
|
| 1700 |
extern void SCCopyLayerToLayer(SplineChar *sc, int from, int to,int doclear); |
| 1701 |
|
| 1702 |
extern int hasFreeType(void); |
| 1703 |
extern int hasFreeTypeDebugger(void); |
| 1704 |
extern int hasFreeTypeByteCode(void); |
| 1705 |
extern int FreeTypeAtLeast(int major, int minor, int patch); |
| 1706 |
extern char *FreeTypeStringVersion(void); |
| 1707 |
extern void doneFreeType(void); |
| 1708 |
extern void *_FreeTypeFontContext(SplineFont *sf,SplineChar *sc,struct fontviewbase *fv, |
| 1709 |
int layer, enum fontformat ff,int flags,void *shared_ftc); |
| 1710 |
extern void *FreeTypeFontContext(SplineFont *sf,SplineChar *sc,struct fontviewbase *fv,int layer); |
| 1711 |
extern BDFFont *SplineFontFreeTypeRasterize(void *freetypecontext,int pixelsize,int depth); |
| 1712 |
extern BDFChar *SplineCharFreeTypeRasterize(void *freetypecontext,int gid, |
| 1713 |
int ptsize, int dpi,int depth); |
| 1714 |
extern void FreeTypeFreeContext(void *freetypecontext); |
| 1715 |
extern SplineSet *FreeType_GridFitChar(void *single_glyph_context, |
| 1716 |
int enc, real ptsizey, real ptsizex, int dpi, uint16_t *width, |
| 1717 |
SplineChar *sc, int depth, int scaled); |
| 1718 |
extern struct freetype_raster *FreeType_GetRaster(void *single_glyph_context, |
| 1719 |
int enc, real ptsizey, real ptsizex, int dpi,int depth); |
| 1720 |
extern BDFChar *SplineCharFreeTypeRasterizeNoHints(SplineChar *sc,int layer, |
| 1721 |
int ptsize, int dpi,int depth); |
| 1722 |
extern BDFFont *SplineFontFreeTypeRasterizeNoHints(SplineFont *sf,int layer, |
| 1723 |
int pixelsize,int depth); |
| 1724 |
extern void FreeType_FreeRaster(struct freetype_raster *raster); |
| 1725 |
struct TT_ExecContextRec_; |
| 1726 |
extern struct freetype_raster *DebuggerCurrentRaster(struct TT_ExecContextRec_ *exc,int depth); |
| 1727 |
|
| 1728 |
|
| 1729 |
extern AnchorPos *AnchorPositioning(SplineChar *sc,unichar_t *ustr,SplineChar **sstr ); |
| 1730 |
|
| 1731 |
extern int SF_CloseAllInstrs(SplineFont *sf); |
| 1732 |
extern int SSTtfNumberPoints(SplineSet *ss); |
| 1733 |
extern int SCNumberPoints(SplineChar *sc,int layer); |
| 1734 |
extern int SCPointsNumberedProperly(SplineChar *sc,int layer); |
| 1735 |
|
| 1736 |
extern int SFRenameTheseFeatureTags(SplineFont *sf, uint32_t tag, int sli, int flags, |
| 1737 |
uint32_t totag, int tosli, int toflags, int ismac); |
| 1738 |
extern int SFRemoveUnusedNestedFeatures(SplineFont *sf); |
| 1739 |
|
| 1740 |
|
| 1741 |
|
| 1742 |
extern struct macsetting *FindMacSetting(SplineFont *sf, int feat, int set,struct macsetting **secondary); |
| 1743 |
|
| 1744 |
|
| 1745 |
|
| 1746 |
extern int BpColinear(BasePoint *first, BasePoint *mid, BasePoint *last); |
| 1747 |
extern int BpWithin(BasePoint *first, BasePoint *mid, BasePoint *last); |
| 1748 |
|
| 1749 |
|
| 1750 |
# if HANYANG |
| 1751 |
extern void SFDDumpCompositionRules(FILE *sfd,struct compositionrules *rules); |
| 1752 |
extern struct compositionrules *SFDReadCompositionRules(FILE *sfd); |
| 1753 |
extern void SFModifyComposition(SplineFont *sf); |
| 1754 |
extern void SFBuildSyllables(SplineFont *sf); |
| 1755 |
# endif |
| 1756 |
|
| 1757 |
|
| 1758 |
|
| 1759 |
extern void SFSetModTime(SplineFont *sf); |
| 1760 |
|
| 1761 |
|
| 1762 |
|
| 1763 |
extern struct lookup_subtable *SFFindLookupSubtable(SplineFont *sf,const char *name); |
| 1764 |
extern int FeatureTagInFeatureScriptList(uint32_t tag, FeatureScriptLangList *fl); |
| 1765 |
|
| 1766 |
extern void SplinePointRound(SplinePoint *,real); |
| 1767 |
|
| 1768 |
extern KernClass *SFFindKernClass(SplineFont *sf,SplineChar *first,SplineChar *last, |
| 1769 |
int *index,int allow_zero); |
| 1770 |
extern KernClass *SFFindVKernClass(SplineFont *sf,SplineChar *first,SplineChar *last, |
| 1771 |
int *index,int allow_zero); |
| 1772 |
|
| 1773 |
extern void SCClearRounds(SplineChar *sc,int layer); |
| 1774 |
extern void MDReplace(MinimumDistance *md,SplineSet *old,SplineSet *rpl); |
| 1775 |
extern void SCSynchronizeWidth(SplineChar *sc,real newwidth, real oldwidth,struct fontviewbase *fv); |
| 1776 |
extern RefChar *HasUseMyMetrics(SplineChar *sc,int layer); |
| 1777 |
extern void SCSynchronizeLBearing(SplineChar *sc,real off,int layer); |
| 1778 |
extern void RevertedGlyphReferenceFixup(SplineChar *sc, SplineFont *sf); |
| 1779 |
|
| 1780 |
extern void SFUntickAll(SplineFont *sf); |
| 1781 |
|
| 1782 |
|
| 1783 |
extern int _ExportGlif(FILE *glif,SplineChar *sc,int layer,int version); |
| 1784 |
|
| 1785 |
extern void SCCopyWidth(SplineChar *sc,enum undotype); |
| 1786 |
extern void SCClearBackground(SplineChar *sc); |
| 1787 |
extern void BackgroundImageTransform(SplineChar *sc, ImageList *img,real transform[6]); |
| 1788 |
extern int SFIsDuplicatable(SplineFont *sf, SplineChar *sc); |
| 1789 |
|
| 1790 |
extern void SCClearLayer(SplineChar *sc,int layer); |
| 1791 |
extern void SCClearContents(SplineChar *sc,int layer); |
| 1792 |
extern void SCClearAll(SplineChar *sc,int layer); |
| 1793 |
|
| 1794 |
#if !defined(_NO_PYTHON) |
| 1795 |
extern void FontForge_InitializeEmbeddedPython(void); |
| 1796 |
extern void FontForge_FinalizeEmbeddedPython(void); |
| 1797 |
extern void PyFF_ErrorString(const char *msg,const char *str); |
| 1798 |
extern void PyFF_ErrorF3(const char *frmt, const char *str, int size, int depth); |
| 1799 |
extern void PyFF_Stdin(int no_inits, int no_plugins); |
| 1800 |
extern void PyFF_Main(int argc,char **argv,int start, int no_init, int no_plugins); |
| 1801 |
extern void PyFF_ScriptFile(struct fontviewbase *fv,SplineChar *sc,char *filename); |
| 1802 |
extern void PyFF_ScriptString(struct fontviewbase *fv,SplineChar *sc,int layer,char *str); |
| 1803 |
extern void PyFF_FreeFV(struct fontviewbase *fv); |
| 1804 |
extern void PyFF_FreeSC(SplineChar *sc); |
| 1805 |
void PyFF_FreeSCLayer(SplineChar *sc, int layer); |
| 1806 |
extern void PyFF_FreeSF(SplineFont *sf); |
| 1807 |
extern void PyFF_FreePythonPersistent(void *python_persistent); |
| 1808 |
extern void PyFF_ProcessInitFiles(int no_inits, int no_plugins); |
| 1809 |
extern char *PyFF_PickleMeToString(void *pydata); |
| 1810 |
extern void *PyFF_UnPickleMeToObjects(char *str); |
| 1811 |
struct _object; |
| 1812 |
extern void PyFF_CallDictFunc(struct _object *dict,const char *key,const char *argtypes, ... ); |
| 1813 |
#endif |
| 1814 |
|
| 1815 |
|
| 1816 |
|
| 1817 |
|
| 1818 |
extern struct math_constants_descriptor { |
| 1819 |
char *ui_name; |
| 1820 |
char *script_name; |
| 1821 |
int offset; |
| 1822 |
int devtab_offset; |
| 1823 |
char *message; |
| 1824 |
int new_page; |
| 1825 |
} math_constants_descriptor[]; |
| 1826 |
|
| 1827 |
#define MATH_CONSTANTS_DESCRIPTOR_EMPTY { NULL, NULL, 0, 0, NULL, 0 } |
| 1828 |
|
| 1829 |
extern const char *knownweights[], *realweights[], **noticeweights[]; |
| 1830 |
|
| 1831 |
extern int BPTooFar(BasePoint *bp1, BasePoint *bp2); |
| 1832 |
extern StemInfo *SCHintOverlapInMask(SplineChar *sc,HintMask *hm); |
| 1833 |
extern char *VSErrorsFromMask(int mask,int private_mask); |
| 1834 |
extern int SCValidate(SplineChar *sc, int layer, int force); |
| 1835 |
extern AnchorClass *SCValidateAnchors(SplineChar *sc); |
| 1836 |
extern void SCTickValidationState(SplineChar *sc,int layer); |
| 1837 |
extern int ValidatePrivate(SplineFont *sf); |
| 1838 |
extern int SFValidate(SplineFont *sf, int layer, int force); |
| 1839 |
extern enum validation_state VSMaskFromFormat(SplineFont *sf, int layer, enum fontformat format); |
| 1840 |
|
| 1841 |
extern char *RandomParaFromScript(uint32_t script, uint32_t *lang, SplineFont *sf); |
| 1842 |
|
| 1843 |
extern void PatternSCBounds(SplineChar *sc,DBounds *b); |
| 1844 |
|
| 1845 |
extern char *SFDefaultImage(SplineFont *sf,char *filename); |
| 1846 |
extern void SCClearInstrsOrMark(SplineChar *sc, int layer, int complain); |
| 1847 |
extern void instrcheck(SplineChar *sc,int layer); |
| 1848 |
extern void TTFPointMatches(SplineChar *sc,int layer,int top); |
| 1849 |
|
| 1850 |
extern bigreal SFCapHeight(SplineFont *sf, int layer, int return_error); |
| 1851 |
extern bigreal SFXHeight(SplineFont *sf, int layer, int return_error); |
| 1852 |
extern bigreal SFAscender(SplineFont *sf, int layer, int return_error); |
| 1853 |
extern bigreal SFDescender(SplineFont *sf, int layer, int return_error); |
| 1854 |
|
| 1855 |
extern void SCRemoveKern(SplineChar* sc); |
| 1856 |
extern void SCRemoveVKern(SplineChar* sc); |
| 1857 |
|
| 1858 |
|
| 1859 |
|
| 1860 |
|
| 1861 |
|
| 1862 |
extern int SplinePointListContains( SplinePointList* container, SplinePointList* sought ); |
| 1863 |
|
| 1864 |
|
| 1865 |
|
| 1866 |
|
| 1867 |
|
| 1868 |
extern int SplinePointListContainsPoint( SplinePointList* container, SplinePoint* sp ); |
| 1869 |
|
| 1870 |
|
| 1871 |
|
| 1872 |
|
| 1873 |
typedef void (*SPLFirstVisitSplinesVisitor)( SplinePoint* splfirst, Spline* s, void* udata ); |
| 1874 |
|
| 1875 |
|
| 1876 |
|
| 1877 |
|
| 1878 |
|
| 1879 |
|
| 1880 |
extern void SPLFirstVisitorDebug(SplinePoint* splfirst, Spline* spline, void* udata ); |
| 1881 |
|
| 1882 |
|
| 1883 |
|
| 1884 |
|
| 1885 |
|
| 1886 |
|
| 1887 |
|
| 1888 |
|
| 1889 |
extern void SPLFirstVisitorDebugSelectionState(SplinePoint* splfirst, Spline* spline, void* udata ); |
| 1890 |
|
| 1891 |
|
| 1892 |
|
| 1893 |
|
| 1894 |
|
| 1895 |
|
| 1896 |
|
| 1897 |
|
| 1898 |
|
| 1899 |
|
| 1900 |
|
| 1901 |
|
| 1902 |
|
| 1903 |
|
| 1904 |
|
| 1905 |
|
| 1906 |
|
| 1907 |
|
| 1908 |
|
| 1909 |
|
| 1910 |
|
| 1911 |
|
| 1912 |
|
| 1913 |
|
| 1914 |
|
| 1915 |
|
| 1916 |
|
| 1917 |
|
| 1918 |
|
| 1919 |
|
| 1920 |
|
| 1921 |
extern void SPLFirstVisitSplines( SplinePoint* splfirst, SPLFirstVisitSplinesVisitor f, void* udata ); |
| 1922 |
|
| 1923 |
|
| 1924 |
|
| 1925 |
|
| 1926 |
typedef void (*SPLFirstVisitPointsVisitor)( SplinePoint* splfirst, Spline* s, SplinePoint* sp, void* udata ); |
| 1927 |
|
| 1928 |
|
| 1929 |
|
| 1930 |
|
| 1931 |
extern void SPLFirstVisitPoints( SplinePoint* splfirst, SPLFirstVisitPointsVisitor f, void* udata ); |
| 1932 |
|
| 1933 |
|
| 1934 |
|
| 1935 |
|
| 1936 |
|
| 1937 |
|
| 1938 |
|
| 1939 |
extern SplinePoint* SplinePointListContainsPointAtX( SplinePointList* container, real x ); |
| 1940 |
extern SplinePoint* SplinePointListContainsPointAtY( SplinePointList* container, real y ); |
| 1941 |
extern SplinePoint* SplinePointListContainsPointAtXY( SplinePointList* container, real x, real y ); |
| 1942 |
|
| 1943 |
|
| 1944 |
|
| 1945 |
|
| 1946 |
|
| 1947 |
|
| 1948 |
|
| 1949 |
|
| 1950 |
extern bool isSplinePointPartOfGuide( SplineFont *sf, SplinePoint *sp ); |
| 1951 |
|
| 1952 |
|
| 1953 |
extern void debug_printHint( StemInfo *h, char* msg ); |
| 1954 |
|
| 1955 |
#if defined(_WIN32) || defined(__HAIKU__) |
| 1956 |
#define BAD_LOCALE_HACK |
| 1957 |
typedef char* locale_t; |
| 1958 |
#define LC_GLOBAL_LOCALE ((locale_t)-1) |
| 1959 |
#define LC_ALL_MASK LC_ALL |
| 1960 |
#define LC_COLLATE_MASK LC_COLLATE |
| 1961 |
#define LC_CTYPE_MASK LC_CTYPE |
| 1962 |
#define LC_MONETARY_MASK LC_MONETARY |
| 1963 |
#define LC_NUMERIC_MASK LC_NUMERIC |
| 1964 |
#define LC_TIME_MASK LC_TIME |
| 1965 |
#endif |
| 1966 |
|
| 1967 |
static inline void switch_to_c_locale(locale_t * tmplocale_p, locale_t * oldlocale_p) { |
| 1968 |
#ifndef BAD_LOCALE_HACK |
| 1969 |
*tmplocale_p = newlocale(LC_NUMERIC_MASK, "C", NULL); |
| 1970 |
if (*tmplocale_p == NULL) fprintf(stderr, "Failed to create temporary locale.\n"); |
| 1971 |
else if ((*oldlocale_p = uselocale(*tmplocale_p)) == NULL) { |
| 1972 |
fprintf(stderr, "Failed to change locale.\n"); |
| 1973 |
freelocale(*tmplocale_p); *tmplocale_p = NULL; |
| 1974 |
} |
| 1975 |
#else |
| 1976 |
|
| 1977 |
*oldlocale_p = (locale_t)copy(setlocale(LC_NUMERIC_MASK, "C")); |
| 1978 |
if (*oldlocale_p == NULL) fprintf(stderr, "Failed to change locale.\n"); |
| 1979 |
#endif |
| 1980 |
} |
| 1981 |
|
| 1982 |
static inline void switch_to_old_locale(locale_t * tmplocale_p, locale_t * oldlocale_p) { |
| 1983 |
#ifndef BAD_LOCALE_HACK |
| 1984 |
if (*oldlocale_p != NULL) { uselocale(*oldlocale_p); } else { uselocale(LC_GLOBAL_LOCALE); } |
| 1985 |
*oldlocale_p = NULL; |
| 1986 |
if (*tmplocale_p != NULL) { freelocale(*tmplocale_p); *tmplocale_p = NULL; } |
| 1987 |
#else |
| 1988 |
if (*oldlocale_p != NULL) { |
| 1989 |
setlocale(LC_NUMERIC_MASK, (char*)(*oldlocale_p)); |
| 1990 |
free((char*)(*oldlocale_p)); |
| 1991 |
*oldlocale_p = NULL; |
| 1992 |
} |
| 1993 |
#endif |
| 1994 |
} |
| 1995 |
|
| 1996 |
static inline locale_t newlocale_hack(int category_mask, const char *locale, locale_t base) { |
| 1997 |
|
| 1998 |
#ifndef BAD_LOCALE_HACK |
| 1999 |
return newlocale(category_mask, locale, base); |
| 2000 |
#else |
| 2001 |
return (locale_t)copy(locale); |
| 2002 |
#endif |
| 2003 |
} |
| 2004 |
|
| 2005 |
static inline locale_t uselocale_hack(locale_t dataset) { |
| 2006 |
#ifndef BAD_LOCALE_HACK |
| 2007 |
return uselocale(dataset); |
| 2008 |
#else |
| 2009 |
return (locale_t)copy(setlocale(LC_ALL_MASK, (char*)dataset)); |
| 2010 |
#endif |
| 2011 |
} |
| 2012 |
|
| 2013 |
static inline void freelocale_hack(locale_t dataset) { |
| 2014 |
#ifndef BAD_LOCALE_HACK |
| 2015 |
freelocale(dataset); |
| 2016 |
#else |
| 2017 |
if (dataset != NULL) { free(dataset); } |
| 2018 |
#endif |
| 2019 |
} |
| 2020 |
|
| 2021 |
#if 0 |
| 2022 |
#define DECLARE_TEMP_LOCALE() char oldloc[25]; |
| 2023 |
#define SWITCH_TO_C_LOCALE() strncpy( oldloc,setlocale(LC_NUMERIC,NULL),24 ); oldloc[24]='\0'; setlocale(LC_NUMERIC,"C"); |
| 2024 |
#define SWITCH_TO_OLD_LOCALE() setlocale(LC_NUMERIC,oldloc); |
| 2025 |
#else |
| 2026 |
#define DECLARE_TEMP_LOCALE() locale_t tmplocale; locale_t oldlocale; // Declare temporary locale storage. |
| 2027 |
#define SWITCH_TO_C_LOCALE() switch_to_c_locale(&tmplocale, &oldlocale); // Switch to the C locale temporarily and cache the old locale. |
| 2028 |
#define SWITCH_TO_OLD_LOCALE() switch_to_old_locale(&tmplocale, &oldlocale); // Switch to the cached locale. |
| 2029 |
#endif |
| 2030 |
|
| 2031 |
#ifdef __cplusplus |
| 2032 |
} |
| 2033 |
#endif |
| 2034 |
|
| 2035 |
#endif |