提交 fc0153a1 编写于 作者: M Michiharu Ariza

Merge branch 'master' into cff-subset

......@@ -155,6 +155,10 @@ HB_BUFFER_SERIALIZE_FLAGS_DEFAULT
HB_SCRIPT_CANADIAN_ABORIGINAL
hb_font_funcs_set_glyph_func
hb_font_get_glyph_func_t
hb_ot_layout_table_choose_script
hb_ot_layout_table_find_script
hb_ot_tag_from_language
hb_ot_tags_from_script
hb_set_invert
hb_unicode_eastasian_width_func_t
hb_unicode_eastasian_width
......@@ -497,12 +501,12 @@ hb_ot_layout_lookups_substitute_closure
hb_ot_layout_lookup_would_substitute
hb_ot_layout_script_find_language
hb_ot_layout_script_get_language_tags
hb_ot_layout_table_choose_script
hb_ot_layout_script_select_language
hb_ot_layout_table_find_feature_variations
hb_ot_layout_table_find_script
hb_ot_layout_table_get_feature_tags
hb_ot_layout_table_get_script_tags
hb_ot_layout_table_get_lookup_count
hb_ot_layout_table_select_script
hb_ot_shape_plan_collect_lookups
hb_ot_layout_language_get_required_feature_index
<SUBSECTION Private>
......@@ -550,12 +554,14 @@ hb_ot_math_get_glyph_assembly
<SECTION>
<FILE>hb-ot-tag</FILE>
HB_OT_MAX_TAGS_PER_LANGUAGE
HB_OT_MAX_TAGS_PER_SCRIPT
HB_OT_TAG_DEFAULT_LANGUAGE
HB_OT_TAG_DEFAULT_SCRIPT
hb_ot_tag_from_language
hb_ot_tag_to_language
hb_ot_tag_to_script
hb_ot_tags_from_script
hb_ot_tags_from_script_and_language
hb_ot_tags_to_script_and_language
</SECTION>
<SECTION>
......
......@@ -291,11 +291,12 @@ GENERATORS = \
gen-emoji-table.py \
gen-indic-table.py \
gen-os2-unicode-ranges.py \
gen-tag-table.py \
gen-use-table.py \
$(NULL)
EXTRA_DIST += $(GENERATORS)
unicode-tables: arabic-table indic-table use-table emoji-table
unicode-tables: arabic-table indic-table tag-table use-table emoji-table
arabic-table: gen-arabic-table.py ArabicShaping.txt UnicodeData.txt Blocks.txt
$(AM_V_GEN) $(builddir)/$^ > $(srcdir)/hb-ot-shape-complex-arabic-table.hh \
......@@ -305,6 +306,10 @@ indic-table: gen-indic-table.py IndicSyllabicCategory.txt IndicPositionalCategor
$(AM_V_GEN) $(builddir)/$^ > $(srcdir)/hb-ot-shape-complex-indic-table.cc \
|| ($(RM) $(srcdir)/hb-ot-shape-complex-indic-table.cc; false)
tag-table: gen-tag-table.py languagetags language-subtag-registry
$(AM_V_GEN) $(builddir)/$^ > $(srcdir)/hb-ot-tag-table.hh \
|| ($(RM) $(srcdir)/hb-ot-tag-table.hh; false)
use-table: gen-use-table.py IndicSyllabicCategory.txt IndicPositionalCategory.txt UnicodeData.txt Blocks.txt
$(AM_V_GEN) $(builddir)/$^ > $(srcdir)/hb-ot-shape-complex-use-table.cc \
|| ($(RM) $(srcdir)/hb-ot-shape-complex-use-table.cc; false)
......@@ -315,7 +320,7 @@ emoji-table: gen-emoji-table.py emoji-data.txt
built-sources: $(BUILT_SOURCES)
.PHONY: unicode-tables arabic-table indic-table use-table emoji-table built-sources
.PHONY: unicode-tables arabic-table indic-table tag-table use-table emoji-table built-sources
RAGEL_GENERATED = \
$(patsubst %,$(srcdir)/%,$(HB_BASE_RAGEL_GENERATED_sources)) \
......
......@@ -43,6 +43,7 @@ HB_BASE_sources = \
hb-ot-os2-unicode-ranges.hh \
hb-ot-post-macroman.hh \
hb-ot-post-table.hh \
hb-ot-tag-table.hh \
hb-ot-tag.cc \
hb.hh \
hb-set-digest.hh \
......
此差异已折叠。
......@@ -164,7 +164,7 @@ struct LookupFormat4
}
protected:
HBUINT16 format; /* Format identifier--format = 2 */
HBUINT16 format; /* Format identifier--format = 4 */
VarSizedBinSearchArrayOf<LookupSegmentArray<T> >
segments; /* The actual segments. These must already be sorted,
* according to the first word in each one (the last
......@@ -187,7 +187,7 @@ struct LookupSingle
GlyphID glyph; /* Last GlyphID */
T value; /* The lookup value (only one) */
public:
DEFINE_SIZE_STATIC (4 + T::static_size);
DEFINE_SIZE_STATIC (2 + T::static_size);
};
template <typename T>
......@@ -386,6 +386,8 @@ struct StateTable
const HBUINT16 *states = (this+stateArrayTable).arrayZ;
const Entry<Extra> *entries = (this+entryTable).arrayZ;
unsigned int num_classes = nClasses;
unsigned int num_states = 1;
unsigned int num_entries = 0;
......@@ -393,13 +395,16 @@ struct StateTable
unsigned int entry = 0;
while (state < num_states)
{
if (unlikely (hb_unsigned_mul_overflows (num_classes, states[0].static_size)))
return_trace (false);
if (unlikely (!c->check_array (states,
num_states,
states[0].static_size * nClasses)))
num_classes * states[0].static_size)))
return_trace (false);
{ /* Sweep new states. */
const HBUINT16 *stop = &states[num_states * nClasses];
for (const HBUINT16 *p = &states[state * nClasses]; p < stop; p++)
const HBUINT16 *stop = &states[num_states * num_classes];
for (const HBUINT16 *p = &states[state * num_classes]; p < stop; p++)
num_entries = MAX<unsigned int> (num_entries, *p + 1);
state = num_states;
}
......
......@@ -996,7 +996,7 @@ hb_buffer_get_script (hb_buffer_t *buffer)
* are orthogonal to the scripts, and though they are related, they are
* different concepts and should not be confused with each other.
*
* Use hb_language_from_string() to convert from ISO 639 language codes to
* Use hb_language_from_string() to convert from BCP 47 language tags to
* #hb_language_t.
*
* Since: 0.9.2
......
......@@ -325,14 +325,14 @@ retry:
/**
* hb_language_from_string:
* @str: (array length=len) (element-type uint8_t): a string representing
* ISO 639 language code
* a BCP 47 language tag
* @len: length of the @str, or -1 if it is %NULL-terminated.
*
* Converts @str representing an ISO 639 language code to the corresponding
* Converts @str representing a BCP 47 language tag to the corresponding
* #hb_language_t.
*
* Return value: (transfer none):
* The #hb_language_t corresponding to the ISO 639 language code.
* The #hb_language_t corresponding to the BCP 47 language tag.
*
* Since: 0.9.2
**/
......
......@@ -211,6 +211,29 @@ hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
hb_direction_t direction,
hb_position_t *x, hb_position_t *y);
/* Like hb_ot_layout_table_find_script, but takes zero-terminated array of scripts to test */
HB_EXTERN HB_DEPRECATED hb_bool_t
hb_ot_layout_table_choose_script (hb_face_t *face,
hb_tag_t table_tag,
const hb_tag_t *script_tags,
unsigned int *script_index,
hb_tag_t *chosen_script);
HB_EXTERN HB_DEPRECATED hb_bool_t
hb_ot_layout_script_find_language (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_index,
hb_tag_t language_tag,
unsigned int *language_index);
HB_EXTERN HB_DEPRECATED void
hb_ot_tags_from_script (hb_script_t script,
hb_tag_t *script_tag_1,
hb_tag_t *script_tag_2);
HB_EXTERN HB_DEPRECATED hb_tag_t
hb_ot_tag_from_language (hb_language_t language);
#endif
......
......@@ -33,6 +33,8 @@
#include <graphite2/Segment.h>
#include "hb-ot-tag.h"
HB_SHAPER_DATA_ENSURE_DEFINE(graphite2, face)
HB_SHAPER_DATA_ENSURE_DEFINE(graphite2, font)
......@@ -277,11 +279,16 @@ _hb_graphite2_shape (hb_shape_plan_t *shape_plan,
/* TODO ensure_native_direction. */
hb_tag_t script_tag[2];
hb_ot_tags_from_script (hb_buffer_get_script (buffer), &script_tag[0], &script_tag[1]);
hb_tag_t script_tag[HB_OT_MAX_TAGS_PER_SCRIPT];
unsigned int count = HB_OT_MAX_TAGS_PER_SCRIPT;
hb_ot_tags_from_script_and_language (hb_buffer_get_script (buffer),
HB_LANGUAGE_INVALID,
&count,
script_tag,
nullptr, nullptr);
seg = gr_make_seg (nullptr, grface,
script_tag[1] == HB_TAG_NONE ? script_tag[0] : script_tag[1],
count ? script_tag[count - 1] : HB_OT_TAG_DEFAULT_SCRIPT,
feats,
gr_utf32, chars, buffer->len,
2 | (hb_buffer_get_direction (buffer) == HB_DIRECTION_RTL ? 1 : 0));
......
......@@ -833,7 +833,7 @@ struct VarSizedBinSearchArrayOf
{
TRACE_SANITIZE (this);
return_trace (header.sanitize (c) &&
Type::static_size >= header.unitSize &&
Type::static_size <= header.unitSize &&
c->check_array (bytesZ.arrayZ, header.nUnits, header.unitSize));
}
......
......@@ -973,22 +973,22 @@ struct CursivePosFormat1
hb_buffer_t *buffer = c->buffer;
const EntryExitRecord &this_record = entryExitRecord[(this+coverage).get_coverage (buffer->cur().codepoint)];
if (!this_record.exitAnchor) return_trace (false);
if (!this_record.entryAnchor) return_trace (false);
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
skippy_iter.reset (buffer->idx, 1);
if (!skippy_iter.next ()) return_trace (false);
if (!skippy_iter.prev ()) return_trace (false);
const EntryExitRecord &next_record = entryExitRecord[(this+coverage).get_coverage (buffer->info[skippy_iter.idx].codepoint)];
if (!next_record.entryAnchor) return_trace (false);
const EntryExitRecord &prev_record = entryExitRecord[(this+coverage).get_coverage (buffer->info[skippy_iter.idx].codepoint)];
if (!prev_record.exitAnchor) return_trace (false);
unsigned int i = buffer->idx;
unsigned int j = skippy_iter.idx;
unsigned int i = skippy_iter.idx;
unsigned int j = buffer->idx;
buffer->unsafe_to_break (i, j);
float entry_x, entry_y, exit_x, exit_y;
(this+this_record.exitAnchor).get_anchor (c, buffer->info[i].codepoint, &exit_x, &exit_y);
(this+next_record.entryAnchor).get_anchor (c, buffer->info[j].codepoint, &entry_x, &entry_y);
(this+prev_record.exitAnchor).get_anchor (c, buffer->info[i].codepoint, &exit_x, &exit_y);
(this+this_record.entryAnchor).get_anchor (c, buffer->info[j].codepoint, &entry_x, &entry_y);
hb_glyph_position_t *pos = buffer->pos;
......@@ -1035,7 +1035,7 @@ struct CursivePosFormat1
* parent.
*
* Optimize things for the case of RightToLeft, as that's most common in
* Arabinc. */
* Arabic. */
unsigned int child = i;
unsigned int parent = j;
hb_position_t x_offset = entry_x - exit_x;
......@@ -1064,7 +1064,7 @@ struct CursivePosFormat1
else
pos[child].x_offset = x_offset;
buffer->idx = j;
buffer->idx++;
return_trace (true);
}
......
......@@ -367,18 +367,37 @@ hb_ot_layout_table_choose_script (hb_face_t *face,
const hb_tag_t *script_tags,
unsigned int *script_index,
hb_tag_t *chosen_script)
{
const hb_tag_t *t;
for (t = script_tags; *t; t++);
return hb_ot_layout_table_select_script (face, table_tag, t - script_tags, script_tags, script_index, chosen_script);
}
/**
* hb_ot_layout_table_select_script:
*
* Since: REPLACEME
**/
hb_bool_t
hb_ot_layout_table_select_script (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_count,
const hb_tag_t *script_tags,
unsigned int *script_index /* OUT */,
hb_tag_t *chosen_script /* OUT */)
{
static_assert ((OT::Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_NO_SCRIPT_INDEX), "");
const OT::GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
unsigned int i;
while (*script_tags)
for (i = 0; i < script_count; i++)
{
if (g.find_script_index (*script_tags, script_index)) {
if (g.find_script_index (script_tags[i], script_index))
{
if (chosen_script)
*chosen_script = *script_tags;
*chosen_script = script_tags[i];
return true;
}
script_tags++;
}
/* try finding 'DFLT' */
......@@ -463,14 +482,34 @@ hb_ot_layout_script_find_language (hb_face_t *face,
unsigned int script_index,
hb_tag_t language_tag,
unsigned int *language_index)
{
return hb_ot_layout_script_select_language (face, table_tag, script_index, 1, &language_tag, language_index);
}
/**
* hb_ot_layout_script_select_language:
*
* Since: REPLACEME
**/
hb_bool_t
hb_ot_layout_script_select_language (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_index,
unsigned int language_count,
const hb_tag_t *language_tags,
unsigned int *language_index /* OUT */)
{
static_assert ((OT::Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX), "");
const OT::Script &s = get_gsubgpos_table (face, table_tag).get_script (script_index);
unsigned int i;
if (s.find_lang_sys_index (language_tag, language_index))
return true;
for (i = 0; i < language_count; i++)
{
if (s.find_lang_sys_index (language_tags[i], language_index))
return true;
}
/* try with 'dflt'; MS site has had typos and many fonts use it now :( */
/* try finding 'dflt' */
if (s.find_lang_sys_index (HB_OT_TAG_DEFAULT_LANGUAGE, language_index))
return false;
......@@ -743,11 +782,12 @@ _hb_ot_layout_collect_features_languages (hb_face_t *face,
for (; *languages; languages++)
{
unsigned int language_index;
if (hb_ot_layout_script_find_language (face,
table_tag,
script_index,
*languages,
&language_index))
if (hb_ot_layout_script_select_language (face,
table_tag,
script_index,
1,
languages,
&language_index))
_hb_ot_layout_collect_features_features (face,
table_tag,
script_index,
......
......@@ -111,13 +111,13 @@ hb_ot_layout_table_find_script (hb_face_t *face,
hb_tag_t script_tag,
unsigned int *script_index);
/* Like find_script, but takes zero-terminated array of scripts to test */
HB_EXTERN hb_bool_t
hb_ot_layout_table_choose_script (hb_face_t *face,
hb_ot_layout_table_select_script (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_count,
const hb_tag_t *script_tags,
unsigned int *script_index,
hb_tag_t *chosen_script);
unsigned int *script_index /* OUT */,
hb_tag_t *chosen_script /* OUT */);
HB_EXTERN unsigned int
hb_ot_layout_table_get_feature_tags (hb_face_t *face,
......@@ -135,11 +135,12 @@ hb_ot_layout_script_get_language_tags (hb_face_t *face,
hb_tag_t *language_tags /* OUT */);
HB_EXTERN hb_bool_t
hb_ot_layout_script_find_language (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_index,
hb_tag_t language_tag,
unsigned int *language_index);
hb_ot_layout_script_select_language (hb_face_t *face,
hb_tag_t table_tag,
unsigned int script_index,
unsigned int language_count,
const hb_tag_t *language_tags,
unsigned int *language_index /* OUT */);
HB_EXTERN hb_bool_t
hb_ot_layout_language_get_required_feature_index (hb_face_t *face,
......
......@@ -54,16 +54,17 @@ hb_ot_map_builder_t::hb_ot_map_builder_t (hb_face_t *face_,
/* Fetch script/language indices for GSUB/GPOS. We need these later to skip
* features not available in either table and not waste precious bits for them. */
hb_tag_t script_tags[3] = {HB_TAG_NONE, HB_TAG_NONE, HB_TAG_NONE};
hb_tag_t language_tag;
unsigned int script_count = HB_OT_MAX_TAGS_PER_SCRIPT;
unsigned int language_count = HB_OT_MAX_TAGS_PER_LANGUAGE;
hb_tag_t script_tags[HB_OT_MAX_TAGS_PER_SCRIPT];
hb_tag_t language_tags[HB_OT_MAX_TAGS_PER_LANGUAGE];
hb_ot_tags_from_script (props.script, &script_tags[0], &script_tags[1]);
language_tag = hb_ot_tag_from_language (props.language);
hb_ot_tags_from_script_and_language (props.script, props.language, &script_count, script_tags, &language_count, language_tags);
for (unsigned int table_index = 0; table_index < 2; table_index++) {
hb_tag_t table_tag = table_tags[table_index];
found_script[table_index] = (bool) hb_ot_layout_table_choose_script (face, table_tag, script_tags, &script_index[table_index], &chosen_script[table_index]);
hb_ot_layout_script_find_language (face, table_tag, script_index[table_index], language_tag, &language_index[table_index]);
found_script[table_index] = (bool) hb_ot_layout_table_select_script (face, table_tag, script_count, script_tags, &script_index[table_index], &chosen_script[table_index]);
hb_ot_layout_script_select_language (face, table_tag, script_index[table_index], language_count, language_tags, &language_index[table_index]);
}
}
......
......@@ -611,6 +611,7 @@ modifier_combining_marks[] =
0x06E3u, /* ARABIC SMALL LOW SEEN */
0x06E7u, /* ARABIC SMALL HIGH YEH */
0x06E8u, /* ARABIC SMALL HIGH NOON */
0x08D3u, /* ARABIC SMALL LOW WAW */
0x08F3u, /* ARABIC SMALL HIGH WAW */
};
......
......@@ -375,6 +375,25 @@ final_reordering (const hb_ot_shape_plan_t *plan,
}
const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar =
{
collect_features_myanmar,
override_features_myanmar,
nullptr, /* data_create */
nullptr, /* data_destroy */
nullptr, /* preprocess_text */
nullptr, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
nullptr, /* decompose */
nullptr, /* compose */
setup_masks_myanmar,
HB_TAG_NONE, /* gpos_tag */
nullptr, /* reorder_marks */
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY,
false, /* fallback_position */
};
/* Uniscribe seems to have a shaper for 'mymr' that is like the
* generic shaper, except that it zeros mark advances GDEF_LATE. */
const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar_old =
......@@ -395,20 +414,24 @@ const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar_old =
true, /* fallback_position */
};
const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar =
/* Ugly Zawgyi encoding.
* Disable all auto processing.
* https://github.com/harfbuzz/harfbuzz/issues/1162 */
const hb_ot_complex_shaper_t _hb_ot_complex_shaper_myanmar_zawgyi =
{
collect_features_myanmar,
override_features_myanmar,
nullptr, /* collect_features */
nullptr, /* override_features */
nullptr, /* data_create */
nullptr, /* data_destroy */
nullptr, /* preprocess_text */
nullptr, /* postprocess_glyphs */
HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
HB_OT_SHAPE_NORMALIZATION_MODE_NONE,
nullptr, /* decompose */
nullptr, /* compose */
setup_masks_myanmar,
nullptr, /* setup_masks */
HB_TAG_NONE, /* gpos_tag */
nullptr, /* reorder_marks */
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY,
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
false, /* fallback_position */
};
......@@ -58,6 +58,7 @@ enum hb_ot_shape_zero_width_marks_type_t {
HB_COMPLEX_SHAPER_IMPLEMENT (khmer) \
HB_COMPLEX_SHAPER_IMPLEMENT (myanmar) \
HB_COMPLEX_SHAPER_IMPLEMENT (myanmar_old) \
HB_COMPLEX_SHAPER_IMPLEMENT (myanmar_zawgyi) \
HB_COMPLEX_SHAPER_IMPLEMENT (thai) \
HB_COMPLEX_SHAPER_IMPLEMENT (use) \
/* ^--- Add new shapers here */
......@@ -254,11 +255,13 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
/* If the designer designed the font for the 'DFLT' script,
* (or we ended up arbitrarily pick 'latn'), use the default shaper.
* Otherwise, use the specific shaper.
* Note that for some simple scripts, there may not be *any*
* GSUB/GPOS needed, so there may be no scripts found! */
*
* If it's indy3 tag, send to USE. */
if (planner->map.chosen_script[0] == HB_TAG ('D','F','L','T') ||
planner->map.chosen_script[0] == HB_TAG ('l','a','t','n'))
return &_hb_ot_complex_shaper_default;
else if ((planner->map.chosen_script[0] & 0x000000FF) == '3')
return &_hb_ot_complex_shaper_use;
else
return &_hb_ot_complex_shaper_indic;
......@@ -372,6 +375,10 @@ hb_ot_shape_complex_categorize (const hb_ot_shape_planner_t *planner)
return &_hb_ot_complex_shaper_default;
else
return &_hb_ot_complex_shaper_use;
/* https://github.com/harfbuzz/harfbuzz/issues/1162 */
case HB_SCRIPT_MYANMAR_ZAWGYI:
return &_hb_ot_complex_shaper_myanmar_zawgyi;
}
}
......
此差异已折叠。
此差异已折叠。
......@@ -39,20 +39,39 @@ HB_BEGIN_DECLS
#define HB_OT_TAG_DEFAULT_SCRIPT HB_TAG ('D', 'F', 'L', 'T')
#define HB_OT_TAG_DEFAULT_LANGUAGE HB_TAG ('d', 'f', 'l', 't')
/**
* HB_OT_MAX_TAGS_PER_SCRIPT:
*
* Since: REPLACEME
**/
#define HB_OT_MAX_TAGS_PER_SCRIPT 3u
/**
* HB_OT_MAX_TAGS_PER_LANGUAGE:
*
* Since: REPLACEME
**/
#define HB_OT_MAX_TAGS_PER_LANGUAGE 3u
HB_EXTERN void
hb_ot_tags_from_script (hb_script_t script,
hb_tag_t *script_tag_1,
hb_tag_t *script_tag_2);
hb_ot_tags_from_script_and_language (hb_script_t script,
hb_language_t language,
unsigned int *script_count /* IN/OUT */,
hb_tag_t *script_tags /* OUT */,
unsigned int *language_count /* IN/OUT */,
hb_tag_t *language_tags /* OUT */);
HB_EXTERN hb_script_t
hb_ot_tag_to_script (hb_tag_t tag);
HB_EXTERN hb_tag_t
hb_ot_tag_from_language (hb_language_t language);
HB_EXTERN hb_language_t
hb_ot_tag_to_language (hb_tag_t tag);
HB_EXTERN void
hb_ot_tags_to_script_and_language (hb_tag_t script_tag,
hb_tag_t language_tag,
hb_script_t *script /* OUT */,
hb_language_t *language /* OUT */);
HB_END_DECLS
......
......@@ -44,7 +44,7 @@ HB_BEGIN_DECLS
* HB_UNICODE_MAX
*
* Since: 1.9.0
*/
**/
#define HB_UNICODE_MAX 0x10FFFFu
......
......@@ -478,6 +478,14 @@ _hb_memalign(void **memptr, size_t alignment, size_t size)
#endif
/*
* For lack of a better place, put Zawgyi script hack here.
* https://github.com/harfbuzz/harfbuzz/issues/1162
*/
#define HB_SCRIPT_MYANMAR_ZAWGYI ((hb_script_t) HB_TAG ('Q','a','a','g'))
/* Headers we include for everyone. Keep sorted. They express dependency amongst
* themselves, but no other file should include them.*/
#include "hb-atomic.hh"
......
......@@ -58,10 +58,8 @@ hb_subset_test_open_font (const char *font_path)
hb_blob_t *blob = hb_blob_create_from_file (path);
if (hb_blob_get_length (blob) == 0)
{
printf ("The test font is not found.");
exit (1);
}
g_error ("Font not found.");
hb_face_t *face = hb_face_create (blob, 0);
hb_blob_destroy (blob);
......
......@@ -149,10 +149,7 @@ main (int argc, char **argv)
hb_blob_t *blob = hb_blob_create_from_file (path);
if (hb_blob_get_length (blob) == 0)
{
printf ("The test font is not found.");
return 1;
}
g_error ("Font not found.");
hb_face_t *face = hb_face_create (blob, 0);
font = hb_font_create (face);
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
../fonts/ab14b4eb9d7a67e293f51d30d719add06c9d6e06.ttf:--script=Qaag:U+1000,U+103A,U+1004,U+1037,U+1039,U+1041:[Ka=0+2217|Ya-Semivowel=0+286|Nga=2+1247|Dot Below=2+0|Virama-Killer=2+0|One-Myanmar=5+1247]
../fonts/3c96e7a303c58475a8c750bf4289bbe73784f37d.ttf::U+0C95,U+0CCD,U+0CB0:[uni0C95=0+1176|uni0CB0_uni0CCD.blwf=0+275]
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册