28#define MS_HEAD_TAG DWRITE_MAKE_OPENTYPE_TAG('h','e','a','d')
29#define MS_HHEA_TAG DWRITE_MAKE_OPENTYPE_TAG('h','h','e','a')
30#define MS_OTTO_TAG DWRITE_MAKE_OPENTYPE_TAG('O','T','T','O')
31#define MS_OS2_TAG DWRITE_MAKE_OPENTYPE_TAG('O','S','/','2')
32#define MS_POST_TAG DWRITE_MAKE_OPENTYPE_TAG('p','o','s','t')
33#define MS_TTCF_TAG DWRITE_MAKE_OPENTYPE_TAG('t','t','c','f')
34#define MS_GDEF_TAG DWRITE_MAKE_OPENTYPE_TAG('G','D','E','F')
35#define MS_NAME_TAG DWRITE_MAKE_OPENTYPE_TAG('n','a','m','e')
36#define MS_GLYF_TAG DWRITE_MAKE_OPENTYPE_TAG('g','l','y','f')
37#define MS_CFF__TAG DWRITE_MAKE_OPENTYPE_TAG('C','F','F',' ')
38#define MS_CFF2_TAG DWRITE_MAKE_OPENTYPE_TAG('C','F','F','2')
39#define MS_CPAL_TAG DWRITE_MAKE_OPENTYPE_TAG('C','P','A','L')
40#define MS_COLR_TAG DWRITE_MAKE_OPENTYPE_TAG('C','O','L','R')
41#define MS_SVG__TAG DWRITE_MAKE_OPENTYPE_TAG('S','V','G',' ')
42#define MS_SBIX_TAG DWRITE_MAKE_OPENTYPE_TAG('s','b','i','x')
43#define MS_MAXP_TAG DWRITE_MAKE_OPENTYPE_TAG('m','a','x','p')
44#define MS_CBLC_TAG DWRITE_MAKE_OPENTYPE_TAG('C','B','L','C')
45#define MS_CMAP_TAG DWRITE_MAKE_OPENTYPE_TAG('c','m','a','p')
46#define MS_META_TAG DWRITE_MAKE_OPENTYPE_TAG('m','e','t','a')
47#define MS_KERN_TAG DWRITE_MAKE_OPENTYPE_TAG('k','e','r','n')
48#define MS_FVAR_TAG DWRITE_MAKE_OPENTYPE_TAG('f','v','a','r')
51#define MS_PNG__TAG DWRITE_MAKE_OPENTYPE_TAG('p','n','g',' ')
52#define MS_JPG__TAG DWRITE_MAKE_OPENTYPE_TAG('j','p','g',' ')
53#define MS_TIFF_TAG DWRITE_MAKE_OPENTYPE_TAG('t','i','f','f')
55#define MS_WOFF_TAG DWRITE_MAKE_OPENTYPE_TAG('w','O','F','F')
56#define MS_WOF2_TAG DWRITE_MAKE_OPENTYPE_TAG('w','O','F','2')
59#define MS_DLNG_TAG DWRITE_MAKE_OPENTYPE_TAG('d','l','n','g')
60#define MS_SLNG_TAG DWRITE_MAKE_OPENTYPE_TAG('s','l','n','g')
63#define GET_BE_WORD(x) (x)
64#define GET_BE_DWORD(x) (x)
65#define GET_BE_FIXED(x) (x / 65536.0f)
67#define GET_BE_WORD(x) RtlUshortByteSwap(x)
68#define GET_BE_DWORD(x) RtlUlongByteSwap(x)
69#define GET_BE_FIXED(x) ((int32_t)GET_BE_DWORD(x) / 65536.0f)
72#define GLYPH_CONTEXT_MAX_LENGTH 64
73#define SHAPE_MAX_NESTING_LEVEL 6
668#define GLYPH_NOT_COVERED (~0u)
1418#include "pshpack1.h"
1428 struct type1_header {
1432 const struct type1_header *
header;
1441 if (
header->tag == 0x8001 &&
1453 const struct pfm_header *pfm_header;
1456 BOOL header_checked;
1458 hr = IDWriteFontFileStream_GetFileSize(
stream, &filesize);
1462 hr = IDWriteFontFileStream_ReadFileFragment(
stream, (
const void**)&pfm_header, 0,
sizeof(*pfm_header), &
context);
1466 offset = pfm_header->dfDevice;
1467 header_checked = pfm_header->dfVersion == 0x100 && pfm_header->dfSize == filesize;
1471 if (header_checked) {
1472 static const char postscript[] =
"PostScript";
1475 hr = IDWriteFontFileStream_ReadFileFragment(
stream, (
const void**)&devtype_name,
offset,
sizeof(postscript), &
context);
1479 if (!
memcmp(devtype_name, postscript,
sizeof(postscript))) {
1531 void *table_directory_context, *sfnt_context;
1538 if (found) *found =
FALSE;
1542 *table_context =
NULL;
1549 hr = IDWriteFontFileStream_ReadFileFragment(stream_desc->
stream, (
const void **)&
ttc_header, 0,
1558 hr = IDWriteFontFileStream_ReadFileFragment(stream_desc->
stream, (
const void **)&table_dir, table_offset,
1559 sizeof(*table_dir), &sfnt_context);
1561 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, ttc_context);
1565 hr = IDWriteFontFileStream_ReadFileFragment(stream_desc->
stream, (
const void **)&table_dir, 0,
1566 sizeof(*table_dir), &sfnt_context);
1572 table_offset +=
sizeof(*table_dir);
1574 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, sfnt_context);
1576 hr = IDWriteFontFileStream_ReadFileFragment(stream_desc->
stream, (
const void **)&table_record, table_offset,
1577 table_count *
sizeof(*table_record), &table_directory_context);
1582 for (
i = 0;
i < table_count; ++
i)
1584 if (table_record->
tag ==
tag)
1600 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, table_directory_context);
1619 return (
ch < 0xff) ? glyphs[
ch] : 0;
1659 unsigned int glyph,
idx, range_offset;
1663 end_found =
bsearch(&
key,
cmap->u.format4.ends,
cmap->u.format4.seg_count,
sizeof(*
cmap->u.format4.ends),
1668 idx = end_found -
cmap->u.format4.ends;
1687 return glyph & 0xffff;
1703 return cmap->u.format4.seg_count;
1709 if (ch < cmap->
u.format6_10.first ||
ch >
cmap->u.format6_10.last)
return 0;
1710 return glyphs[
ch -
cmap->u.format6_10.first];
1718 ranges->
first =
cmap->u.format6_10.first;
1719 ranges->
last =
cmap->u.format6_10.last;
1727 const unsigned int *
ch =
a;
1742 const UINT32 *group_found;
1755 unsigned int i, group_count =
cmap->u.format12_13.group_count;
1772 const UINT32 *group_found;
1796 if (!
cmap->get_glyph)
return 0;
1798 if (!glyph &&
cmap->symbol &&
ch <= 0xff)
1821 static const UINT16 encodings[][2] =
1840 if (cmap->
data)
return;
1845 WARN(
"Failed to get file stream, hr %#lx.\n",
hr);
1863 pair = encodings[
i];
1870 WARN(
"No suitable cmap table were found.\n");
1918 WARN(
"Unhandled subtable format %u.\n",
format);
1937 IDWriteFontFileStream_Release(cmap->
stream);
1944 unsigned int *
count)
1960 *ascent = *descent = 0;
1970 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, os2.
context);
2002 memset(caret, 0,
sizeof(*caret));
2022 metrics->lineGap = linegap > 0 ? linegap : 0;
2048 metrics->descent = descent < 0 ? -descent : 0;
2069 if (
metrics->underlineThickness == 0)
2071 if (
metrics->strikethroughThickness == 0)
2081 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, os2.
context);
2083 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream,
head.context);
2085 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, post.
context);
2087 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, hhea.
context);
2093 BOOL is_symbol, is_monospaced;
2115 props->stretch = usWidthClass;
2117 if (usWeightClass >= 1 && usWeightClass <= 9)
2118 usWeightClass *= 100;
2122 else if (usWeightClass > 0)
2123 props->weight = usWeightClass;
2160 props->lf.lfItalic = 1;
2179 for (
i = 0; !is_symbol &&
i < num_tables; ++
i)
2192 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, cmap.
context);
2208 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, post.
context);
2221 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, cpal.
context);
2224 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, colr.
context);
2230 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, os2.
context);
2232 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream,
head.context);
2276 FIXME(
"encoding %u not handled, platform %d.\n", encoding,
platform);
2303 FIXME(
"encoding %u not handled, platform %d.\n", encoding,
platform);
2323 WARN(
"invalid mac lang id %d\n", lang_id);
2325 FIXME(
"failed to map mac lang id %d to locale name\n", lang_id);
2367 unsigned int i, string_offset;
2384 if (lang_id < 0x8000)
2398 name_string[
len] = 0;
2415 FIXME(
"handle NAME format 1\n");
2423 int i,
count, candidate_mac, candidate_mac_en, candidate_unicode;
2448 has_english =
FALSE;
2449 candidate_unicode = candidate_mac = candidate_mac_en = -1;
2466 if (candidate_unicode == -1)
2467 candidate_unicode =
i;
2470 if (candidate_mac == -1)
2473 candidate_mac_en =
i;
2488 if (!has_english && candidate_mac_en != -1)
2493 IDWriteLocalizedStrings_Release(*
strings);
2538 WARN(
"Unexpected id %d.\n",
id);
2552 WARN(
"Unexpected meta table version %ld.\n",
version);
2597 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, meta.
context);
2600 if (IDWriteLocalizedStrings_GetCount(
strings))
2603 IDWriteLocalizedStrings_Release(
strings);
2623 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream,
name.context);
2632 static const unsigned int wws_candidates[] =
2639 static const unsigned int typographic_candidates[] =
2647 const unsigned int *
id;
2658 id = typographic_candidates;
2669 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, os2.
context);
2671 id = wws_candidates;
2672 if (!try_wws_name)
id++;
2683 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream,
name.context);
2727 IDWriteLocalizedStrings_FindLocaleName(lfnames,
L"en-us", &
index, &
exists);
2733 IDWriteLocalizedStrings_GetStringLength(lfnames,
index, &
length);
2744 IDWriteLocalizedStrings_Release(lfnames);
2748 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, os2.
context);
2750 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream,
name.context);
2758 unsigned int table_offset, langsys_offset;
2763 if (!
table->table.
data || script_index == ~0
u)
2772 if (language_index == ~0
u)
2778 langsys_offset +=
table->script_list + table_offset;
2790 unsigned int language_index,
struct tag_array *
t)
2792 unsigned int i, total_feature_count, script_feature_count;
2799 if (!total_feature_count)
2807 for (
i = 0;
i < script_feature_count; ++
i)
2824 BYTE dev_x_ratio = 1, dev_y_ratio = 1;
2825 unsigned int group_offset = 0;
2829 for (
i = 0;
i < num_ratios;
i++) {
2843 return group_offset;
2848 unsigned int num_ratios, num_recs, group_offset,
i;
2859 num_recs *
sizeof(*
group));
2877 for (
i = 0;
i < num_recs; ++
i)
2880 if (ppem > emsize) {
2881 FIXME(
"interpolate %d\n", emsize);
2885 if (ppem == emsize) {
2897 unsigned int version, num_ranges,
i;
2913 ERR(
"Unsupported gasp table format version %u.\n",
version);
2938 unsigned int first_entry_index,
unsigned int entry_count,
DWRITE_COLOR_F *entries)
2940 unsigned int num_palettes, num_palette_entries,
i;
2949 } *colors = (
void *)entries;
2965 if (first_entry_index + entry_count > num_palette_entries)
2975 for (
i = 0;
i < entry_count; ++
i)
2977 colors[
i].r = records[first_entry_index +
i].
red / 255.0f;
2978 colors[
i].g = records[first_entry_index +
i].
green / 255.0f;
2979 colors[
i].b = records[first_entry_index +
i].
blue / 255.0f;
2980 colors[
i].a = records[first_entry_index +
i].
alpha / 255.0f;
3002 unsigned int num_baseglyph_records, offset_baseglyph_records;
3009 ret->palette_index = 0xffff;
3031 (
ret->first_layer +
ret->layer) *
sizeof(*
layer))))
3077 IDWriteFontFace5_ReleaseFontTable(fontface,
context);
3084 unsigned int num_strikes, num_glyphs,
i,
j,
ret = 0;
3096 IDWriteFontFace5_ReleaseFontTable(fontface,
table.context);
3109 for (
i = 0;
i < num_strikes; ++
i)
3118 for (
j = 0;
j < num_glyphs;
j++)
3124 if (
offset == next_offset)
3149 IDWriteFontFace5_ReleaseFontTable(fontface,
table.context);
3160 unsigned int num_sizes,
i,
ret = 0;
3176 if ((
ret & format_mask) == format_mask)
3186 IDWriteFontFace5_ReleaseFontTable(fontface, cblc.
context);
3221 if (data_size <
sizeof(
DWORD))
3222 return DWRITE_CONTAINER_TYPE_UNKNOWN;
3234 return DWRITE_CONTAINER_TYPE_UNKNOWN;
3241 &
cache->gsub.table.context);
3243 if (
cache->gsub.table.data)
3251 &
cache->gpos.table.context);
3253 if (
cache->gpos.table.data)
3264 &
cache->gdef.table.context);
3266 if (
cache->gdef.table.data)
3280 unsigned int *script_index)
3286 *script_index = ~0
u;
3292 for (
i = 0;
i < script_count;
i++)
3310 unsigned int script_index,
unsigned int *language_index)
3313 UINT16 table_offset, lang_count;
3316 *language_index = ~0
u;
3325 for (
i = 0;
i < lang_count;
i++)
3330 if (
tag == language)
3332 *language_index =
i;
3405 unsigned int glyph_class = 0,
props;
3407 if (
cache->gdef.classdef)
3413 switch (glyph_class)
3423 if (
cache->gdef.markattachclassdef)
3427 props |= glyph_class << 8;
3518 WARN(
"Unknown coverage format %u.\n",
format);
3525#if defined(__MINGW32__)
3526 return __builtin_popcount(
x);
3528 x -=
x >> 1 & 0x55555555;
3529 x = (
x & 0x33333333) + (
x >> 2 & 0x33333333);
3530 return ((
x + (
x >> 4)) & 0x0f0f0f0f) * 0x01010101 >> 24;
3542 unsigned int start_size, end_size,
format, value_word;
3553 if (ppem < start_size || ppem > end_size)
3558 if (format < 1 || format > 3)
3561 index = ppem - start_size;
3568 if ((
unsigned int)
value >= ((
mask + 1) >> 1))
3648 const struct lookup *
lookup,
unsigned int subtable,
unsigned int *lookup_type)
3660 return subtable_offset;
3670 WARN(
"Unexpected extension table format %#x.\n", format1->
format);
3751 return glyph == glyph_data;
3758 return glyph_class == glyph_data;
3789 WARN(
"Unexpected MarkGlyphSets format %#x.\n",
format);
3796 unsigned int glyph_props =
context->glyph_infos[
idx].props;
3876 while (iter->
pos > iter->
len - 1)
3901 const struct lookup *
lookup,
unsigned int subtable_offset)
3904 UINT16 format, value_format, value_len, coverage, glyph;
3906 unsigned int coverage_index;
3943 WARN(
"Unknown single adjustment format %u.\n",
format);
3960 const struct lookup *
lookup,
unsigned int subtable_offset)
3963 unsigned int first_glyph, second_glyph;
3967 WORD value_format1, value_format2, value_len1, value_len2;
3968 unsigned int coverage_index;
3976 first_glyph = iter_pair.
pos;
3982 second_glyph = iter_pair.
pos;
4000 unsigned int pairvalue_len, pairset_offset;
4002 const WORD *pairvalue;
4005 if (!pairset_count || coverage_index >= pairset_count)
4024 value_len2 *
sizeof(
WORD);
4049 unsigned int class1, class2;
4069 context->u.pos.glyphs[first_glyph]);
4071 context->u.pos.glyphs[second_glyph]);
4087 WARN(
"Unknown pair adjustment format %u.\n",
format);
4095 unsigned int glyph_index,
float *
x,
float *
y)
4121 FIXME(
"Use outline anchor point for glyph %u.\n",
context->u.pos.glyphs[glyph_index]);
4152 context->glyph_infos[
idx].props &= ~GLYPH_PROP_ATTACH_TYPE_MASK;
4158 return (
context->glyph_infos[
idx].props >> 16) & 0xff;
4162 unsigned int new_parent)
4171 context->glyph_infos[
i].attach_chain = 0;
4174 if (
j == new_parent)
4187 const struct lookup *
lookup,
unsigned int subtable_offset)
4199 unsigned int glyph_index, entry_count, entry_anchor, exit_anchor,
child,
parent;
4200 float entry_x, entry_y, exit_x, exit_y, delta;
4204 if (!coverage_offset)
4237 delta = exit_x +
context->offsets[prev_iter.
pos].advanceOffset;
4240 context->offsets[prev_iter.
pos].advanceOffset -= delta;
4252 y_offset = entry_y - exit_y;
4258 y_offset = exit_y - entry_y;
4269 context->has_gpos_attachment = 1;
4278 WARN(
"Unknown cursive attachment format %u.\n",
format);
4286 unsigned int mark_array,
unsigned int mark_index,
unsigned int glyph_index,
unsigned int anchors_matrix,
4287 unsigned int class_count,
unsigned int glyph_pos)
4290 unsigned int mark_class, mark_count, glyph_count;
4292 float mark_x, mark_y, base_x, base_y;
4296 if (mark_index >= mark_count)
return FALSE;
4308 if (glyph_index >= glyph_count)
return FALSE;
4311 anchors =
table_read_ensure(
table, subtable_offset + anchors_matrix + 2, glyph_count * class_count *
sizeof(*anchors));
4312 if (!anchors)
return FALSE;
4315 context->cur, &mark_x, &mark_y);
4326 context->has_gpos_attachment = 1;
4334 const struct lookup *
lookup,
unsigned int subtable_offset)
4344 unsigned int base_index, mark_index;
4367 WARN(
"Unknown mark-to-base format %u.\n",
format);
4387 const struct lookup *
lookup,
unsigned int subtable_offset)
4396 unsigned int mark_index, lig_index, comp_index, class_count, comp_count;
4399 unsigned int lig_array;
4423 if (!comp_count)
return FALSE;
4425 comp_index =
context->u.buffer.glyph_props[lig_iter.
pos].components -
4427 if (comp_index >= comp_count)
return FALSE;
4430 comp_index, lig_array + lig_attach, class_count, lig_iter.
pos);
4433 WARN(
"Unknown mark-to-ligature format %u.\n",
format);
4439 const struct lookup *
lookup,
unsigned int subtable_offset)
4449 unsigned int mark1_index, mark2_index;
4462 if (!
context->u.pos.glyph_props[mark_iter.
pos].isDiacritic)
4474 WARN(
"Unknown mark-to-mark format %u.\n",
format);
4482 unsigned int subtable_offset);
4484 unsigned int subtable_offset);
4488 unsigned int i, lookup_type;
4495 switch (lookup_type)
4522 WARN(
"Recursive extension lookup.\n");
4525 WARN(
"Unknown lookup type %u.\n", lookup_type);
4577 flags |= mark_filtering_set << 16;
4598 UINT16 feature_offset, lookup_count;
4618 for (
i = 0;
i < lookup_count; ++
i)
4623 if (lookup_index >= total_lookup_count)
4635 unsigned int last_num_lookups = 0, stage, script_feature_count = 0;
4636 UINT16 total_feature_count, total_lookup_count;
4641 unsigned int i,
j, next_bit;
4642 unsigned int global_bit_shift = 1;
4643 unsigned int global_bit_mask = 2;
4649 if (script_index != ~0
u)
4651 unsigned int table_offset, langsys_offset;
4659 if (language_index == ~0
u)
4665 langsys_offset +=
table->script_list + table_offset;
4668 if (script_feature_count)
4672 script_feature_count = 0;
4676 if (!total_feature_count)
4680 if (!total_lookup_count)
4690 if (required_feature.
index < total_feature_count)
4692 required_feature.
mask = global_bit_mask;
4694 context->global_mask = global_bit_mask;
4695 next_bit = global_bit_shift + 1;
4696 for (
i = 0;
i < features->
count; ++
i)
4719 for (
j = 0;
j < script_feature_count; ++
j)
4722 if (feature_index >= total_feature_count)
4724 if ((found = feature_list->
features[feature_index].tag ==
feature->tag))
4726 feature->index = feature_index;
4733 for (
j = 0;
j < total_feature_count; ++
j)
4748 feature->shift = global_bit_shift;
4749 feature->mask = global_bit_mask;
4754 feature->mask = (1 << (next_bit + bits_needed)) - (1 << next_bit);
4755 next_bit += bits_needed;
4764 if (required_feature.
index != 0xffff && required_feature.
stage ==
stage)
4767 for (
i = 0;
i < features->
count; ++
i)
4774 if (last_num_lookups < lookups->
count)
4779 j = last_num_lookups;
4797 features->
stages[
stage].last_lookup = last_num_lookups;
4803 unsigned int tag = *(
unsigned int *)
a;
4829 unsigned int end_char,
unsigned int *start_glyph,
unsigned int *end_glyph)
4831 *start_glyph =
context->u.buffer.clustermap[start_char];
4832 if (end_char >=
context->length - 1)
4833 *end_glyph =
context->glyph_count - 1;
4835 *end_glyph =
context->u.buffer.clustermap[end_char] - 1;
4849 for (
r = 0, start_char = 0;
r <
context->user_features.range_count; ++
r)
4851 unsigned int start_glyph, end_glyph;
4853 if (start_char >=
context->length)
4856 if (!
context->user_features.range_lengths[
r])
4860 &start_glyph, &end_glyph);
4861 start_char +=
context->user_features.range_lengths[
r];
4863 if (start_glyph > end_glyph || end_glyph >=
context->glyph_count)
4874 for (
g = start_glyph;
g <= end_glyph; ++
g)
4896 context->glyph_infos[
i].attach_chain = 0;
4917 for (
k =
j + 1;
k <
i + 1; ++
k)
4924 for (
k =
j;
k <
i;
k++)
4973 if (
context->has_gpos_attachment)
4983 if (glyph != orig_glyph)
4991 unsigned int subtable_offset)
4995 unsigned int coverage_index;
5016 coverage_index, &glyph))
5023 WARN(
"Unknown single substitution format %u.\n",
format);
5037 unsigned int new_capacity;
5044 new_capacity =
context->u.subst.capacity * 2;
5046 if ((glyphs =
realloc(
context->u.subst.glyphs, new_capacity *
sizeof(*glyphs))))
5047 context->u.subst.glyphs = glyphs;
5048 if ((glyph_props =
realloc(
context->u.subst.glyph_props, new_capacity *
sizeof(*glyph_props))))
5049 context->u.subst.glyph_props = glyph_props;
5050 if ((glyph_infos =
realloc(
context->glyph_infos, new_capacity *
sizeof(*glyph_infos))))
5051 context->glyph_infos = glyph_infos;
5053 if ((
ret = (glyphs && glyph_props && glyph_infos)))
5054 context->u.subst.capacity = new_capacity;
5060 unsigned int subtable_offset)
5064 unsigned int i,
idx, coverage_index;
5082 coverage_index, &seq_offset))
5089 if (glyph_count == 1)
5095 else if (glyph_count == 0)
5101 unsigned int shift_len, src_idx, dest_idx,
mask;
5114 dest_idx = src_idx + glyph_count;
5117 shift_len *
sizeof(*
context->u.subst.glyphs));
5119 shift_len *
sizeof(*
context->u.subst.glyph_props));
5121 shift_len *
sizeof(*
context->glyph_infos));
5131 context->u.subst.glyph_props[
idx +
i].isClusterStart = 0;
5132 context->u.buffer.glyph_props[
idx +
i].components = 0;
5140 context->cur += glyph_count + 1;
5141 context->glyph_count += glyph_count;
5146 WARN(
"Unknown multiple substitution format %u.\n",
format);
5154 unsigned int subtable_offset)
5157 unsigned int idx, coverage_index;
5169 unsigned int alt_index;
5178 coverage_index, &set_offset))
5184 if (!alt_index)
return FALSE;
5190 WARN(
"Unexpected alternate substitution format %d.\n",
format);
5201 unsigned int *end_offset,
unsigned int *match_positions)
5211 match_positions[0] =
context->cur;
5224 match_positions[
i] = iter.
pos;
5241 while (--
end && !
context->u.buffer.glyph_props[
end].isClusterStart)
5246 context->u.buffer.text_props[
context->glyph_infos[
start].start_text_idx].canBreakShapingAfter = 0;
5250 for (
i =
context->glyph_infos[
start].start_text_idx; i < context->glyph_infos[
end].start_text_idx; ++
i)
5252 context->u.buffer.text_props[
i].canBreakShapingAfter = 0;
5258 unsigned int shift_len;
5265 shift_len *
sizeof(*
context->u.buffer.glyphs));
5267 shift_len *
sizeof(*
context->u.buffer.glyph_props));
5280 unsigned int i,
j, comp_count, match_length = 0;
5313 j = match_positions[
i - 1] + 1;
5314 while (
j < match_positions[
i])
5334 unsigned int subtable_offset)
5338 unsigned int coverage_index;
5357 coverage_index, &lig_set_offset))
5364 for (
i = 0;
i < lig_count; ++
i)
5371 WARN(
"Unexpected ligature substitution format %d.\n",
format);
5377 const UINT16 *backtrack,
unsigned int *match_start)
5397 *match_start = iter.
pos;
5403 const UINT16 *lookahead,
unsigned int offset,
unsigned int *end_index)
5423 *end_index = iter.
pos;
5429 unsigned int *match_positions,
unsigned int lookup_count,
const UINT16 *lookup_records,
unsigned int match_length)
5434 if (!
context->nesting_level_left)
5439 for (
i = 0;
i < lookup_count; ++
i)
5442 unsigned int orig_len, lookup_index,
next;
5449 orig_len =
context->glyph_count;
5453 --
context->nesting_level_left;
5455 ++
context->nesting_level_left;
5457 delta =
context->glyph_count - orig_len;
5462 if (
end <= (
int)match_positions[
idx])
5464 end = match_positions[
idx];
5482 (
count -
next) *
sizeof (*match_positions));
5487 match_positions[
j] = match_positions[
j - 1] + 1;
5490 match_positions[
next] += delta;
5499 unsigned int input_count,
const UINT16 *
input,
unsigned int lookahead_count,
const UINT16 *lookahead,
5502 unsigned int start_index = 0, match_length = 0, end_index = 0;
5513 unsigned int backtrack_count, input_count, lookahead_count, lookup_count;
5515 const UINT16 *backtrack, *lookahead, *
input, *lookup_records;
5529 rule_offset += backtrack_count *
sizeof(*backtrack);
5536 rule_offset += (input_count - 1) *
sizeof(*
input);
5541 rule_offset += lookahead_count *
sizeof(*lookahead);
5549 lookahead, lookup_count, lookup_records, mc))
5562 unsigned int match_length = 0;
5566 lookup_records, match_length);
5571 unsigned int input_count, lookup_count;
5594 rule_offset += (input_count - 1) *
sizeof(*
input);
5596 if (!(lookup_records =
table_read_ensure(
table, rule_offset, lookup_count * 2 *
sizeof(*lookup_records))))
5608 unsigned int subtable_offset)
5629 if (coverage_index >=
count)
5633 rulesets[coverage_index]));
5634 offset += subtable_offset;
5642 unsigned int input_classdef, rule_set_idx;
5644 offset = subtable_offset + 2 ;
5660 if (rule_set_idx >=
count)
5664 offset += subtable_offset;
5673 unsigned int input_count, lookup_count;
5676 offset = subtable_offset + 2 ;
5689 offset +=
sizeof(*input) * input_count;
5703 WARN(
"Unknown contextual substitution format %u.\n",
format);
5709 unsigned int subtable_offset)
5730 if (coverage_index >=
count)
5734 rulesets[coverage_index]));
5735 offset += subtable_offset;
5743 unsigned int backtrack_classdef, input_classdef, lookahead_classdef, rule_set_idx;
5745 offset = subtable_offset + 2 ;
5767 if (rule_set_idx >=
count)
5771 offset += subtable_offset;
5782 unsigned int backtrack_count, input_count, lookahead_count, lookup_count;
5783 const UINT16 *backtrack, *lookahead, *
input, *lookup_records;
5785 offset = subtable_offset + 2 ;
5790 offset += backtrack_count *
sizeof(*backtrack);
5795 offset += input_count *
sizeof(*input);
5800 offset += lookahead_count *
sizeof(*lookahead);
5818 lookahead, lookup_count, lookup_records, &mc);
5821 WARN(
"Unknown chaining contextual substitution format %u.\n",
format);
5827 const struct lookup *
lookup,
unsigned int subtable_offset)
5830 unsigned int offset = subtable_offset;
5844 unsigned int start_index = 0, end_index = 0, backtrack_count, lookahead_count;
5845 unsigned int coverage, coverage_index;
5846 const UINT16 *backtrack, *lookahead;
5859 offset +=
sizeof(*backtrack) * backtrack_count;
5865 offset +=
sizeof(*lookahead) * lookahead_count;
5875 if (coverage_index >= glyph_count)
5886 WARN(
"Unknown reverse chaining contextual substitution format %u.\n",
format);
5893 unsigned int i, lookup_type;
5900 switch (lookup_type)
5924 WARN(
"Invalid lookup type for extension substitution %#x.\n", lookup_type);
5927 WARN(
"Unknown lookup type %u.\n", lookup_type);
5942 if (codepoint > 0xffff)
return codepoint;
5944 return mirror ? mirror : codepoint;
5957 return codepoint == 0x34f || codepoint == 0x61c || codepoint == 0xfeff ||
5958 (codepoint >= 0x180b && codepoint <= 0x180e) || (codepoint >= 0x200b && codepoint <= 0x200f);
5991 if (codepoint < 0x80)
return 0;
5992 return codepoint == 0xad ||
5993 codepoint == 0x34f ||
5994 codepoint == 0x61c ||
5995 (codepoint >= 0x17b4 && codepoint <= 0x17b5) ||
5996 (codepoint >= 0x180b && codepoint <= 0x180e) ||
5997 (codepoint >= 0x200b && codepoint <= 0x200f) ||
5998 (codepoint >= 0x202a && codepoint <= 0x202e) ||
5999 (codepoint >= 0x2060 && codepoint <= 0x206f) ||
6000 (codepoint >= 0xfe00 && codepoint <= 0xfe0f) ||
6001 codepoint == 0xfeff ||
6002 (codepoint >= 0xfff0 && codepoint <= 0xfff8) ||
6003 (codepoint >= 0x1d173 && codepoint <= 0x1d17a) ||
6004 (codepoint >= 0xe0000 && codepoint <= 0xe0fff);
6012 if (codepoint > 0xffff)
return 0;
6021 unsigned int i,
g,
c, codepoint, cluster_start_idx = 0;
6035 codepoint =
text[
i];
6039 codepoint = 0x10000 + ((
text[
i] - 0xd800) << 10) + (
text[
i + 1] - 0xdc00);
6045 if (
c != codepoint &&
font->has_glyph(
context->cache->context,
c))
6048 context->glyph_infos[
i].mask |= rtlm_mask;
6052 if (*
context->u.subst.digits && codepoint >=
'0' && codepoint <=
'9')
6053 codepoint =
context->u.subst.digits[codepoint -
'0'];
6055 context->glyph_infos[
g].codepoint = codepoint;
6062 if (codepoint == 0x200d)
6064 else if (codepoint == 0x200c)
6067 else if ((codepoint >= 0x180b && codepoint <= 0x180d) ||
6068 (codepoint >= 0xe0020 && codepoint <= 0xe007f) ||
6078 context->u.buffer.glyph_props[
g].isClusterStart = 1;
6079 context->glyph_infos[
g].start_text_idx =
i;
6080 cluster_start_idx =
g;
6083 context->u.buffer.glyph_props[
g].isZeroWidthSpace = 1;
6085 context->u.buffer.glyph_props[
g].components = 1;
6089 clustermap[
i] = cluster_start_idx;
6091 context->u.buffer.text_props[
i].canBreakShapingAfter = 1;
6094 clustermap[
i + 1] = cluster_start_idx;
6095 context->u.buffer.text_props[
i + 1].canBreakShapingAfter = 1;
6103 unsigned int lookup_type;
6120 unsigned int i = 0,
j, start_idx;
6130 for (
j = 0;
j <= features->
stage; ++
j)
6132 for (;
i < features->
stages[
j].last_lookup; ++
i)
6184 if (
context->u.buffer.glyph_props[
i].isClusterStart)
6186 unsigned int start_text, end_text;
6188 start_text =
context->glyph_infos[start_idx].start_text_idx;
6189 end_text =
context->glyph_infos[
i].start_text_idx;
6191 for (
j = start_text;
j < end_text; ++
j)
6192 context->u.buffer.clustermap[
j] = start_idx;
6199 for (
j =
context->glyph_infos[start_idx].start_text_idx; j < context->
length; ++
j)
6200 context->u.buffer.clustermap[
j] = start_idx;
6206 unsigned int subtable_offset,
unsigned int coverage,
unsigned int format)
6231 unsigned int subtable_offset,
unsigned int coverage,
unsigned int format)
6234 unsigned int count, backtrack_count;
6263 static const unsigned short gsub_formats[] =
6275 unsigned int i, coverage, lookup_type,
format;
6288 switch (lookup_type)
6316 WARN(
"Unknown lookup type %u.\n", lookup_type);
6327 static const unsigned short gpos_formats[] =
6340 unsigned int i, coverage, lookup_type,
format;
6353 switch (lookup_type)
6382 WARN(
"Unknown lookup type %u.\n", lookup_type);
6399 unsigned int i,
j, applies;
6423 feature_applies[
j] |= is_covered;
6427 if ((
ret = (applies ==
context->glyph_count)))
6438 unsigned int i,
j,
count = 0, lookup_type, subtable_offset;
6451 vert_feature.
tag = DWRITE_MAKE_OPENTYPE_TAG(
'v',
'e',
'r',
't');
6484 WARN(
"Unrecognized single substitution format %u.\n",
format);
6507 memcpy(glyphs, nominal_glyphs, glyph_count *
sizeof(*glyphs));
6513 context.u.subst.glyphs = glyphs;
6515 context.u.subst.max_glyph_count = glyph_count;
6516 context.u.subst.capacity = glyph_count;
6520 vert_feature.
tag = DWRITE_MAKE_OPENTYPE_TAG(
'v',
'e',
'r',
't');
6572 if (fontface->
kern.exists)
6577 offset =
sizeof(*header);
6590 fontface->
flags &= ~FONTFACE_NO_KERNING_PAIRS;
6601 IDWriteFontFileStream_ReleaseFileFragment(stream_desc.
stream, fontface->
kern.context);
6628 unsigned int i,
s,
offset, pair_count, subtable_count;
6640 subtable_count =
min(subtable_count, 32);
6644 offset =
sizeof(*header);
6646 key.left = glyphs[
i];
6647 key.right = glyphs[
i + 1];
6650 for (
s = 0;
s < subtable_count; ++
s)
6665 pair_count * 3 *
sizeof(*
data))))
6690 entry->attributes = 0;
6694 unsigned int *axis_count)
6696 static const float width_axis_values[] =
6725 WARN(
"Unexpected fvar version.\n");
6732 if (!
count ||
size !=
sizeof(*records))
goto done;
6743 (*axis)[
i].tag =
tag = records[
i].
tag;
6744 (*axis)[
i].default_value =
GET_BE_FIXED(records[
i].default_value);
6757 if (!has_wght || !has_wdth || !has_slnt || !has_ital)
6764 width_axis_values[
props.stretch]);
6768 *axis_count =
count;
6772 IDWriteFontFileStream_ReleaseFileFragment(stream_desc->
stream, fvar.
context);
int WINAPI LCIDToLocaleName(_In_ LCID Locale, _Out_writes_opt_(cchName) LPWSTR lpName, _In_ int cchName, _In_ DWORD dwFlags)
_STLP_MOVE_TO_STD_NAMESPACE void _STLP_CALL advance(_InputIterator &__i, _Distance __n)
COMPILER_DEPENDENT_UINT64 UINT64
struct outqueuenode * head
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static const WCHAR nameW[]
@ DWRITE_GLYPH_IMAGE_FORMATS_COLR
@ DWRITE_GLYPH_IMAGE_FORMATS_NONE
@ DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8
@ DWRITE_GLYPH_IMAGE_FORMATS_JPEG
@ DWRITE_GLYPH_IMAGE_FORMATS_PNG
@ DWRITE_GLYPH_IMAGE_FORMATS_CFF
@ DWRITE_GLYPH_IMAGE_FORMATS_SVG
@ DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE
@ DWRITE_GLYPH_IMAGE_FORMATS_TIFF
@ DWRITE_MEASURING_MODE_NATURAL
const unsigned short wine_mirror_map[1428]
static void get_name_record_locale(enum OPENTYPE_PLATFORM_ID platform, USHORT lang_id, WCHAR *locale, USHORT locale_len)
static HRESULT opentype_get_font_strings_from_meta(const struct file_stream_desc *stream_desc, DWRITE_INFORMATIONAL_STRING_ID id, IDWriteLocalizedStrings **ret)
BOOL(* p_match_func)(UINT16 glyph, UINT16 glyph_data, const struct match_data *match_data)
static int __cdecl cmap_format4_compare_range(const void *a, const void *b)
static void opentype_font_var_add_static_axis(struct dwrite_var_axis **axis, unsigned int *axis_count, unsigned int tag, float value)
static void glyph_iterator_init(struct scriptshaping_context *context, unsigned int flags, unsigned int pos, unsigned int len, struct glyph_iterator *iter)
static BOOL opentype_layout_apply_gpos_pair_adjustment(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
static UINT16 opentype_cmap_format0_get_glyph(const struct dwrite_cmap *cmap, unsigned int ch)
static BOOL opentype_layout_apply_rule_set(const struct match_context *mc, unsigned int offset)
static BOOL opentype_layout_apply_context(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
static DWORD table_read_dword(const struct dwrite_fonttable *table, unsigned int offset)
unsigned int opentype_layout_find_script(const struct scriptshaping_cache *cache, unsigned int kind, DWORD script, unsigned int *script_index)
@ TT_NAME_MAC_ENCODING_HEBREW
@ TT_NAME_MAC_ENCODING_DEVANAGARI
@ TT_NAME_MAC_ENCODING_TAMIL
@ TT_NAME_MAC_ENCODING_GEEZ
@ TT_NAME_MAC_ENCODING_TELUGU
@ TT_NAME_MAC_ENCODING_BENGALI
@ TT_NAME_MAC_ENCODING_BURMESE
@ TT_NAME_MAC_ENCODING_SLAVIC
@ TT_NAME_MAC_ENCODING_GURMUKHI
@ TT_NAME_MAC_ENCODING_KOREAN
@ TT_NAME_MAC_ENCODING_JAPANESE
@ TT_NAME_MAC_ENCODING_MALAYALAM
@ TT_NAME_MAC_ENCODING_GUJARATI
@ TT_NAME_MAC_ENCODING_THAI
@ TT_NAME_MAC_ENCODING_GREEK
@ TT_NAME_MAC_ENCODING_VIETNAMESE
@ TT_NAME_MAC_ENCODING_TIBETAN
@ TT_NAME_MAC_ENCODING_SIMPL_CHINESE
@ TT_NAME_MAC_ENCODING_KANNADA
@ TT_NAME_MAC_ENCODING_TRAD_CHINESE
@ TT_NAME_MAC_ENCODING_ORIYA
@ TT_NAME_MAC_ENCODING_SINHALESE
@ TT_NAME_MAC_ENCODING_RSYMBOL
@ TT_NAME_MAC_ENCODING_ARMENIAN
@ TT_NAME_MAC_ENCODING_ROMAN
@ TT_NAME_MAC_ENCODING_ARABIC
@ TT_NAME_MAC_ENCODING_RUSSIAN
@ TT_NAME_MAC_ENCODING_GEORGIAN
@ TT_NAME_MAC_ENCODING_UNINTERPRETED
@ TT_NAME_MAC_ENCODING_KHMER
@ TT_NAME_MAC_ENCODING_LAOTIAN
@ TT_NAME_MAC_ENCODING_SINDHI
@ TT_NAME_MAC_ENCODING_MONGOLIAN
static BOOL opentype_match_class_func(UINT16 glyph, UINT16 glyph_data, const struct match_data *data)
static UINT16 opentype_cmap_dummy_get_glyph(const struct dwrite_cmap *cmap, unsigned int ch)
static enum attach_type opentype_get_glyph_attach_type(const struct scriptshaping_context *context, unsigned int idx)
static int __cdecl colr_compare_gid(const void *g, const void *r)
HRESULT opentype_try_get_font_table(const struct file_stream_desc *stream_desc, UINT32 tag, const void **table_data, void **table_context, UINT32 *table_size, BOOL *found)
static WORD table_read_be_word(const struct dwrite_fonttable *table, unsigned int offset)
static int __cdecl coverage_compare_format1(const void *left, const void *right)
unsigned int opentype_layout_find_language(const struct scriptshaping_cache *cache, unsigned int kind, DWORD language, unsigned int script_index, unsigned int *language_index)
static BOOL opentype_match_glyph_func(UINT16 glyph, UINT16 glyph_data, const struct match_data *data)
static unsigned int opentype_set_glyph_props(struct scriptshaping_context *context, unsigned int idx)
static BOOL opentype_layout_apply_chain_rule_set(const struct match_context *mc, unsigned int offset)
static BOOL opentype_decode_namerecord(const struct dwrite_fonttable *table, unsigned int idx, IDWriteLocalizedStrings *strings)
static unsigned int find_vdmx_group(const struct vdmx_header *hdr)
static BOOL opentype_layout_apply_gsub_alt_substitution(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
BOOL(* p_lookup_is_glyph_covered_func)(struct scriptshaping_context *context, UINT16 glyph, const struct lookup *lookup)
static void opentype_layout_collect_lookups(struct scriptshaping_context *context, unsigned int script_index, unsigned int language_index, struct shaping_features *features, const struct ot_gsubgpos_table *table, struct lookups *lookups)
static void opentype_propagate_attachment_offsets(struct scriptshaping_context *context, unsigned int i)
@ GPOS_LOOKUP_MARK_TO_BASE_ATTACHMENT
@ GPOS_LOOKUP_MARK_TO_MARK_ATTACHMENT
@ GPOS_LOOKUP_CONTEXTUAL_CHAINING_POSITION
@ GPOS_LOOKUP_EXTENSION_POSITION
@ GPOS_LOOKUP_CONTEXTUAL_POSITION
@ GPOS_LOOKUP_CURSIVE_ATTACHMENT
@ GPOS_LOOKUP_SINGLE_ADJUSTMENT
@ GPOS_LOOKUP_MARK_TO_LIGATURE_ATTACHMENT
@ GPOS_LOOKUP_PAIR_ADJUSTMENT
BOOL opentype_layout_check_feature(struct scriptshaping_context *context, unsigned int script_index, unsigned int language_index, struct shaping_feature *feature, unsigned int glyph_count, const UINT16 *glyphs, UINT8 *feature_applies)
static unsigned int opentype_cmap_format0_get_ranges(const struct dwrite_cmap *cmap, unsigned int count, DWRITE_UNICODE_RANGE *ranges)
HRESULT opentype_get_font_var_axis(const struct file_stream_desc *stream_desc, struct dwrite_var_axis **axis, unsigned int *axis_count)
static unsigned int opentype_cmap_format12_13_get_ranges(const struct dwrite_cmap *cmap, unsigned int count, DWRITE_UNICODE_RANGE *ranges)
static BOOL opentype_layout_contextual_lookup_is_glyph_covered(struct scriptshaping_context *context, UINT16 glyph, unsigned int subtable_offset, unsigned int coverage, unsigned int format)
static UINT16 opentype_cmap_format6_10_get_glyph(const struct dwrite_cmap *cmap, unsigned int ch)
HRESULT opentype_get_font_info_strings(const struct file_stream_desc *stream_desc, DWRITE_INFORMATIONAL_STRING_ID id, IDWriteLocalizedStrings **strings)
@ GPOS_VALUE_X_ADVANCE_DEVICE
@ GPOS_VALUE_Y_PLACEMENT_DEVICE
@ GPOS_VALUE_X_PLACEMENT_DEVICE
@ GPOS_VALUE_Y_ADVANCE_DEVICE
static void opentype_set_subst_glyph_props(struct scriptshaping_context *context, unsigned int idx)
static BOOL opentype_layout_apply_gpos_mark_to_lig_attachment(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
void opentype_layout_apply_gpos_features(struct scriptshaping_context *context, unsigned int script_index, unsigned int language_index, struct shaping_features *features)
static DWORD table_read_be_dword(const struct dwrite_fonttable *table, unsigned int offset)
static HRESULT opentype_otf_analyzer(IDWriteFontFileStream *stream, UINT32 *font_count, DWRITE_FONT_FILE_TYPE *file_type, DWRITE_FONT_FACE_TYPE *face_type)
TT_NAME_WINDOWS_ENCODING_ID
@ TT_NAME_WINDOWS_ENCODING_RESERVED3
@ TT_NAME_WINDOWS_ENCODING_JOHAB
@ TT_NAME_WINDOWS_ENCODING_BIG5
@ TT_NAME_WINDOWS_ENCODING_SJIS
@ TT_NAME_WINDOWS_ENCODING_UNICODE_FULL
@ TT_NAME_WINDOWS_ENCODING_SYMBOL
@ TT_NAME_WINDOWS_ENCODING_PRC
@ TT_NAME_WINDOWS_ENCODING_WANSUNG
@ TT_NAME_WINDOWS_ENCODING_UNICODE_BMP
@ TT_NAME_WINDOWS_ENCODING_RESERVED1
@ TT_NAME_WINDOWS_ENCODING_RESERVED2
void opentype_layout_unsafe_to_break(struct scriptshaping_context *context, unsigned int start, unsigned int end)
static void opentype_layout_gpos_get_anchor(const struct scriptshaping_context *context, unsigned int anchor_offset, unsigned int glyph_index, float *x, float *y)
static HRESULT opentype_ttc_analyzer(IDWriteFontFileStream *stream, UINT32 *font_count, DWRITE_FONT_FILE_TYPE *file_type, DWRITE_FONT_FACE_TYPE *face_type)
static BOOL opentype_is_gsub_lookup_reversed(const struct scriptshaping_context *context, const struct lookup *lookup)
static unsigned int opentype_is_diacritic(unsigned int codepoint)
static UINT get_name_record_codepage(enum OPENTYPE_PLATFORM_ID platform, USHORT encoding)
HRESULT opentype_get_cpal_entries(const struct dwrite_fonttable *cpal, unsigned int palette, unsigned int first_entry_index, unsigned int entry_count, DWRITE_COLOR_F *entries)
static BOOL opentype_layout_apply_gsub_lookup(struct scriptshaping_context *context, const struct lookup *lookup)
static float opentype_scale_gpos_be_value(WORD value, float emsize, UINT16 upem)
static BOOL opentype_layout_apply_gsub_lig_substitution(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
static unsigned int shaping_features_get_mask(const struct shaping_features *features, unsigned int tag, unsigned int *shift)
static const char name_mac_langid_to_locale[][10]
static const UINT16 * table_read_array_be_word(const struct dwrite_fonttable *table, unsigned int offset, unsigned int index, UINT16 *data)
@ GLYPH_PROP_ATTACH_TYPE_MASK
@ GLYPH_PROP_MARK_ATTACH_CLASS_MASK
static void opentype_reverse_cursive_offset(struct scriptshaping_context *context, unsigned int i, unsigned int new_parent)
static BOOL opentype_layout_apply_context_match(unsigned int input_count, const UINT16 *input, unsigned int lookup_count, const UINT16 *lookup_records, const struct match_context *mc)
static void opentype_layout_delete_glyph(struct scriptshaping_context *context, unsigned int idx)
@ OPENTYPE_STRING_UNIQUE_IDENTIFIER
@ OPENTYPE_STRING_DESCRIPTION
@ OPENTYPE_STRING_FAMILY_NAME
@ OPENTYPE_STRING_DESIGNER_URL
@ OPENTYPE_STRING_VENDOR_URL
@ OPENTYPE_STRING_WWS_FAMILY_NAME
@ OPENTYPE_STRING_POSTSCRIPT_FONTNAME
@ OPENTYPE_STRING_SAMPLE_TEXT
@ OPENTYPE_STRING_COMPATIBLE_FULLNAME
@ OPENTYPE_STRING_COPYRIGHT_NOTICE
@ OPENTYPE_STRING_VERSION_STRING
@ OPENTYPE_STRING_WWS_SUBFAMILY_NAME
@ OPENTYPE_STRING_LICENSE_DESCRIPTION
@ OPENTYPE_STRING_MANUFACTURER
@ OPENTYPE_STRING_TYPOGRAPHIC_SUBFAMILY_NAME
@ OPENTYPE_STRING_RESERVED_ID15
@ OPENTYPE_STRING_DESIGNER
@ OPENTYPE_STRING_LICENSE_INFO_URL
@ OPENTYPE_STRING_SUBFAMILY_NAME
@ OPENTYPE_STRING_TYPOGRAPHIC_FAMILY_NAME
@ OPENTYPE_STRING_TRADEMARK
@ OPENTYPE_STRING_FULL_FONTNAME
@ OPENTYPE_STRING_POSTSCRIPT_CID_NAME
static BOOL opentype_layout_apply_chain_context(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
static int __cdecl gpos_pair_adjustment_compare_format1(const void *g, const void *r)
static UINT16 opentype_cmap_format4_get_glyph(const struct dwrite_cmap *cmap, unsigned int ch)
void opentype_layout_apply_gsub_features(struct scriptshaping_context *context, unsigned int script_index, unsigned int language_index, struct shaping_features *features)
@ LOOKUP_FLAG_USE_MARK_FILTERING_SET
@ LOOKUP_FLAG_IGNORE_MARKS
@ LOOKUP_FLAG_IGNORE_LIGATURES
@ LOOKUP_FLAG_MARK_ATTACHMENT_TYPE
@ LOOKUP_FLAG_IGNORE_MASK
@ LOOKUP_FLAG_IGNORE_BASE
HRESULT opentype_analyze_font(IDWriteFontFileStream *stream, BOOL *supported, DWRITE_FONT_FILE_TYPE *file_type, DWRITE_FONT_FACE_TYPE *face_type, UINT32 *face_count)
static int __cdecl cmap_header_compare(const void *a, const void *b)
static UINT16 opentype_cmap_format13_get_glyph(const struct dwrite_cmap *cmap, unsigned int ch)
static void opentype_layout_set_glyph_masks(struct scriptshaping_context *context, const struct shaping_features *features)
static unsigned int unicode_get_mirrored_char(unsigned int codepoint)
BOOL opentype_has_vertical_variants(struct dwrite_fontface *fontface)
@ GSUB_LOOKUP_CONTEXTUAL_SUBST
@ GSUB_LOOKUP_MULTIPLE_SUBST
@ GSUB_LOOKUP_SINGLE_SUBST
@ GSUB_LOOKUP_REVERSE_CHAINING_CONTEXTUAL_SUBST
@ GSUB_LOOKUP_LIGATURE_SUBST
@ GSUB_LOOKUP_ALTERNATE_SUBST
@ GSUB_LOOKUP_EXTENSION_SUBST
@ GSUB_LOOKUP_CHAINING_CONTEXTUAL_SUBST
static BOOL glyph_iterator_next(struct glyph_iterator *iter)
@ TT_HEAD_MACSTYLE_EXTENDED
@ TT_HEAD_MACSTYLE_UNDERLINE
@ TT_HEAD_MACSTYLE_ITALIC
@ TT_HEAD_MACSTYLE_OUTLINE
@ TT_HEAD_MACSTYLE_SHADOW
@ TT_HEAD_MACSTYLE_CONDENSED
HRESULT opentype_get_colr_glyph(const struct dwrite_fonttable *colr, UINT16 glyph, struct dwrite_colorglyph *ret)
static void opentype_get_nominal_glyphs(struct scriptshaping_context *context, const struct shaping_features *features)
static BOOL glyph_iterator_prev(struct glyph_iterator *iter)
static BOOL opentype_layout_apply_ligature(struct scriptshaping_context *context, unsigned int offset, const struct lookup *lookup)
void opentype_get_font_typo_metrics(struct file_stream_desc *stream_desc, unsigned int *ascent, unsigned int *descent)
static BOOL opentype_layout_apply_mark_array(struct scriptshaping_context *context, unsigned int subtable_offset, unsigned int mark_array, unsigned int mark_index, unsigned int glyph_index, unsigned int anchors_matrix, unsigned int class_count, unsigned int glyph_pos)
@ GDEF_CLASS_UNCLASSIFIED
static unsigned int opentype_cmap_dummy_get_ranges(const struct dwrite_cmap *cmap, unsigned int count, DWRITE_UNICODE_RANGE *ranges)
static BOOL opentype_layout_gsub_ensure_buffer(struct scriptshaping_context *context, unsigned int count)
static int __cdecl gdef_class_compare_format2(const void *g, const void *r)
static unsigned int opentype_layout_is_pos_context(const struct scriptshaping_context *context)
void dwrite_cmap_init(struct dwrite_cmap *cmap, IDWriteFontFile *file, unsigned int face_index, DWRITE_FONT_FACE_TYPE face_type)
opentype_cmap_table_platform
@ OPENTYPE_CMAP_TABLE_PLATFORM_WIN
static BOOL opentype_layout_gpos_lookup_is_glyph_covered(struct scriptshaping_context *context, UINT16 glyph, const struct lookup *lookup)
static BOOL opentype_layout_apply_gsub_single_substitution(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
#define GLYPH_CONTEXT_MAX_LENGTH
static unsigned int dwrite_popcount(unsigned int x)
UINT16 opentype_cmap_get_glyph(const struct dwrite_cmap *cmap, unsigned int ch)
HRESULT opentype_get_font_facename(struct file_stream_desc *stream_desc, WCHAR *lfname, IDWriteLocalizedStrings **names)
static unsigned int opentype_layout_get_glyph_class(const struct dwrite_fonttable *table, unsigned int offset, UINT16 glyph)
static HRESULT opentype_get_font_table(const struct file_stream_desc *stream_desc, UINT32 tag, struct dwrite_fonttable *table)
UINT32 opentype_get_glyph_image_formats(IDWriteFontFace5 *fontface)
static BOOL opentype_layout_init_lookup(const struct ot_gsubgpos_table *table, unsigned short lookup_index, const struct shaping_feature *feature, struct lookup *lookup)
static enum iterator_match glyph_iterator_may_match(const struct glyph_iterator *iter)
static const UINT16 dwriteid_to_opentypeid[DWRITE_INFORMATIONAL_STRING_WEIGHT_STRETCH_STYLE_FAMILY_NAME+1]
void opentype_colr_next_glyph(const struct dwrite_fonttable *colr, struct dwrite_colorglyph *glyph)
unsigned int shape_get_feature_1_mask(const struct shaping_features *features, unsigned int tag)
OPENTYPE_CMAP_TABLE_FORMAT
@ OPENTYPE_CMAP_TABLE_SEGMENT_MAPPING
@ OPENTYPE_CMAP_TABLE_SEGMENTED_COVERAGE
unsigned int opentype_get_gasp_flags(const struct dwrite_fonttable *gasp, float emsize)
static void opentype_layout_add_lookups(const struct ot_feature_list *feature_list, UINT16 total_lookup_count, const struct ot_gsubgpos_table *table, struct shaping_feature *feature, struct lookups *lookups)
HRESULT opentype_get_font_familyname(const struct file_stream_desc *stream_desc, DWRITE_FONT_FAMILY_MODEL family_model, IDWriteLocalizedStrings **names)
static int __cdecl coverage_compare_format2(const void *g, const void *r)
static BOOL opentype_layout_context_match_input(const struct match_context *mc, unsigned int count, const UINT16 *input, unsigned int *end_offset, unsigned int *match_positions)
BOOL is_face_type_supported(DWRITE_FONT_FACE_TYPE type)
static int __cdecl kern_format0_compare(const void *a, const void *b)
@ TT_NAME_MAC_LANGID_RUNDI
@ TT_NAME_MAC_LANGID_KHMER
@ TT_NAME_MAC_LANGID_TURKISH
@ TT_NAME_MAC_LANGID_MALAGASY
@ TT_NAME_MAC_LANGID_ARABIC
@ TT_NAME_MAC_LANGID_TELUGU
@ TT_NAME_MAC_LANGID_INUKTITUT
@ TT_NAME_MAC_LANGID_TATAR
@ TT_NAME_MAC_LANGID_SOMALI
@ TT_NAME_MAC_LANGID_SIMPL_CHINESE
@ TT_NAME_MAC_LANGID_ESPERANTO
@ TT_NAME_MAC_LANGID_JAVANESE
@ TT_NAME_MAC_LANGID_MANX_GAELIC
@ TT_NAME_MAC_LANGID_AZERB_ARABIC
@ TT_NAME_MAC_LANGID_GUARANI
@ TT_NAME_MAC_LANGID_GERMAN
@ TT_NAME_MAC_LANGID_YIDDISH
@ TT_NAME_MAC_LANGID_PORTUGUESE
@ TT_NAME_MAC_LANGID_UIGHUR
@ TT_NAME_MAC_LANGID_JAPANESE
@ TT_NAME_MAC_LANGID_NYANJA
@ TT_NAME_MAC_LANGID_ASSAMESE
@ TT_NAME_MAC_LANGID_DUTCH
@ TT_NAME_MAC_LANGID_SLOVAK
@ TT_NAME_MAC_LANGID_NEPALI
@ TT_NAME_MAC_LANGID_FRENCH
@ TT_NAME_MAC_LANGID_INDONESIAN
@ TT_NAME_MAC_LANGID_SWEDISH
@ TT_NAME_MAC_LANGID_MALAYALAM
@ TT_NAME_MAC_LANGID_BENGALI
@ TT_NAME_MAC_LANGID_AFRIKAANS
@ TT_NAME_MAC_LANGID_FINNISH
@ TT_NAME_MAC_LANGID_TURKMEN
@ TT_NAME_MAC_LANGID_GREENLANDIC
@ TT_NAME_MAC_LANGID_SINHALESE
@ TT_NAME_MAC_LANGID_MACEDONIAN
@ TT_NAME_MAC_LANGID_NORWEGIAN
@ TT_NAME_MAC_LANGID_GEORGIAN
@ TT_NAME_MAC_LANGID_TIGRINYA
@ TT_NAME_MAC_LANGID_DZONGKHA
@ TT_NAME_MAC_LANGID_LATIN
@ TT_NAME_MAC_LANGID_ALBANIAN
@ TT_NAME_MAC_LANGID_LITHUANIAN
@ TT_NAME_MAC_LANGID_CATALAN
@ TT_NAME_MAC_LANGID_DANISH
@ TT_NAME_MAC_LANGID_LATVIAN
@ TT_NAME_MAC_LANGID_BRETON
@ TT_NAME_MAC_LANGID_SCOTTISH_GAELIC
@ TT_NAME_MAC_LANGID_FAROESE
@ TT_NAME_MAC_LANGID_HUNGARIAN
@ TT_NAME_MAC_LANGID_ROMANIAN
@ TT_NAME_MAC_LANGID_MARATHI
@ TT_NAME_MAC_LANGID_TAMIL
@ TT_NAME_MAC_LANGID_SINDHI
@ TT_NAME_MAC_LANGID_TONGAN
@ TT_NAME_MAC_LANGID_TAGALOG
@ TT_NAME_MAC_LANGID_PASHTO
@ TT_NAME_MAC_LANGID_MALTESE
@ TT_NAME_MAC_LANGID_MALAY_ROMAN
@ TT_NAME_MAC_LANGID_HEBREW
@ TT_NAME_MAC_LANGID_GREEK
@ TT_NAME_MAC_LANGID_SWAHILI
@ TT_NAME_MAC_LANGID_FARSI
@ TT_NAME_MAC_LANGID_CZECH
@ TT_NAME_MAC_LANGID_QUECHUA
@ TT_NAME_MAC_LANGID_ORIYA
@ TT_NAME_MAC_LANGID_GAELIC
@ TT_NAME_MAC_LANGID_SLOVENIAN
@ TT_NAME_MAC_LANGID_TAJIKI
@ TT_NAME_MAC_LANGID_URDU
@ TT_NAME_MAC_LANGID_BYELORUSSIAN
@ TT_NAME_MAC_LANGID_SERBIAN
@ TT_NAME_MAC_LANGID_SANSKRIT
@ TT_NAME_MAC_LANGID_FLEMISH
@ TT_NAME_MAC_LANGID_MONGOLIAN_CYR
@ TT_NAME_MAC_LANGID_BASQUE
@ TT_NAME_MAC_LANGID_UKRAINIAN
@ TT_NAME_MAC_LANGID_KURDISH
@ TT_NAME_MAC_LANGID_KAZAKH
@ TT_NAME_MAC_LANGID_THAI
@ TT_NAME_MAC_LANGID_AZERB_CYR
@ TT_NAME_MAC_LANGID_GALLA
@ TT_NAME_MAC_LANGID_BULGARIAN
@ TT_NAME_MAC_LANGID_KANNADA
@ TT_NAME_MAC_LANGID_BURMESE
@ TT_NAME_MAC_LANGID_KASHMIRI
@ TT_NAME_MAC_LANGID_HINDI
@ TT_NAME_MAC_LANGID_ENGLISH
@ TT_NAME_MAC_LANGID_KOREAN
@ TT_NAME_MAC_LANGID_RUSSIAN
@ TT_NAME_MAC_LANGID_MALAY_ARABIC
@ TT_NAME_MAC_LANGID_KINYARWANDA
@ TT_NAME_MAC_LANGID_GALICIAN
@ TT_NAME_MAC_LANGID_AMHARIC
@ TT_NAME_MAC_LANGID_MONGOLIAN
@ TT_NAME_MAC_LANGID_AZER_ROMAN
@ TT_NAME_MAC_LANGID_TIBETAN
@ TT_NAME_MAC_LANGID_KIRGHIZ
@ TT_NAME_MAC_LANGID_POLISH
@ TT_NAME_MAC_LANGID_SPANISH
@ TT_NAME_MAC_LANGID_CROATIAN
@ TT_NAME_MAC_LANGID_SAMI
@ TT_NAME_MAC_LANGID_WELSH
@ TT_NAME_MAC_LANGID_AYMARA
@ TT_NAME_MAC_LANGID_SUNDANESE
@ TT_NAME_MAC_LANGID_ICELANDIC
@ TT_NAME_MAC_LANGID_ARMENIAN
@ TT_NAME_MAC_LANGID_PUNJABI
@ TT_NAME_MAC_LANGID_MOLDAVIAN
@ TT_NAME_MAC_LANGID_UZBEK
@ TT_NAME_MAC_LANGID_VIETNAMESE
@ TT_NAME_MAC_LANGID_IRISH_GAELIC
@ TT_NAME_MAC_LANGID_ESTONIAN
@ TT_NAME_MAC_LANGID_GREEK_POLYTONIC
@ TT_NAME_MAC_LANGID_TRAD_CHINESE
@ TT_NAME_MAC_LANGID_ITALIAN
@ TT_NAME_MAC_LANGID_GUJARATI
void opentype_get_typographic_features(struct ot_gsubgpos_table *table, unsigned int script_index, unsigned int language_index, struct tag_array *t)
static WCHAR * meta_get_lng_name(WCHAR *str, WCHAR **ctx)
static BOOL opentype_layout_apply_gpos_mark_to_mark_attachment(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
static enum iterator_match glyph_iterator_may_skip(const struct glyph_iterator *iter)
static int __cdecl lookups_sorting_compare(const void *a, const void *b)
static BOOL opentype_layout_context_match_backtrack(const struct match_context *mc, unsigned int count, const UINT16 *backtrack, unsigned int *match_start)
static void opentype_layout_replace_glyph(struct scriptshaping_context *context, UINT16 glyph)
static HRESULT opentype_ttf_analyzer(IDWriteFontFileStream *stream, UINT32 *font_count, DWRITE_FONT_FILE_TYPE *file_type, DWRITE_FONT_FACE_TYPE *face_type)
static BOOL opentype_layout_apply_gpos_single_adjustment(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
static unsigned int opentype_is_default_ignorable(unsigned int codepoint)
void opentype_get_font_metrics(struct file_stream_desc *stream_desc, DWRITE_FONT_METRICS1 *metrics, DWRITE_CARET_METRICS *caret)
static BOOL opentype_layout_mark_set_covers(const struct scriptshaping_cache *cache, unsigned int set_index, UINT16 glyph)
static unsigned int opentype_cmap_format4_get_ranges(const struct dwrite_cmap *cmap, unsigned int count, DWRITE_UNICODE_RANGE *ranges)
static BOOL opentype_layout_apply_gsub_mult_substitution(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
HRESULT opentype_cmap_get_unicode_ranges(const struct dwrite_cmap *cmap, unsigned int max_count, DWRITE_UNICODE_RANGE *ranges, unsigned int *count)
static HRESULT opentype_get_font_strings_from_id(const struct dwrite_fonttable *table, enum OPENTYPE_STRING_ID id, IDWriteLocalizedStrings **strings)
void opentype_layout_scriptshaping_cache_init(struct scriptshaping_cache *cache)
static BOOL opentype_layout_apply_gpos_lookup(struct scriptshaping_context *context, const struct lookup *lookup)
static BOOL lookup_is_glyph_match(const struct scriptshaping_context *context, unsigned int idx, unsigned int match_props)
static BOOL opentype_is_english_namerecord(const struct dwrite_fonttable *table, unsigned int idx)
static BOOL opentype_layout_apply_gpos_mark_to_base_attachment(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
static BOOL opentype_has_font_table(IDWriteFontFace5 *fontface, UINT32 tag)
HRESULT opentype_get_kerning_pairs(struct dwrite_fontface *fontface, unsigned int count, const UINT16 *glyphs, INT32 *values)
static unsigned int opentype_get_sbix_formats(IDWriteFontFace5 *fontface)
static void opentype_layout_apply_gpos_value(struct scriptshaping_context *context, unsigned int table_offset, WORD value_format, const WORD *values, unsigned int glyph)
unsigned int opentype_get_cpal_paletteentrycount(const struct dwrite_fonttable *cpal)
BOOL opentype_has_kerning_pairs(struct dwrite_fontface *fontface)
static BOOL opentype_layout_apply_gsub_reverse_chain_context_substitution(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
static BOOL opentype_layout_chain_contextual_lookup_is_glyph_covered(struct scriptshaping_context *context, UINT16 glyph, unsigned int subtable_offset, unsigned int coverage, unsigned int format)
static void opentype_layout_apply_gsub_context_lookup(struct scriptshaping_context *context, unsigned int lookup_index)
static int __cdecl feature_search_compare(const void *a, const void *b)
opentype_cmap_table_encoding
@ OPENTYPE_CMAP_TABLE_ENCODING_UNICODE_BMP
@ OPENTYPE_CMAP_TABLE_ENCODING_SYMBOL
@ OPENTYPE_CMAP_TABLE_ENCODING_UNICODE_FULL
static float table_read_be_fixed(const struct dwrite_fonttable *table, unsigned int offset)
unsigned int opentype_get_cpal_palettecount(const struct dwrite_fonttable *cpal)
void dwrite_cmap_release(struct dwrite_cmap *cmap)
static unsigned int opentype_is_zero_width(unsigned int codepoint)
#define GLYPH_NOT_COVERED
static unsigned int opentype_cmap_format6_10_get_ranges(const struct dwrite_cmap *cmap, unsigned int count, DWRITE_UNICODE_RANGE *ranges)
@ OS2_FSSELECTION_STRIKEOUT
@ OS2_FSSELECTION_NEGATIVE
@ OS2_FSSELECTION_REGULAR
@ OS2_FSSELECTION_USE_TYPO_METRICS
@ OS2_FSSELECTION_OBLIQUE
@ OS2_FSSELECTION_UNDERSCORE
@ OS2_FSSELECTION_OUTLINED
void opentype_get_font_properties(const struct file_stream_desc *stream_desc, struct dwrite_font_props *props)
static unsigned int opentype_layout_is_subst_context(const struct scriptshaping_context *context)
static HRESULT opentype_type1_analyzer(IDWriteFontFileStream *stream, UINT32 *font_count, DWRITE_FONT_FILE_TYPE *file_type, DWRITE_FONT_FACE_TYPE *face_type)
static BOOL opentype_layout_apply_gpos_cursive_attachment(struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable_offset)
static void opentype_layout_get_glyph_range_for_text(struct scriptshaping_context *context, unsigned int start_char, unsigned int end_char, unsigned int *start_glyph, unsigned int *end_glyph)
static const void * table_read_ensure(const struct dwrite_fonttable *table, unsigned int offset, unsigned int size)
static int __cdecl cmap_format12_13_compare_group(const void *a, const void *b)
static void opentype_layout_apply_gpos_context_lookup(struct scriptshaping_context *context, unsigned int lookup_index)
static BOOL opentype_match_coverage_func(UINT16 glyph, UINT16 glyph_data, const struct match_data *data)
static BOOL opentype_layout_apply_chain_context_match(unsigned int backtrack_count, const UINT16 *backtrack, unsigned int input_count, const UINT16 *input, unsigned int lookahead_count, const UINT16 *lookahead, unsigned int lookup_count, const UINT16 *lookup_records, const struct match_context *mc)
#define SHAPE_MAX_NESTING_LEVEL
static unsigned int opentype_layout_get_gsubgpos_subtable(const struct scriptshaping_context *context, const struct lookup *lookup, unsigned int subtable, unsigned int *lookup_type)
static int opentype_layout_gpos_get_dev_value(const struct scriptshaping_context *context, unsigned int offset)
@ OPENTYPE_PLATFORM_UNICODE
@ OPENTYPE_PLATFORM_CUSTOM
static BOOL opentype_layout_gsub_lookup_is_glyph_covered(struct scriptshaping_context *context, UINT16 glyph, const struct lookup *lookup)
HRESULT opentype_get_vertical_glyph_variants(struct dwrite_fontface *fontface, unsigned int glyph_count, const UINT16 *nominal_glyphs, UINT16 *glyphs)
static BOOL opentype_layout_context_match_lookahead(const struct match_context *mc, unsigned int count, const UINT16 *lookahead, unsigned int offset, unsigned int *end_index)
static BOOL opentype_layout_context_apply_lookup(struct scriptshaping_context *context, unsigned int count, unsigned int *match_positions, unsigned int lookup_count, const UINT16 *lookup_records, unsigned int match_length)
static unsigned int opentype_layout_is_glyph_covered(const struct dwrite_fonttable *table, unsigned int coverage, UINT16 glyph)
static void opentype_set_glyph_attach_type(struct scriptshaping_context *context, unsigned int idx, enum attach_type attach_type)
static unsigned int opentype_get_cblc_formats(IDWriteFontFace5 *fontface)
static const struct ot_langsys * opentype_get_langsys(const struct ot_gsubgpos_table *table, unsigned int script_index, unsigned int language_index, unsigned int *feature_count)
BOOL opentype_get_vdmx_size(const struct dwrite_fonttable *vdmx, INT emsize, UINT16 *ascent, UINT16 *descent)
DWRITE_CONTAINER_TYPE opentype_analyze_container_type(void const *data, UINT32 data_size)
HRESULT(* dwrite_fontfile_analyzer)(IDWriteFontFileStream *stream, UINT32 *font_count, DWRITE_FONT_FILE_TYPE *file_type, DWRITE_FONT_FACE_TYPE *face_type)
static UINT16 opentype_cmap_format12_get_glyph(const struct dwrite_cmap *cmap, unsigned int ch)
static const GUID * classes[]
#define MultiByteToWideChar
static const WCHAR version[]
BOOL WINAPI GetStringTypeW(DWORD type, LPCWSTR src, INT count, LPWORD chartype)
INT WINAPI GetSystemDefaultLocaleName(LPWSTR localename, INT len)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP void __cdecl qsort(void *, size_t, size_t, int(__cdecl *)(const void *, const void *))
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
struct nls_table * tables
@ DWRITE_FONT_FILE_TYPE_TRUETYPE
@ DWRITE_FONT_FILE_TYPE_TYPE1_PFM
@ DWRITE_FONT_FILE_TYPE_TYPE1_PFB
@ DWRITE_FONT_FILE_TYPE_OPENTYPE_COLLECTION
@ DWRITE_FONT_FILE_TYPE_UNKNOWN
@ DWRITE_FONT_FILE_TYPE_CFF
DWRITE_INFORMATIONAL_STRING_ID
@ DWRITE_INFORMATIONAL_STRING_WEIGHT_STRETCH_STYLE_FAMILY_NAME
@ DWRITE_INFORMATIONAL_STRING_DESIGN_SCRIPT_LANGUAGE_TAG
@ DWRITE_INFORMATIONAL_STRING_SUPPORTED_SCRIPT_LANGUAGE_TAG
@ DWRITE_FONT_FACE_TYPE_TYPE1
@ DWRITE_FONT_FACE_TYPE_CFF
@ DWRITE_FONT_FACE_TYPE_OPENTYPE_COLLECTION
@ DWRITE_FONT_FACE_TYPE_UNKNOWN
@ DWRITE_FONT_FACE_TYPE_TRUETYPE
@ DWRITE_FONT_FACE_TYPE_RAW_CFF
@ DWRITE_FONT_WEIGHT_NORMAL
@ DWRITE_FONT_WEIGHT_BOLD
@ DWRITE_FONT_WEIGHT_ULTRA_BLACK
@ DWRITE_FONT_STYLE_NORMAL
@ DWRITE_FONT_STYLE_ITALIC
@ DWRITE_FONT_STYLE_OBLIQUE
@ DWRITE_FONT_STRETCH_EXPANDED
@ DWRITE_FONT_STRETCH_NORMAL
@ DWRITE_FONT_STRETCH_UNDEFINED
@ DWRITE_FONT_STRETCH_ULTRA_EXPANDED
@ DWRITE_FONT_STRETCH_CONDENSED
@ DWRITE_PANOSE_FAMILY_SYMBOL
@ DWRITE_PANOSE_PROPORTION_MONOSPACED
enum DWRITE_CONTAINER_TYPE_WOFF
@ DWRITE_FONT_FAMILY_MODEL_TYPOGRAPHIC
@ DWRITE_FONT_AXIS_TAG_WEIGHT
@ DWRITE_FONT_AXIS_TAG_WIDTH
@ DWRITE_FONT_AXIS_TAG_ITALIC
@ DWRITE_FONT_AXIS_TAG_SLANT
@ DWRITE_FONT_AXIS_ATTRIBUTES_HIDDEN
enum DWRITE_CONTAINER_TYPE_WOFF2
unsigned int get_localizedstrings_count(IDWriteLocalizedStrings *strings)
HRESULT get_filestream_from_file(IDWriteFontFile *, IDWriteFontFileStream **)
HRESULT add_localizedstring(IDWriteLocalizedStrings *, const WCHAR *, const WCHAR *)
static LPWSTR heap_strdupnW(const WCHAR *str, UINT32 len)
void sort_localizedstrings(IDWriteLocalizedStrings *)
HRESULT create_localizedstrings(IDWriteLocalizedStrings **)
@ FONTFACE_VERTICAL_VARIANTS
@ FONTFACE_NO_VERTICAL_VARIANTS
@ FONTFACE_NO_KERNING_PAIRS
struct scriptshaping_cache * fontface_get_shaping_cache(struct dwrite_fontface *fontface)
static unsigned short get_table_entry_16(const unsigned short *table, WCHAR ch)
static BOOL dwrite_array_reserve(void **elements, size_t *capacity, size_t count, size_t size)
@ SCRIPT_JUSTIFY_CHARACTER
const void * get_fontface_table(IDWriteFontFace5 *fontface, UINT32 tag, struct dwrite_fonttable *table)
Character const *const size_t const max_count
static const FxOffsetAndName offsets[]
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLsizei const GLchar *const * strings
GLenum GLenum GLuint components
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
GLboolean GLboolean GLboolean b
GLboolean GLenum GLenum GLvoid * values
GLuint GLsizei GLsizei * length
GLenum GLuint GLint GLint layer
GLboolean GLboolean GLboolean GLboolean a
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static const WCHAR localeW[]
INTERNETFEATURELIST feature
static const struct @662 sizes[]
#define LOCALE_NAME_MAX_LENGTH
#define MAKELCID(lgid, srtid)
static unsigned __int64 next
static __inline const char * debugstr_fourcc(unsigned int cc)
FD_TYPE file_type(FDSC **curr, char *fixed)
DWRITE_FONT_FEATURE * features
struct sbit_line_metrics hori
uint32_t numberofIndexSubTables
uint32_t indexSubTableArrayOffset
struct sbit_line_metrics vert
const struct dwrite_cmap * cmap
uint16_t first_layer_index
unsigned int * coverage_index
const UINT16 * table_base
struct dwrite_cmap::@304::@306 format6_10
union dwrite_cmap::@304 u
struct dwrite_cmap::@304::@305 format4
IDWriteFontFileStream * stream
struct dwrite_cmap::@304::@307 format12_13
p_cmap_get_glyph_func get_glyph
p_cmap_get_ranges_func get_ranges
struct dwrite_fonttable kern
IDWriteFontFileStream * stream
DWRITE_FONT_FACE_TYPE type
DWRITE_FONT_FACE_TYPE face_type
IDWriteFontFileStream * stream
const UINT16 * glyph_data
const struct match_data * match_data
struct scriptshaping_context * context
unsigned short subtable_count
unsigned int input_offset
struct scriptshaping_context * context
unsigned int lookahead_offset
unsigned int backtrack_offset
const struct lookup * lookup
unsigned int subtable_offset
const struct match_context * mc
uint16_t startcoverage_index
struct ot_feature_record features[1]
uint16_t lookuplist_index[1]
struct ot_gpos_mark_record records[1]
struct ot_gpos_pairvalue pairvalues[1]
uint16_t feature_index[1]
uint16_t required_feature_index
unsigned int subtable_count
struct ot_script_record scripts[1]
struct ot_langsys_record langsys[1]
int8_t caretSlopeNumerator
int8_t caretSlopeDenominator
uint32_t glyphdata_offsets[1]
unsigned int default_value
struct shaping_feature * features
struct shaping_stage stages[MAX_SHAPING_STAGE]
int16_t minLeftSideBearing
uint16_t numberOfHMetrics
int16_t minRightSideBearing
SHORT ySuperscriptXOffset
SHORT ySuperscriptYOffset
int16_t underlinePosition
int16_t underlineThickness
struct vdmx_vtable entries[1]
#define FIELD_OFFSET(t, f)
static const WCHAR props[]
#define E_NOT_SUFFICIENT_BUFFER
#define IS_HIGH_SURROGATE(ch)
#define IS_LOW_SURROGATE(ch)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList