38#define GET_BE_DWORD(x) (x)
40#define GET_BE_DWORD(x) RtlUlongByteSwap(x)
50 cache->font = font_ops;
64 cache->font->release_font_table(
cache->context,
cache->gdef.table.context);
65 cache->font->release_font_table(
cache->context,
cache->gsub.table.context);
66 cache->font->release_font_table(
cache->context,
cache->gpos.table.context);
71 unsigned int *script_index)
73 static const unsigned int fallback_scripts[] =
75 DWRITE_MAKE_OPENTYPE_TAG(
'D',
'F',
'L',
'T'),
76 DWRITE_MAKE_OPENTYPE_TAG(
'd',
'f',
'l',
't'),
77 DWRITE_MAKE_OPENTYPE_TAG(
'l',
'a',
't',
'n'),
83 while (scripts && *scripts)
92 scripts = fallback_scripts;
104 DWORD language,
unsigned int *language_index)
111 script_index, language_index)))
119 unsigned int i = features->
count;
162 if (user_features &&
context->user_features.range_lengths)
164 unsigned int flags =
context->user_features.range_count == 1 &&
167 for (
i = 0;
i <
context->user_features.range_count; ++
i)
171 user_features[
i]->features[
j].parameter);
178 for (
i = 1,
j = 0;
i < features->
count; ++
i)
237 { DWRITE_MAKE_OPENTYPE_TAG(
'a',
'b',
'v',
'm') },
238 { DWRITE_MAKE_OPENTYPE_TAG(
'b',
'l',
'w',
'm') },
242 static const unsigned int horizontal_features[] =
244 DWRITE_MAKE_OPENTYPE_TAG(
'c',
'u',
'r',
's'),
245 DWRITE_MAKE_OPENTYPE_TAG(
'd',
'i',
's',
't'),
246 DWRITE_MAKE_OPENTYPE_TAG(
'k',
'e',
'r',
'n'),
249 unsigned int script_index, language_index,
script,
i;
267 if (
cache->gpos.table.data)
283 if (
context->u.pos.glyph_props[
i].isZeroWidthSpace)
292 unsigned int table,
unsigned int *script_index,
unsigned int *language_index)
299 unsigned int language =
context->language_tag;
310 static const unsigned int common_features[] =
312 DWRITE_MAKE_OPENTYPE_TAG(
'c',
'c',
'm',
'p'),
313 DWRITE_MAKE_OPENTYPE_TAG(
'l',
'o',
'c',
'l'),
314 DWRITE_MAKE_OPENTYPE_TAG(
'r',
'l',
'i',
'g'),
316 static const unsigned int horizontal_features[] =
318 DWRITE_MAKE_OPENTYPE_TAG(
'c',
'a',
'l',
't'),
319 DWRITE_MAKE_OPENTYPE_TAG(
'c',
'l',
'i',
'g'),
320 DWRITE_MAKE_OPENTYPE_TAG(
'l',
'i',
'g',
'a'),
321 DWRITE_MAKE_OPENTYPE_TAG(
'r',
'c',
'l',
't'),
323 unsigned int script_index, language_index;
343 if (
context->shaper->collect_features)
378 unsigned int i,
j, script_index, language_index;
391 *actual_tagcount = 0;
398 for (
i = 1,
j = 0;
i <
t.count; ++
i)
400 if (
t.tags[
i] !=
t.tags[
j])
401 t.tags[++
j] =
t.tags[
i];
405 if (
t.count <= max_tagcount)
408 *actual_tagcount =
t.count;
416 unsigned int tag,
unsigned int glyph_count,
const UINT16 *glyphs,
UINT8 *feature_applies)
420 unsigned int script_index, language_index;
423 memset(feature_applies, 0, glyph_count *
sizeof(*feature_applies));
431 glyphs, feature_applies))
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static DWORD shape_select_language(const struct scriptshaping_cache *cache, DWORD kind, unsigned int script_index, DWORD language, unsigned int *language_index)
void shape_start_next_stage(struct shaping_features *features, stage_func func)
void release_scriptshaping_cache(struct scriptshaping_cache *cache)
static void shape_set_shaper(struct scriptshaping_context *context)
static int __cdecl tag_array_sorting_compare(const void *a, const void *b)
static void default_shaper_setup_masks(struct scriptshaping_context *context, const struct shaping_features *features)
static const struct shaper default_shaper
void shape_enable_feature(struct shaping_features *features, unsigned int tag, unsigned int flags)
struct scriptshaping_cache * create_scriptshaping_cache(void *context, const struct shaping_font_ops *font_ops)
HRESULT shape_get_glyphs(struct scriptshaping_context *context, const unsigned int *scripts)
static unsigned int shape_get_script_lang_index(struct scriptshaping_context *context, const unsigned int *scripts, unsigned int table, unsigned int *script_index, unsigned int *language_index)
static void shape_merge_features(struct scriptshaping_context *context, struct shaping_features *features)
void shape_add_feature_full(struct shaping_features *features, unsigned int tag, unsigned int flags, unsigned int value)
static void shape_add_feature(struct shaping_features *features, unsigned int tag)
static unsigned int shape_select_script(const struct scriptshaping_cache *cache, DWORD kind, const unsigned int *scripts, unsigned int *script_index)
HRESULT shape_get_typographic_features(struct scriptshaping_context *context, const unsigned int *scripts, unsigned int max_tagcount, unsigned int *actual_tagcount, DWRITE_FONT_FEATURE_TAG *tags)
static int __cdecl features_sorting_compare(const void *a, const void *b)
HRESULT shape_check_typographic_feature(struct scriptshaping_context *context, const unsigned int *scripts, unsigned int tag, unsigned int glyph_count, const UINT16 *glyphs, UINT8 *feature_applies)
HRESULT shape_get_positions(struct scriptshaping_context *context, const unsigned int *scripts)
_ACRTIMP void __cdecl qsort(void *, size_t, size_t, int(__cdecl *)(const void *, const void *))
struct nls_table * tables
const struct shaper arabic_shaper
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)
unsigned int opentype_layout_find_language(const struct scriptshaping_cache *cache, unsigned int kind, DWORD tag, unsigned int script_index, unsigned int *language_index)
void opentype_get_typographic_features(struct ot_gsubgpos_table *table, unsigned int script_index, unsigned int language_index, struct tag_array *tags)
void opentype_layout_apply_gpos_features(struct scriptshaping_context *context, unsigned int script_index, unsigned int language_index, struct shaping_features *features)
void opentype_layout_apply_gsub_features(struct scriptshaping_context *context, unsigned int script_index, unsigned int language_index, struct shaping_features *features)
unsigned int opentype_layout_find_script(const struct scriptshaping_cache *cache, unsigned int kind, DWORD tag, unsigned int *script_index)
static BOOL dwrite_array_reserve(void **elements, size_t *capacity, size_t count, size_t size)
void opentype_layout_scriptshaping_cache_init(struct scriptshaping_cache *cache)
void(* stage_func)(struct scriptshaping_context *context, const struct shaping_features *features)
@ SCRIPT_JUSTIFY_CHARACTER
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
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 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)
INTERNETFEATURELIST feature
static __inline const char * debugstr_fourcc(unsigned int cc)
struct shaping_feature * features
struct shaping_stage stages[MAX_SHAPING_STAGE]
#define E_NOT_SUFFICIENT_BUFFER