src/hb-ot-shape.cc


Log

Author Commit Date CI Message
Behdad Esfahbod 8de20b1e 2014-01-02T14:30:45 Add font->has_glyph()
Behdad Esfahbod 5497a8a2 2013-12-22T20:48:53 Cache various masks on the shape plan
Behdad Esfahbod a7e8bbb0 2013-12-22T19:33:35 Minor fraction mask setting improvement
Behdad Esfahbod 76fff252 2013-12-22T17:55:59 Don't form fractions if only one of numr/dnom exist
Behdad Esfahbod 3aeee519 2013-12-22T16:17:54 Bug 72698 - Automatically support frac / numr / dnom When seeing U+2044 FRACTION SLASH in the text, find decimal digits (Unicode General Category Decimal_Number) around it, and mark the pre-slash digits with 'numr' feature, the post-slash digits with 'dnom' feature, and the whole sequence with 'frac' feature. This beautifully renders fractions with major Windows fonts, and any other font that implements those features (numr/dnom is enough for most fonts.) Not the fastest way to do this, but good enough for a start.
Behdad Esfahbod 73932517 2013-12-21T00:18:18 Initialize masks before mirroring We were throwing away the rtlm feature mask set during mirroring...
Behdad Esfahbod 71b4c999 2013-10-28T00:20:59 Revert "Zero marks by GDEF for Tibetan" This reverts commit d5bd0590ae2fbc7b0dee86385a565aef00ffb835. The reasoning behind that logic was flawed and made under a misunderstanding of the original problem, and caused regressions as reported by Jonathan Kew in thread titled "tibetan marks" in Oct 2013. Apparently I have had fixed the original problem with this commit: 7e08f1258da229dfaf7e1c4b5c41e5bb83906cb0 So, revert the faulty commit and everything seems to be in good shape.
Behdad Esfahbod ac8cd511 2013-10-18T19:33:09 Refactor
Behdad Esfahbod d5bd0590 2013-10-18T16:44:54 Zero marks by GDEF for Tibetan See: http://lists.freedesktop.org/archives/harfbuzz/2013-April/003101.html
Behdad Esfahbod a1f7b285 2013-10-18T01:09:08 [otlayout] Switch over from old is_a_ligature() to IS_LIGATED Impact should be minimal and positive.
Behdad Esfahbod 101303db 2013-10-18T00:42:39 [otlayout] More shuffling around
Behdad Esfahbod 91689de2 2013-10-18T00:21:59 [otlayout] Add _hb_glyph_info_set_glyph_props() No functional change.
Behdad Esfahbod 3ddf892b 2013-10-18T00:02:43 [otlayout] Renaming
Behdad Esfahbod 3d2c4f0c 2013-09-27T17:06:29 Fix hiding of default_ignorables if font doesn't have space glyph Based on patch from Jonathan Kew. See discussion on the list.
Behdad Esfahbod 4b011094 2013-09-13T20:17:42 Move code around I believe I didn't break anything...
Behdad Esfahbod d71c0df2 2013-08-09T09:28:32 Remove vrt2, vkrn, vpal, and valt from default vertical features See thread by John Dagget on the list.
Behdad Esfahbod d785fa0c 2013-05-20T09:18:52 Minor refactoring
Behdad Esfahbod 127daf15 2013-05-20T09:11:35 Arabic mark width-zeroing regression Mozilla Bug 873902 - Display Arabic text with diacritics is bad https://bugzilla.mozilla.org/show_bug.cgi?id=873902
Behdad Esfahbod ba87b8fc 2013-02-21T15:23:39 Move code around
Behdad Esfahbod c462b32d 2013-02-15T07:51:47 Disable automatic segment properties guessing Before, if one called hb_shape() without setting script, language, and direction on the buffer, hb_shape() was calling hb_buffer_guess_segment_properties() on the user's behalf to guess these. This is very dangerous, since any serious user of HarfBuzz must set these properly (specially important is direction). So now, we don't guess properties by default. People not setting direction will get an abort() now. If the old behavior is desired (fragile, good for simple testing only), users can call hb_buffer_guess_segment_properties() on the buffer just before calling hb_shape().
Behdad Esfahbod 038c98f6 2013-02-15T07:41:07 Allow disabling of TrueType kerning Responds to the same feature tag that GPOS kerning does: 'kern' for horizontal and 'vkrn' for vertical.
Behdad Esfahbod ee9c3a17 2013-02-15T06:22:26 Minor refactoring
Behdad Esfahbod ec544866 2013-02-14T11:25:10 Add hb_ot_map_feature_flags_t Code cleanup. No (intended) functional change.
Behdad Esfahbod e7ffcfaf 2013-02-14T11:05:56 Clean-up add_bool_feature
Behdad Esfahbod 0291a652 2013-02-13T05:57:24 Further adjust mark advance zeroing This is a followup to 568000274c8edb5f41bc4f876ce21fcc8bdaeed8. Looks like in the Latin shaper, Uniscribe zeroes all Unicode NSM advances *after* GPOS, not before. Match that. Can be tested using DejaVu Sans Mono, since that font has GPOS rules to zero the mark advances on its own.
Behdad Esfahbod 56800027 2013-02-12T09:44:57 Adjust mark advance-width zeroing logic for Myanmar Before, we were zeroing advance width of attached marks for non-Indic scripts, and not doing it for Indic. We have now three different behaviors, which seem to better reflect what Uniscribe is doing: - For Indic, no explicit zeroing happens whatsoever, which is the same as before, - For Myanmar, zero advance width of glyphs marked as marks *in GDEF*, and do that *before* applying GPOS. This seems to be what the new Win8 Myanmar shaper does, - For everything else, zero advance width of glyphs that are from General_Category=Mn Unicode characters, and do so before applying GPOS. This seems to be what Uniscribe does for Latin at least. With these changes, positioning of all tests matches for Myanmar, except for the glitch in Uniscribe not applying 'mark'. See preivous commit.
Behdad Esfahbod 51bb498b 2012-11-16T14:08:05 Minor
Behdad Esfahbod 5a08ecf9 2012-11-16T13:34:29 Implement hb_ot_layout_get_glyph_class()
Behdad Esfahbod eba312c8 2012-11-16T12:39:23 Plumbing to get shape plan and font into complex decompose function So we can handle Sinhala split matras smartly... Coming soon.
Behdad Esfahbod 3f82f8ff 2012-11-15T18:45:31 Rename hb_buffer_guess_properties() to hb_buffer_guess_segment_properties()
Behdad Esfahbod f3064103 2012-11-15T18:39:46 Bunch of independent changes (ouch) API additions: hb_segment_properties_t HB_SEGMENT_PROPERTIES_DEFAULT hb_segment_properties_equal() hb_segment_properties_hash() hb_buffer_set_segment_properties() hb_buffer_get_segment_properties() hb_ot_layout_glyph_class_t hb_shape_plan_t hb_shape_plan_create() hb_shape_plan_create_cached() hb_shape_plan_get_empty() hb_shape_plan_reference() hb_shape_plan_destroy() hb_shape_plan_set_user_data() hb_shape_plan_get_user_data() hb_shape_plan_execute() hb_ot_shape_plan_collect_lookups() API changes: Rename hb_ot_layout_feature_get_lookup_indexes() to hb_ot_layout_feature_get_lookups(). New header file: hb-shape-plan.h And a bunch of prototyped but not implemented stuff. Coming soon. (Tests fail because of the prototypes right now.)
Behdad Esfahbod aec89de5 2012-11-15T16:15:42 Add / modify set API a bit
Behdad Esfahbod 865745b5 2012-11-14T13:48:26 Don't do fallback positioning for Indic and Thai shapers
Behdad Esfahbod 0c7df222 2012-11-13T14:42:35 Add buffer flags New API: hb_buffer_flags_t HB_BUFFER_FLAGS_DEFAULT HB_BUFFER_FLAG_BOT HB_BUFFER_FLAG_EOT HB_BUFFER_FLAG_PRESERVE_DEFAULT_IGNORABLES hb_buffer_set_flags() hb_buffer_get_flags() We use the BOT flag to decide whether to insert dottedcircle if the first char in the buffer is a combining mark. The PRESERVE_DEFAULT_IGNORABLES flag prevents removal of characters like ZWNJ/ZWJ/...
Behdad Esfahbod 0736915b 2012-11-13T12:35:35 [Indic] Decompose Sinhala split matras the way old HarfBuzz / Pango did Had to do some refactoring to make this happen... Under uniscribe bug compatibility mode, we still plit them Uniscrie-style, but Jonathan and I convinced ourselves that there is no harm doing this the Unicode way. This change makes that happen, and unbreaks free Sinhala fonts.
Behdad Esfahbod 9b37b4c5 2012-11-12T18:23:38 Make planner available to complex shaper choosing logic
Behdad Esfahbod cf3afd89 2012-10-25T16:32:54 Rename and revamp is_zero_width() to be is_default_ignorable() That's really the logic desired. Except that MONGOLIAN VOWEL SEPARATOR is not default_ignorable but it really should be. Reported to Unicode. Based on suggestion from Konstantin Ritt.
Behdad Esfahbod fecdfa95 2012-10-07T17:19:58 Fixup hb_ot_shape_closure() Broke it when merged cmap mapping and normalizer. Ouch!
Behdad Esfahbod f2eb3fa9 2012-09-25T21:35:35 [OT] Only insert dottedcircle if at the beginning of paragraph If the first char in the run is a combining mark, but there is text before the run, don't insert dottedcircle. Part of addressing: https://bugzilla.redhat.com/show_bug.cgi?id=858736
Behdad Esfahbod 028a1706 2012-09-06T14:25:48 Refactor common macro
Behdad Esfahbod fabd3113 2012-09-05T22:19:28 [OT] Port Arabic fallback shaping to synthetic GSUB All of init/medi/fina/isol and rlig implemented. Let there be dragons... ⻯
Behdad Esfahbod 6912e476 2012-09-01T20:38:45 [OT] Insert dotted-circle for run-initial marks Unfortunately if the font has GPOS and 'mark' feature does not position mark on dotted-circle, our inserted dotted-circle will not get the mark repositioned to itself. Uniscribe cheats here. If there is no GPOS however, the fallback positioning kicks in and sorts this out. I'm not willing to address the first case.
Behdad Esfahbod 3992b5ec 2012-09-01T19:20:41 Move code around
Behdad Esfahbod 784f29d0 2012-08-31T14:06:26 Minor
Behdad Esfahbod 0ccf9b64 2012-08-29T11:53:26 Move code around
Behdad Esfahbod 2fcbbdb4 2012-08-29T11:11:54 Port Arabic fallback ligating to share code with GSUB This will eventually allow us to skip marks, as well as (fallback) attach marks to ligature components of fallback-shaped Arabic. That would be pretty cool. I kludged GDEF props in, so mark-skipping works, but the produced ligature id/components will be cleared later by substitute_start() et al. Perhaps using a synthetic table for Arabic fallback shaping was a better idea. The current approach has way too many layering violations...
Behdad Esfahbod 9f9f04c2 2012-08-11T18:34:13 [OT] Unbreak Thai shaping and fallback Arabic shaping The merger of normalizer and glyph-mapping broke shapers that modified text stream. Unbreak them by adding a new preprocess_text shaping stage that happens before normalizing/cmap and disallow setup_mask modification of actual text.
Behdad Esfahbod 07d68280 2012-08-10T03:28:50 Minor
Behdad Esfahbod b00321ea 2012-08-09T22:33:32 [OT] Avoid calling get_glyph() twice Essentially move the glyph mapping to normalization process. The effect on Devanagari is small (but observable). Should be more observable in simple text, like ASCII.
Behdad Esfahbod 12c0875e 2012-08-09T22:00:53 [OT] Remove redundant check
Behdad Esfahbod 5c60b70c 2012-08-09T21:58:07 [OT] More code shuffling around Preparing for merging map_glyphs() and normalize().
Behdad Esfahbod a02d8648 2012-08-08T18:04:29 Add check-exported-symbols.sh And misc linking fixes.
Behdad Esfahbod 4c8ac4f4 2012-08-08T17:44:19 Misc minor fixes
Behdad Esfahbod 9c929abd 2012-08-08T14:33:37 Minor renaming
Behdad Esfahbod affaf8a0 2012-08-07T22:41:38 [OT] Start adding fallback positioning Used when there is no GPOS.
Behdad Esfahbod 7e4920fd 2012-08-07T22:32:23 Minor
Behdad Esfahbod f4e48adc 2012-08-07T21:12:49 [OT] Apply 'rclt' feature in horizontal mode 'rclt' is "Required Contextual Forms" being proposed by Microsoft. It's like 'calt', but supposedly always on. We apply 'calt' anyway, and now apply this too.
Behdad Esfahbod 71baea00 2012-08-03T17:40:07 [OT] Use general-category, not GDEF class, to decide to zero mark advances At this point, the GDEF glyph synthesis looks pointless. Not that I have many fonts without GDEF lying around. As for mark advance zeroing when GPOS not available, that also is being replaced by proper fallback mark positioning soon.
Behdad Esfahbod a8c6da90 2012-08-02T10:46:34 [OT] Add per-complex-shaper shape_plan data Hookup some Indic data to it. More to come.
Behdad Esfahbod 8bb5deba 2012-08-02T10:07:58 [OT] Pipe shape_plan down to pause_callbacks
Behdad Esfahbod 16c6a27b 2012-08-02T09:38:28 [OT] Port complex_shaper to planner/plan
Behdad Esfahbod 5393e3a6 2012-08-02T09:24:35 [OT] Minor refactoring
Behdad Esfahbod afbcc24b 2012-08-02T08:36:40 [GSUB] Wire the font, not just the face, down to substitute() We need the font for glyph lookup during GSUB pauses in Indic shaper. Could perhaps be avoided, but at this point, we don't mean to support separate substitute()/position() entry points (anymore), so there is no point in not providing the font to GSUB.
Behdad Esfahbod 8fbfda92 2012-08-01T19:03:46 Inline font getters
Behdad Esfahbod 208f70f0 2012-08-01T17:13:10 Inline Unicode callbacks internally
Behdad Esfahbod 1e7d8606 2012-07-31T23:41:06 [GPOS] Adjust mark advance-width zeroing logic If there is no GPOS, zero mark advances. If there *is* GPOS and the shaper requests so, zero mark advances for attached marks. Fixes regression with Tibetan, where the font has GPOS, and marks a glyph as mark where it shouldn't get zero advance.
Behdad Esfahbod 2bc3b9a6 2012-07-31T23:08:25 [OT] Zero mark advances if the shaper desires so Enabled for all shapers except for Indic.
Behdad Esfahbod 5fecd8b0 2012-07-31T22:48:38 [OT] Synthesize glyph classes
Behdad Esfahbod 693918ef 2012-07-30T21:08:51 [OT] Streamline complex shaper enumeration Add a shaper class struct.
Behdad Esfahbod 05bd1b63 2012-07-30T19:30:01 [GSUB/GPOS] Move glyph props matching around
Behdad Esfahbod 7e34601d 2012-07-30T14:53:41 Unbreak Hangul jamo composition When we removed the separate Hangul shaper, the specific normalization preference of Hangul was lost. Fix that. Also, the Thai shaper was copied from Hangul, so had the fully-composed normalization behavior, which was unnecessary. So, fix that too.
Behdad Esfahbod 4ba647ee 2012-07-30T09:53:06 Fix leak
Behdad Esfahbod e82061e8 2012-07-27T02:29:32 Move ot shaper completely to shape_plan
Behdad Esfahbod ea278d38 2012-07-27T02:12:28 Partially switch ot shaper to shape_plan
Behdad Esfahbod 5b95c148 2012-07-26T23:46:53 Start implementing shape_plan
Behdad Esfahbod bd26b4d2 2012-07-26T22:05:39 Minor
Behdad Esfahbod 027857d0 2012-07-26T17:34:25 Start adding a unified shaper access infrastructure Add global shape_plan. Unused so far.
Behdad Esfahbod b70021f7 2012-07-23T20:18:17 When removing zero-width marks, don't remove ligatures If a mark ligated, it probably should NOT be removed.
Behdad Esfahbod d96838ef 2012-07-16T20:26:57 Allow complex shapers overriding common features In a new callback... Currently unused by all complex shapers.
Behdad Esfahbod 330a2af3 2012-06-08T20:40:02 Use merge_clusters when forming Unicode clusters
Behdad Esfahbod 5f68f867 2012-06-08T19:23:43 Minor
Behdad Esfahbod 0594a244 2012-06-05T20:35:40 Cleanup TRUE/FALSE vs true/false
Behdad Esfahbod 99c26957 2012-05-13T15:45:18 Add accessort to buffer for current info, current pos, and prev info
Behdad Esfahbod d1deaa2f 2012-05-09T15:04:13 Replace zerowidth invisible chars with a zero-advance space glyph Like Uniscribe does.
Behdad Esfahbod 1827dc20 2012-04-24T16:56:37 Add hb_ot_shape_glyphs_closure() Experimental API for now.
Behdad Esfahbod a4385f0b 2012-04-23T22:20:14 Improve clustering
Behdad Esfahbod a5f1834f 2012-04-16T15:55:13 Apply 'liga' for vertical writing mode too Apparently that's what Kazuraki uses to form vertical ligatures, which suggests that it's what Adobe does.
Behdad Esfahbod 683b503f 2012-04-14T20:47:14 Minor
Behdad Esfahbod b9f199c8 2012-04-14T20:23:58 Move code around
Behdad Esfahbod d4adade2 2012-04-14T19:23:17 Add assert
Behdad Esfahbod 6bd9b479 2012-04-12T14:53:53 Hide backend-specific shape functions Also remove shaper_options argument to hb_shape_full(). That was unused and for "future". Let it go. More shaper API coming in preparation for plan/planned API.
Behdad Esfahbod 0e336146 2012-04-12T10:06:52 Fix bug with not setting Unicode props of the first character Fixes Mongolian shaping issue: https://bugs.freedesktop.org/show_bug.cgi?id=45695
Behdad Esfahbod acd88e65 2012-04-10T18:02:20 In Arabic fallback shaping, check that the font has glyph for new char
Behdad Esfahbod 7752aa73 2012-04-10T17:22:14 Minor
Behdad Esfahbod 11138ccf 2012-04-05T17:25:19 Add normalize mode In preparation for Hangul shaper.
Behdad Esfahbod 6769f21d 2012-04-05T16:46:46 More moving code around
Behdad Esfahbod 0501573d 2011-08-10T16:25:56 Fix const correctness in the API
Behdad Esfahbod 02aeca98 2011-08-04T22:31:05 [API] Changes to main shape API hb_shape() now accepts a shaper_options and a shaper_list argument. Both can be set to NULL to emulate previous API. And in most situations they are expected to be set to NULL. hb_shape() also returns a boolean for now. If shaper_list is NULL, the return value can be ignored. shaper_options is ignored for now, but otherwise it should be a NULL-terminated list of strings. shaper_list is a NULL-terminated list of strings. Currently recognized strings are "ot" for native OpenType Layout implementation, "uniscribe" for the Uniscribe backend, and "fallback" for the non-complex backend (that will be implemented shortly). The fallback backend never fails. The env var HB_SHAPER_LIST is also parsed and honored. It's a colon-separated list of shaper names. The fallback shaper is invoked if none of the env-listed shapers succeed. New API hb_buffer_guess_properties() added.
Behdad Esfahbod c605bbbb 2011-08-04T20:00:53 Remove C++ guards from source files Where causing issues for people with MSVC.
Behdad Esfahbod 2118fdb9 2011-08-02T14:06:51 Fix fallback shaping Broke it a few commits ago.