TODO | 2 git.mk | 58 ++++++---- src/hb-ot-layout-gpos-table.hh | 16 +- src/hb-ot-layout-gsub-table.hh | 24 ++-- src/hb-ot-layout-gsubgpos-private.hh | 33 +++++ src/hb-unicode-private.hh | 1 src/hb-uniscribe.cc | 2 src/hb-uniscribe.h | 2 test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt | 1 test/shaping/texts/in-tree/shaper-thai/MANIFEST | 2 test/shaping/texts/in-tree/shaper-thai/misc/MANIFEST | 1 test/shaping/texts/in-tree/shaper-thai/misc/misc.txt | 6 - test/shaping/texts/in-tree/shaper-thai/script-thai/MANIFEST | 1 test/shaping/texts/in-tree/shaper-thai/script-thai/misc/MANIFEST | 1 test/shaping/texts/in-tree/shaper-thai/script-thai/misc/sara-am.txt | 4 15 files changed, 106 insertions(+), 48 deletions(-)
New commits: commit 552bf3a9f9651311084b7979805dbdc18c0335ca Author: Behdad Esfahbod <beh...@behdad.org> Date: Wed Jul 11 16:44:51 2012 -0400 Bump WINNT version requested from 500 to 600 Since we use the OpenType versions of Uniscribe functions, we are relying on that version of the WINNT API. Otherwise, usp10.h will hide those symbols. diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc index b71b00a..e5b98a8 100644 --- a/src/hb-uniscribe.cc +++ b/src/hb-uniscribe.cc @@ -24,7 +24,7 @@ * Google Author(s): Behdad Esfahbod */ -#define _WIN32_WINNT 0x0500 +#define _WIN32_WINNT 0x0600 #include "hb-private.hh" diff --git a/src/hb-uniscribe.h b/src/hb-uniscribe.h index 216610e..bb99f39 100644 --- a/src/hb-uniscribe.h +++ b/src/hb-uniscribe.h @@ -29,7 +29,7 @@ #include "hb.h" -#define _WIN32_WINNT 0x0500 +#define _WIN32_WINNT 0x0600 #include <windows.h> HB_BEGIN_DECLS commit 9a5b421a64db1bb23d5c6ebbc3bf3f3a5513dc36 Author: Behdad Esfahbod <beh...@behdad.org> Date: Wed Jul 11 16:35:04 2012 -0400 Fix build with no Unicode funcs implementations provided diff --git a/src/hb-unicode-private.hh b/src/hb-unicode-private.hh index eaf151a..c781035 100644 --- a/src/hb-unicode-private.hh +++ b/src/hb-unicode-private.hh @@ -99,6 +99,7 @@ extern HB_INTERNAL const hb_unicode_funcs_t _hb_icu_unicode_funcs; #define _hb_unicode_funcs_default _hb_icu_unicode_funcs #else #define HB_UNICODE_FUNCS_NIL 1 +extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil; #define _hb_unicode_funcs_default _hb_unicode_funcs_nil #endif commit 6efe1eca660135096f05987ac0ef9b635de6cdfd Author: Behdad Esfahbod <beh...@behdad.org> Date: Wed Jul 11 15:30:08 2012 -0400 Update git.mk to upstream diff --git a/git.mk b/git.mk index ff5c0c3..4da8fe2 100644 --- a/git.mk +++ b/git.mk @@ -5,7 +5,7 @@ # Written by Behdad Esfahbod # # Copying and distribution of this file, with or without modification, -# are permitted in any medium without royalty provided the copyright +# is permitted in any medium without royalty provided the copyright # notice and this notice are preserved. # # The canonical source for this file is https://github.com/behdad/git.mk. @@ -42,8 +42,14 @@ # build dir. # # This file knows how to handle autoconf, automake, libtool, gtk-doc, -# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings. +# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu. # +# This makefile provides the following targets: +# +# - all: "make all" will build all gitignore files. +# - gitignore: makes all gitignore files in the current dir and subdirs. +# - .gitignore: make gitignore file for the current dir. +# - gitignore-recurse: makes all gitignore files in the subdirs. # # KNOWN ISSUES: # @@ -97,25 +103,31 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk ; do echo /$$x; done; \ fi; \ if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \ + for lc in $(DOC_LINGUAS); do \ + for x in \ + $(if $(DOC_MODULE),$(DOC_MODULE).xml) \ + $(DOC_PAGES) \ + $(DOC_INCLUDES) \ + ; do echo /$$lc/$$x; done; \ + done; \ for x in \ - $(_DOC_C_DOCS) \ - $(_DOC_LC_DOCS) \ $(_DOC_OMF_ALL) \ $(_DOC_DSK_ALL) \ $(_DOC_HTML_ALL) \ $(_DOC_MOFILES) \ - $(_DOC_POFILES) \ $(DOC_H_FILE) \ "*/.xml2po.mo" \ "*/*.omf.out" \ ; do echo /$$x; done; \ fi; \ if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ - for x in \ - $(_HELP_LC_FILES) \ - $(_HELP_LC_STAMPS) \ - $(_HELP_MOFILES) \ - ; do echo /$$x; done; \ + for lc in $(HELP_LINGUAS); do \ + for x in \ + $(HELP_FILES) \ + "$$lc.stamp" \ + "$$lc.mo" \ + ; do echo /$$lc/$$x; done; \ + done; \ fi; \ if test "x$(gsettings_SCHEMAS)" = x; then :; else \ for x in \ @@ -149,14 +161,19 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk config.lt \ ; do echo /$$x; done; \ fi; \ + if test "x$(DEJATOOL)" = x; then :; else \ + for x in \ + $(DEJATOOL) \ + ; do echo /$$x.sum; echo /$$x.log; done; \ + echo /site.exp; \ + fi; \ for x in \ .gitignore \ $(GITIGNOREFILES) \ $(CLEANFILES) \ - $(PROGRAMS) \ - $(check_PROGRAMS) \ - $(EXTRA_PROGRAMS) \ - $(LTLIBRARIES) \ + $(PROGRAMS) $(check_PROGRAMS) $(EXTRA_PROGRAMS) \ + $(LIBRARIES) $(check_LIBRARIES) $(EXTRA_LIBRARIES) \ + $(LTLIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LTLIBRARIES) \ so_locations \ .libs _libs \ $(MOSTLYCLEANFILES) \ @@ -186,18 +203,19 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk mv $@.tmp $@; all: $(srcdir)/.gitignore gitignore-recurse-maybe +gitignore: $(srcdir)/.gitignore gitignore-recurse + gitignore-recurse-maybe: - @if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \ - $(MAKE) $(AM_MAKEFLAGS) gitignore-recurse; \ - fi; -gitignore-recurse: @for subdir in $(DIST_SUBDIRS); do \ case " $(SUBDIRS) " in \ *" $$subdir "*) :;; \ - *) test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir");; \ + *) test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse-maybe || echo "Skipping $$subdir");; \ esac; \ done -gitignore: $(srcdir)/.gitignore gitignore-recurse +gitignore-recurse: + @for subdir in $(DIST_SUBDIRS); do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir"); \ + done maintainer-clean: gitignore-clean gitignore-clean: commit 727135f3a9938c1ebd5b9f5015a46c7ccc8573c5 Author: Behdad Esfahbod <beh...@behdad.org> Date: Tue Jul 3 22:15:35 2012 -0400 Towards templatizing common Lookup types diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index c8020d8..fa22934 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -1268,7 +1268,7 @@ struct ChainContextPos : ChainContext }; -struct ExtensionPos : Extension +struct ExtensionPos : Extension<struct GPOS> { friend struct PosLookupSubTable; @@ -1382,8 +1382,10 @@ struct PosLookupSubTable struct PosLookup : Lookup { - inline const PosLookupSubTable& get_subtable (unsigned int i) const - { return this+CastR<OffsetArrayOf<PosLookupSubTable> > (subTable)[i]; } + typedef struct PosLookupSubTable SubTable; + + inline const SubTable& get_subtable (unsigned int i) const + { return this+CastR<OffsetArrayOf<SubTable> > (subTable)[i]; } inline bool apply_once (hb_apply_context_t *c) const { @@ -1424,7 +1426,7 @@ struct PosLookup : Lookup inline bool sanitize (hb_sanitize_context_t *c) { TRACE_SANITIZE (); if (unlikely (!Lookup::sanitize (c))) return TRACE_RETURN (false); - OffsetArrayOf<PosLookupSubTable> &list = CastR<OffsetArrayOf<PosLookupSubTable> > (subTable); + OffsetArrayOf<SubTable> &list = CastR<OffsetArrayOf<SubTable> > (subTable); return TRACE_RETURN (list.sanitize (c, this, get_type ())); } }; @@ -1437,6 +1439,8 @@ typedef OffsetListOf<PosLookup> PosLookupList; struct GPOS : GSUBGPOS { + typedef struct PosLookup Lookup; + static const hb_tag_t Tag = HB_OT_TAG_GPOS; inline const PosLookup& get_lookup (unsigned int i) const @@ -1545,10 +1549,10 @@ inline bool ExtensionPos::apply (hb_apply_context_t *c) const inline bool ExtensionPos::sanitize (hb_sanitize_context_t *c) { TRACE_SANITIZE (); - if (unlikely (!Extension::sanitize (c))) return TRACE_RETURN (false); + if (unlikely (!Extension<GPOS>::sanitize (c))) return TRACE_RETURN (false); unsigned int offset = get_offset (); if (unlikely (!offset)) return TRACE_RETURN (true); - return TRACE_RETURN (StructAtOffset<PosLookupSubTable> (this, offset).sanitize (c, get_type ())); + return TRACE_RETURN (StructAtOffset<PosLookup::SubTable> (this, offset).sanitize (c, get_type ())); } static inline bool position_lookup (hb_apply_context_t *c, unsigned int lookup_index) diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index f5f38cc..06a8488 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -750,7 +750,7 @@ struct ChainContextSubst : ChainContext }; -struct ExtensionSubst : Extension +struct ExtensionSubst : Extension<struct GSUB> { friend struct SubstLookupSubTable; friend struct SubstLookup; @@ -1037,16 +1037,18 @@ struct SubstLookupSubTable struct SubstLookup : Lookup { - inline const SubstLookupSubTable& get_subtable (unsigned int i) const - { return this+CastR<OffsetArrayOf<SubstLookupSubTable> > (subTable)[i]; } + typedef struct SubstLookupSubTable SubTable; + + inline const SubTable& get_subtable (unsigned int i) const + { return this+CastR<OffsetArrayOf<SubTable> > (subTable)[i]; } inline static bool lookup_type_is_reverse (unsigned int lookup_type) - { return lookup_type == SubstLookupSubTable::ReverseChainSingle; } + { return lookup_type == SubTable::ReverseChainSingle; } inline bool is_reverse (void) const { unsigned int type = get_type (); - if (unlikely (type == SubstLookupSubTable::Extension)) + if (unlikely (type == SubTable::Extension)) return CastR<ExtensionSubst> (get_subtable(0)).is_reverse (); return lookup_type_is_reverse (type); } @@ -1087,7 +1089,7 @@ struct SubstLookup : Lookup /* TODO: For the most common case this can move out of the main * loop, but it's not a big deal for now. */ - if (unlikely (lookup_type == SubstLookupSubTable::Extension)) + if (unlikely (lookup_type == SubTable::Extension)) { /* The spec says all subtables should have the same type. * This is specially important if one has a reverse type! @@ -1155,7 +1157,7 @@ struct SubstLookup : Lookup inline bool sanitize (hb_sanitize_context_t *c) { TRACE_SANITIZE (); if (unlikely (!Lookup::sanitize (c))) return TRACE_RETURN (false); - OffsetArrayOf<SubstLookupSubTable> &list = CastR<OffsetArrayOf<SubstLookupSubTable> > (subTable); + OffsetArrayOf<SubTable> &list = CastR<OffsetArrayOf<SubTable> > (subTable); return TRACE_RETURN (list.sanitize (c, this, get_type ())); } }; @@ -1168,6 +1170,8 @@ typedef OffsetListOf<SubstLookup> SubstLookupList; struct GSUB : GSUBGPOS { + typedef struct SubstLookup Lookup; + static const hb_tag_t Tag = HB_OT_TAG_GSUB; inline const SubstLookup& get_lookup (unsigned int i) const @@ -1238,16 +1242,16 @@ inline bool ExtensionSubst::apply (hb_apply_context_t *c) const inline bool ExtensionSubst::sanitize (hb_sanitize_context_t *c) { TRACE_SANITIZE (); - if (unlikely (!Extension::sanitize (c))) return TRACE_RETURN (false); + if (unlikely (!Extension<GSUB>::sanitize (c))) return TRACE_RETURN (false); unsigned int offset = get_offset (); if (unlikely (!offset)) return TRACE_RETURN (true); - return TRACE_RETURN (StructAtOffset<SubstLookupSubTable> (this, offset).sanitize (c, get_type ())); + return TRACE_RETURN (StructAtOffset<GSUB::Lookup::SubTable> (this, offset).sanitize (c, get_type ())); } inline bool ExtensionSubst::is_reverse (void) const { unsigned int type = get_type (); - if (unlikely (type == SubstLookupSubTable::Extension)) + if (unlikely (type == SubstLookup::SubTable::Extension)) return CastR<ExtensionSubst> (get_subtable()).is_reverse (); return SubstLookup::lookup_type_is_reverse (type); } diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 98d4e0a..0e9d08a 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -298,6 +298,27 @@ static inline bool intersects_array (hb_closure_context_t *c, } +struct match_glyph_t { + inline bool operator() (hb_codepoint_t glyph_id, const USHORT &value, const void *data) + { + return glyph_id == value; + } +}; +struct match_class_t { + inline bool operator() (hb_codepoint_t glyph_id, const USHORT &value, const void *data) + { + const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data); + return class_def.get_class (glyph_id) == value; + } +}; +struct match_coverage_t { + inline bool operator() (hb_codepoint_t glyph_id, const USHORT &value, const void *data) + { + const OffsetTo<Coverage> &coverage = (const OffsetTo<Coverage>&)value; + return (data+coverage).get_coverage (glyph_id) != NOT_COVERED; + } +}; + static inline bool match_glyph (hb_codepoint_t glyph_id, const USHORT &value, const void *data HB_UNUSED) { return glyph_id == value; @@ -314,6 +335,7 @@ static inline bool match_coverage (hb_codepoint_t glyph_id, const USHORT &value, } +template <typename match_func_t> static inline bool match_input (hb_apply_context_t *c, unsigned int count, /* Including the first glyph (not matched) */ const USHORT input[], /* Array of input values--start with second glyph */ @@ -340,6 +362,7 @@ static inline bool match_input (hb_apply_context_t *c, return true; } +template <typename match_func_t> static inline bool match_backtrack (hb_apply_context_t *c, unsigned int count, const USHORT backtrack[], @@ -362,6 +385,7 @@ static inline bool match_backtrack (hb_apply_context_t *c, return true; } +template <typename match_func_t> static inline bool match_lookahead (hb_apply_context_t *c, unsigned int count, const USHORT lookahead[], @@ -1262,9 +1286,12 @@ struct ChainContext }; +template <typename Table> struct Extension; + +template <typename Table> struct ExtensionFormat1 { - friend struct Extension; + friend struct Extension<Table>; protected: inline unsigned int get_type (void) const { return extensionLookupType; } @@ -1286,6 +1313,7 @@ struct ExtensionFormat1 DEFINE_SIZE_STATIC (8); }; +template <typename Table> struct Extension { inline unsigned int get_type (void) const @@ -1315,7 +1343,8 @@ struct Extension private: union { USHORT format; /* Format identifier */ - ExtensionFormat1 format1; + ExtensionFormat1<Table> + format1; } u; }; commit 1167c7bfc9e61f145e11da4881968293a4d3c0a9 Author: Behdad Esfahbod <beh...@behdad.org> Date: Tue Jul 3 11:38:46 2012 -0400 Minor diff --git a/test/shaping/texts/in-tree/shaper-thai/MANIFEST b/test/shaping/texts/in-tree/shaper-thai/MANIFEST index b8752e7..22bc0ed 100644 --- a/test/shaping/texts/in-tree/shaper-thai/MANIFEST +++ b/test/shaping/texts/in-tree/shaper-thai/MANIFEST @@ -1 +1 @@ -misc +script-thai diff --git a/test/shaping/texts/in-tree/shaper-thai/misc/MANIFEST b/test/shaping/texts/in-tree/shaper-thai/misc/MANIFEST deleted file mode 100644 index 29cfb2f..0000000 --- a/test/shaping/texts/in-tree/shaper-thai/misc/MANIFEST +++ /dev/null @@ -1 +0,0 @@ -misc.txt diff --git a/test/shaping/texts/in-tree/shaper-thai/misc/misc.txt b/test/shaping/texts/in-tree/shaper-thai/misc/misc.txt deleted file mode 100644 index 51a47af..0000000 --- a/test/shaping/texts/in-tree/shaper-thai/misc/misc.txt +++ /dev/null @@ -1,6 +0,0 @@ -à¸à¹à¸³ -à¸à¹à¹à¸² -à¸à¹à¹à¸² -à¸à¸³ -ำ -à¸à¸´à¹ diff --git a/test/shaping/texts/in-tree/shaper-thai/script-thai/MANIFEST b/test/shaping/texts/in-tree/shaper-thai/script-thai/MANIFEST new file mode 100644 index 0000000..b8752e7 --- /dev/null +++ b/test/shaping/texts/in-tree/shaper-thai/script-thai/MANIFEST @@ -0,0 +1 @@ +misc diff --git a/test/shaping/texts/in-tree/shaper-thai/script-thai/misc/MANIFEST b/test/shaping/texts/in-tree/shaper-thai/script-thai/misc/MANIFEST new file mode 100644 index 0000000..ffd16f1 --- /dev/null +++ b/test/shaping/texts/in-tree/shaper-thai/script-thai/misc/MANIFEST @@ -0,0 +1 @@ +sara-am.txt diff --git a/test/shaping/texts/in-tree/shaper-thai/script-thai/misc/sara-am.txt b/test/shaping/texts/in-tree/shaper-thai/script-thai/misc/sara-am.txt new file mode 100644 index 0000000..6d385ef --- /dev/null +++ b/test/shaping/texts/in-tree/shaper-thai/script-thai/misc/sara-am.txt @@ -0,0 +1,4 @@ +ำ +à¸à¸³ +à¸à¹à¸³ +à¸à¹à¹à¸² commit aa116582e69d18777448e7993078e5d6335ddfed Author: Behdad Esfahbod <beh...@behdad.org> Date: Fri Jun 29 10:50:12 2012 -0400 Minor diff --git a/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt b/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt index 633058f..3edf054 100644 --- a/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt +++ b/test/shaping/texts/in-tree/shaper-indic/indic/script-malayalam/misc/misc.txt @@ -59,3 +59,4 @@ à´¸àµà´µà´¾à´¤à´¨àµà´¤àµà´°àµà´¯à´ ഹാരàµâà´¡àµâà´µàµà´¯à´°àµâ യാതàµà´°à´¾à´àµà´²à´¿ +à´¸àµà´ªàµà´°àµ commit 1f13c7185f02ea18d4fadd2ea8ad444bea863c39 Author: Behdad Esfahbod <beh...@behdad.org> Date: Wed Jun 27 10:07:27 2012 -0400 Add TODO item diff --git a/TODO b/TODO index 7b02c55..ed424ab 100644 --- a/TODO +++ b/TODO @@ -31,6 +31,8 @@ General fixes: - Add Old HarfBuzz API? +- Add namespace to avoid type clashes with Windows + API issues to fix before 1.0: ============================
_______________________________________________ HarfBuzz mailing list HarfBuzz@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/harfbuzz