src/hb-coretext.cc


Log

Author Commit Date CI Message
Behdad Esfahbod e302b9d5 2022-11-26T15:18:16 Fix build
Behdad Esfahbod 4499ae02 2022-06-28T15:43:57 [coretext] Fix positioning of out-of-order glyphs Unfortunately this now generates negative advances. To be fixed...
Behdad Esfahbod 58d2e930 2022-06-28T15:38:58 [coretext] Fix up clusters only if needed
Behdad Esfahbod c90130e6 2022-06-28T13:30:44 [coretext] Remove old hack now that font layer takes care... of invalidating font data when font settings change.
Behdad Esfahbod 19cbfb9c 2022-06-27T12:32:18 [glyf] Relax a condition that font num_coords be equal to gvar's gvar itself still checks the same.
Behdad Esfahbod e9c0a740 2022-06-15T16:57:16 Fix clang -Wcomma warnings Fixes https://github.com/harfbuzz/harfbuzz/issues/3656
Behdad Esfahbod 1ffe637a 2022-03-21T10:37:42 [coretext] Remove dead code Fixes https://github.com/harfbuzz/harfbuzz/issues/3484
Behdad Esfahbod 20031ddb 2022-01-22T11:41:30 [unsafe-to-concat] Mark in all other shapers unsafe_to_break() implies unsafe-to-concat; but setting the flag manually wasn't.
Behdad Esfahbod 376738d4 2022-01-19T11:46:21 [coretext] Fix lsearch
Behdad Esfahbod 94d43c00 2021-12-04T16:56:39 [buffer] Merge and rename clear_glyph_flags()
Behdad Esfahbod e80c86ff 2021-08-04T10:24:14 [coretext] Fix formatting
Simon Cozens 66aef281 2021-08-04T13:34:52 Support passing variations to coretext shaper
Behdad Esfahbod d3dd9363 2021-06-14T12:31:02 [coretext] Round position info Test: Before: $ ./hb-shape /System/Library/Fonts/ヒラギノ丸ゴ\ ProN\ W4.ttc 1 --features="+palt" --shaper=coretext [gid781=0@-78,0+841] $ ./hb-shape /System/Library/Fonts/ヒラギノ丸ゴ\ ProN\ W4.ttc 1 --features="+palt" --shaper=ot [gid781=0@-78,0+842] After: $ ./hb-shape /System/Library/Fonts/ヒラギノ丸ゴ\ ProN\ W4.ttc 1 --features="+palt" --shaper=coretext [gid781=0@-78,0+842] $ ./hb-shape /System/Library/Fonts/ヒラギノ丸ゴ\ ProN\ W4.ttc 1 --features="+palt" --shaper=ot [gid781=0@-78,0+842] I've verified in the font that 842 is correct.
Behdad Esfahbod 7cb22ba7 2021-03-01T12:44:06 Include C headers with their C++ names (#2882) Remove unnecessary includes. Fixes build with some known broken SDKs (Nintendo Switch?) https://en.cppreference.com/w/cpp/header Fixes https://github.com/harfbuzz/harfbuzz/pull/2881
Behdad Esfahbod 6a9f576f 2021-02-17T11:31:32 [coretext] Silence CoreText deprecation warning As suggested by Ned, just ignoring it. warning: 'CTGetCoreTextVersion' is deprecated: first deprecated in macOS 11.0 - Use -[NSProcessInfo operatingSystemVersion] [-Wdeprecated-declarations]
Behdad Esfahbod 8e53c7c1 2021-02-17T11:12:56 [coretext] Fix more CGFloat double-promotion warnings The warning is: warning: implicit conversion increases floating-point precision: 'CGFloat' (aka 'float') to 'double' [-Wdouble-promotion]
Khaled Hosny 3d7a3616 2020-12-30T23:58:37 [docs] Miscellaneous missing docs
Khaled Hosny 5c8900ef 2020-06-08T02:29:04 [coretext] Properly check for macOS 10.10 Fixes https://github.com/harfbuzz/harfbuzz/issues/2452
René Meusel d6ddb232 2020-04-28T19:30:00 FIX: -Wextra-semi-stmt in Clang9
Behdad Esfahbod a11db0b9 2020-04-23T15:32:43 Merge branch 'master' into usermanual-integration
Khaled Hosny 68c1798a 2019-12-18T15:57:14 [coretext] Use kCTFontOpenTypeFeatureTag Instead of trying to map OpenType features to AAT feature selectors which only works for a small subset of OpenType features, use the simpler kCTFontOpenTypeFeatureTag with OpenType feature tags directly. With this change, features like cvXX can be enabled in coretext shaper, while they were previously ignored due to missing mapping. This seems to work even with AAT fonts that don’t have OpenType layout tables, which suggests that CoreText is doing the mapping itself in this case. kCTFontOpenTypeFeatureTag seems to have been introduced in macOS 10.10 and iOS 8.0, though, so its use is conditional on version check for now. Not sure how to check iOS version, so I left this out.
Ebrahim Byagowi f3214df6 2019-09-14T10:56:00 [coretext] Fix double promotion warnings by making casts explicit
Ebrahim Byagowi a0b4ac4d 2019-08-24T17:57:14 Turn 8 spaces to tab across the project According to the current code style of the project
Ebrahim Byagowi 37de38ad 2019-08-20T12:59:33 Merge branch 'master' into remove-coretext-96dpi-assumption
Ebrahim Byagowi 9fea6b4d 2019-07-05T18:46:41 [amalgam] Use it in cmake port and fix conflicts (#1812)
Misty De Meo e7108881 2019-06-18T15:20:38 coretext: remove trailing macro from SCRATCH_RESTORE
Behdad Esfahbod 10bac21b 2019-06-18T15:15:06 [coretext/uniscribe/directwrite] Remove extra semicolons Fixes https://github.com/harfbuzz/harfbuzz/pull/1783
Behdad Esfahbod aa3450ca 2019-06-17T22:41:49 [config] Don't compile disabled features This makes it possible to include all .cc files into build, even if not building CoreText, Uniscribe, etc. This was mostly to help custom builders. But also means that we can include all files in our own build system. Not sure if we should. Definitely simplifies things, but slightly only.
Nathan Willis 32ae0d3e 2019-05-20T17:35:39 [Docs] Add gtk-doc comments to hb-coretext.
Behdad Esfahbod 68e12e68 2019-05-13T17:28:59 Fix more semi-colon issues
Behdad Esfahbod 2fb3a832 2019-05-10T18:40:29 [vector] Simplify arrayZ Was turned into function when we had static ones and wanted to be move-safe... Not the case anymore.
Behdad Esfahbod 0601a19d 2019-05-08T07:47:36 Fix a few more double-pomotion errors
Behdad Esfahbod 41248cce 2019-05-07T20:54:31 Remove MIN/MAX in favor of hb_min/hb_max
Behdad Esfahbod 95df00ae 2019-04-12T17:50:03 Hide a few static methods Looks like static methods that do not get inlined end up exported. We have a lot more. Need to protect all at some point. Wish there was an easier way, like the visibility flag we pass that automatically hides all inline methods. Was exposed by check-symbols.sh when compiling on OS X 10.14 with: $ make CPPFLAGS=-Oz CXXFLAGS=-flto=thin LDFLAGS=-lc++
Behdad Esfahbod c5509be9 2019-04-08T14:50:58 [coretext] Fix unused-variable error Fixes https://github.com/harfbuzz/harfbuzz/issues/1659
Ebrahim Byagowi ba4b7be4 2019-03-31T01:32:30 Remove coretext_aat shaper (#1581) coretext_aat was a temporary shaper to redirect shaping of AAT fonts to CoreText and leaving the rest for HarfBuzz. As HarfBuzz now supports AAT and Chrome now actually ships that on a stable version on macOS, we no longer care about such use-case. If a client really wants 100% metrics compatibility with CoreText better to use it directly or through our API. Replicating the same behavior still is possible using hb_shape_full, something we don't care or like to offer anymore. Fixes https://github.com/harfbuzz/harfbuzz/issues/1478
Ken fdfa3d29 2019-02-10T23:46:05 hb-coretext.cc: remove TARGET_OS_MAC from test (#1578) it is always true when building on APPLE systems and this file only builds on APPLE systems
Ken Cunningham 7859decd 2019-02-05T20:26:49 hb-coretext.cc: clean up macosx test TARGET_OS_OSX was introduced only in late OS versions so always returns as "0" on older systems. if !TARGET_OS_IPHONE can work, as it returns as !0 on older systems where TARGET_OS_IPHONE is not defined, but is not specific if TARGET_OS_MAC && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) is both specific and accurate on all systems.
Tor Arne Vestbø f401f85a 2018-12-17T00:48:35 Remove assumption about Core Text working in 96 DPI Core Text doesn't actually have a concept of DPI internally, as it doesn't rasterize anything by itself, it just generates vector paths that get passed along to Core Graphics. In practice this means Core Text operates in the classical macOS logical DPI of 72, with one typographic point corresponding to one point in the Core Graphics coordinate system, which for a normal bitmap context then corresponds to one pixel -- or two pixels for a "retina" context with a 2x scale transform. Scaling the font point sizes given to HarfBuzz to an assumed DPI of 96 is problematic with this in mind, as fonts with optical features such as 'trak' tables for tracking, or color glyphs, will then base the metrics off of the wrong point size compared to what the client asked for. This in turn causes mismatches between the metrics of the shaped text and the actual rasterization, which doesn't include the 72 to 96 DPI scaling. If a 96 DPI is needed, such as on the Web, the scaling should be done outside of HarfBuzz, allowing the client to keep the DPI of the shaping in sync with the rasterization. The recommended way to do that is by scaling the font point size, not by applying a transform to the target Core Graphics context, to let Core Text choose the right optical features of the target point size, as described in WWDC 2015 session 804: https://developer.apple.com/videos/play/wwdc2015/804/
Behdad Esfahbod 474a1205 2018-12-21T18:46:51 [array/vector] Rename len to length
Ebrahim Byagowi e4120085 2018-12-17T21:31:01 Remove redundant void from C++ sources (#1486)
Ebrahim Byagowi d0a250a7 2018-12-04T23:42:13 Reuse hb_aat_layout_has_* logic in coretext-aat detection logic (#1442)
Behdad Esfahbod 27a6b0a2 2018-11-29T16:29:30 Fix build for realz
Behdad Esfahbod ac026471 2018-11-29T15:07:44 [coretext] Fix compile Fingers crossed.
Behdad Esfahbod 50d1a41c 2018-11-16T08:52:57 [coretext] Hopefully the last one
Behdad Esfahbod 0aab861f 2018-11-16T08:43:25 [coretext] Another round
Behdad Esfahbod 0809b76a 2018-11-16T08:29:47 [coretext] One more try..
Behdad Esfahbod 78bd4475 2018-11-16T04:10:53 [coretext] One more try
Behdad Esfahbod fd27a23c 2018-11-16T03:57:12 [coretext] Another build fix attemt
Behdad Esfahbod cfb9771a 2018-11-16T03:24:22 [coretext] Try to fix
Behdad Esfahbod e3e95473 2018-11-16T02:55:29 [coretext] Unbreak build
Behdad Esfahbod ce5da0f3 2018-11-16T02:29:13 [shaper] Rewrite shaper data code to be more template-driven than macro-driven
Behdad Esfahbod f521a28b 2018-11-11T21:32:01 Embed hb_ot_shape_plan_t into hb_shape_plan_t No other shaper will need shape_plan_data, by definition. So, remove abstraction layer and always create hb_ot_shape_plan_t as part of hb_shape_plan_t.
Behdad Esfahbod 1beacdde 2018-11-11T16:35:28 Minor
Behdad Esfahbod 93ef20a8 2018-11-03T15:03:06 Replace most uses of is_inert with is_immutable
Behdad Esfahbod 3a4e5dd4 2018-10-29T18:05:25 Remove a few unnecessary hb_auto_t<>'s See a85641446c30247c4e948263f0f8c1147ed4efb9
Behdad Esfahbod 04981ee0 2018-10-27T04:40:43 [docs] More
Behdad Esfahbod 955aa56b 2018-10-25T16:50:38 [vector] Make it act more like pointer Add pointer cast operator and plus operator.
Bruce Mitchener 8d1e479d 2018-10-18T22:18:42 Use bool literals instead of 0/1.
Behdad Esfahbod e0c5e0d9 2018-10-13T18:37:14 [aat] WIP remove feature mapping here from hb-coretext Need to map enum values to numerics since we don't have CoreText headers.
Behdad Esfahbod cb057749 2018-10-13T17:03:32 [coretext] Prepare AAT feature mapping to be moved
Behdad Esfahbod b2e398c0 2018-10-07T16:31:33 [coretext] Fix OS X check Fixes https://github.com/harfbuzz/harfbuzz/issues/1230
Behdad Esfahbod 0816a549 2018-10-06T02:40:57 [uniscribe/coretext] Fix for previous change
Behdad Esfahbod 03fb6dd4 2018-10-03T21:02:16 Rewrite grapheme-formation in terms of new work Also, don't attach ZWNJ to previous cluster. Closer to Unicode graphemes.
Behdad Esfahbod 824111d4 2018-09-25T12:47:37 Fix iOS build Fixes https://github.com/harfbuzz/harfbuzz/pull/1179
Behdad Esfahbod 7671cb9b 2018-09-19T17:10:26 [coretext] Minor
Behdad Esfahbod 606bf574 2018-09-16T19:33:48 Revert forcing use of single-parameter static_assert() Some clang versions define static_assert as a macro apparently, so we cannot redefine it... This reverts commit 94bfea0ce6a7b4d5641c198d50751748a353df11. This reverts commit 4e62627831e7457ed60ff87712570065b14b200a.
Behdad Esfahbod 4e626278 2018-09-16T18:09:36 Enforce single-param static_assert() only So we don't accidentally break it again.
Behdad Esfahbod c77ae408 2018-08-25T22:36:36 Rename hb-*private.hh to hb-*.hh Sorry for the noise, downstream custom builders. Please adjust.
Behdad Esfahbod 652cd45c 2018-08-09T01:02:02 [coretext] Another try
Behdad Esfahbod 3f3585ca 2018-08-09T00:58:17 Fix coretext build (hopefully)
Behdad Esfahbod 3d22aefe 2018-08-01T18:03:32 Rename
Behdad Esfahbod be458eb0 2018-07-10T14:41:04 Include more basic internal headers from hb-private.hh
Behdad Esfahbod f7515769 2018-06-01T17:48:37 [vector] Use Crap pool in push() as well
Behdad Esfahbod 65aeabd6 2018-05-23T16:15:28 Add hb_vector_t::push(const Type &v) Makes for cleaner code.
Ebrahim Byagowi 93bdf9b2 2018-05-09T23:24:17 Use arrayZ on hb-coretext and hb-uniscribe and fix macOS/Win bots (#1024) Following to 63f57f4
Behdad Esfahbod 37b95612 2018-05-01T19:09:00 Remove hb_auto_array_t Part of https://github.com/harfbuzz/harfbuzz/issues/1017
Ebrahim Byagowi 8b0d642e 2018-04-23T18:37:35 Resolve some of clang's zero-as-null-pointer-constant warnings
Ebrahim Byagowi f24b0b97 2018-04-12T13:40:45 Update the links and revive the dead ones
Ryan Schmidt 58e569e5 2018-04-05T17:03:36 Fix build with CoreText on OS X 10.7 and earlier (#952)
David Corbett 21646cc4 2018-02-16T12:08:55 Do not mark the first glyph as unsafe to break Fixes #791.
Bruce Mitchener dae20fb5 2018-01-31T20:16:08 Use nullptr instead of 0.
Bruce Mitchener 90218fa9 2018-01-31T20:44:45 Fix typos.
Bruce Mitchener 0c66043a 2018-01-31T20:24:27 [coretext] Fix memory leaks. In `reference_table`, if the data is empty and we return early, we still need to release the data object. In `hb_coretext_shape`, there two edge cases where an early return should release the attributed string.
Behdad Esfahbod 1245395a 2017-12-17T12:32:33 [coretext] In hb_coretext_font_create() set ptem Otherwise setting the CTFont was ineffective as it would have been recreated anyway unless font size was set to 18 CSS points.
Behdad Esfahbod d5e29303 2017-11-28T23:11:34 [coretext] Add hb_coretext_font_create() Fixes https://github.com/harfbuzz/harfbuzz/issues/628 New API: hb_coretext_font_create()
ebraminio 7c6937e7 2017-11-20T14:49:22 Move all references of old url to the new address (#622)
Behdad Esfahbod e4da3802 2017-11-10T17:14:27 [coretext/uniscribe/directwrite/graphite/fallback] Update for unsafe-to-break Fixes https://github.com/behdad/harfbuzz/issues/615 We'll see which bots I broke.
Behdad Esfahbod 40ec3bbb 2017-11-03T16:57:30 Consolidate debug stuff into hb-debug.hh Part of fixing https://github.com/behdad/harfbuzz/pull/605
Behdad Esfahbod 98acdde3 2017-10-31T11:17:43 [coretext/uniscribe] Fix build https://travis-ci.org/behdad/harfbuzz/jobs/295039536#L3468 https://ci.appveyor.com/project/behdad/harfbuzz/build/1.0.697/job/dr1ujlntxafeqbej#L142
Behdad Esfahbod 80cc0a7e 2017-10-17T11:14:48 [coretext] Fix build error: static_assert expression is not an integral constant expression
Behdad Esfahbod dbdbfe3d 2017-10-15T12:11:08 Use nullptr instead of NULL
Behdad Esfahbod c3448e8d 2017-10-15T12:02:00 Use static_assert instead of custom ASSERT_STATIC
Behdad Esfahbod c2cf68db 2017-10-13T10:30:19 [coretext] Fix build
Behdad Esfahbod 95883fc5 2017-10-13T10:21:07 [coretext] Pass correct font size to CoreText CoreText "point"s are not typographic points, but CSS pixels. Ie. they are 96 per inch, not 72 per inch.
Behdad Esfahbod 8923033e 2017-10-12T12:01:48 [coretext] Use fabs() to silence compiler warning
Dominik Röttsches dd4b321b 2017-10-12T11:49:37 [coretext] Activate tracking for system fonts Another attempt at fully fixing https://github.com/behdad/harfbuzz/issues/360
Behdad Esfahbod 6a2cbc6e 2017-10-12T10:46:09 [coretext] Use fabsf() instead of abs() Fixes bots. Link libharfbuzz.so with -lm. Surprising that we survived without it so far!
Behdad Esfahbod e1b6d923 2017-10-11T15:51:31 Remove cast of functions to (hb_destroy_func_t) Fixes https://github.com/behdad/harfbuzz/issues/474
Behdad Esfahbod 717fcb51 2017-10-11T15:38:21 [coretext] Minor