Commit Graph

55 Commits

Author SHA1 Message Date
Ebrahim Byagowi f27fdca4aa
[doc] Add documentation to hb_color_get_* and hb_directwrite_face_* (#1690) 2019-04-30 13:01:04 -07:00
Ebrahim Byagowi b292772e6e
[dwrite] A new API, hb_directwrite_face_get_font_face (#1600)
Can be useful when using HarfBuzz for font loading and shaping
but using DirectWrite for rendering.
2019-03-29 13:00:56 -07:00
Behdad Esfahbod 59f36f3682 Replace REPLACEME's left out of 2.4.0
https://github.com/harfbuzz/harfbuzz/issues/1641
2019-03-29 10:55:12 -07:00
Ebrahim Byagowi 45149eb34f [dwrite] hb_directwrite_face_create, a new API
It makes a hb_face_t from IDWriteFontFace, useful when using
DirectWrite facilities for font selection, loading and rendering
but using harfbuzz for shaping.
2019-02-26 15:42:38 -08:00
Ebrahim Byagowi 0c2bd1b160
[dwrite] Fix delete-non-virtual-dtor warning (#1550) 2019-01-19 16:30:07 +03:30
Behdad Esfahbod c2ea7a9da4 [directwrite] More fix 2019-01-18 14:20:45 -05:00
Ebrahim Byagowi 9714d3ec5c
[dwrite] Try to fix delete-non-virtual-dtor warnings
Fixes #1548 hopefully
2019-01-18 21:55:21 +03:30
Behdad Esfahbod e65272281c [directwrite] Fix error
hb-directwrite.cc: In constructor 'TextAnalysis::TextAnalysis(const wchar_t*, uint32_t, const wchar_t*, DWRITE_READING_DIRECTION)':
hb-directwrite.cc:489:18: error: 'TextAnalysis::mText' will be initialized after [-Werror=reorder]
   const wchar_t* mText;
                  ^~~~~
hb-directwrite.cc:488:12: error:   'uint32_t TextAnalysis::mTextLength' [-Werror=reorder]
   uint32_t mTextLength;
            ^~~~~~~~~~~
hb-directwrite.cc:282:3: error:   when initialized here [-Werror=reorder]
   TextAnalysis (const wchar_t* text, uint32_t textLength,
   ^~~~~~~~~~~~
hb-directwrite.cc: In function 'hb_bool_t _hb_directwrite_shape_full(hb_shape_plan_t*, hb_font_t*, hb_buffer_t*, const hb_feature_t*, unsigned int, float)':
2019-01-18 12:22:07 -05:00
Behdad Esfahbod 5b13e458c3 Fix build 2019-01-17 19:52:32 -05:00
Ebrahim Byagowi e412008599 Remove redundant void from C++ sources (#1486) 2018-12-17 13:01:01 -05:00
Ebrahim Byagowi b2ebaa9afa Remove redundant 'inline' from methods (#1483) 2018-12-16 14:08:10 -05:00
Ebrahim Byagowi 7ee5c52345
minor style fix, use void in methods on no argument 2018-12-12 15:14:37 +03:30
Behdad Esfahbod 729aedf0da [directwrite] Fix build 2018-11-16 03:26:46 -05:00
Behdad Esfahbod ce5da0f36a [shaper] Rewrite shaper data code to be more template-driven than macro-driven 2018-11-16 02:52:20 -05:00
Behdad Esfahbod f521a28b4a 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.
2018-11-11 21:54:10 -05:00
Behdad Esfahbod 1beacdded9 Minor 2018-11-11 16:35:28 -05:00
Behdad Esfahbod c77ae40852 Rename hb-*private.hh to hb-*.hh
Sorry for the noise, downstream custom builders.  Please adjust.
2018-08-25 22:36:36 -07:00
Behdad Esfahbod 3d22aefede Rename 2018-08-01 18:03:32 -07:00
Behdad Esfahbod be458eb059 Include more basic internal headers from hb-private.hh 2018-07-10 14:41:04 +02:00
Ebrahim Byagowi a57f5a1a18
[dwrite] Minor, enable the original code assertions 2018-04-28 13:58:55 +04:30
Ebrahim Byagowi cb3fa70cd4
[dwrite] Cosmetic change (#963) 2018-04-11 18:00:13 +04:30
Ebrahim Byagowi fe18c471a4 [dwrite] minor 2018-03-25 18:41:26 +04:30
Ebrahim Byagowi 7919033ce8
[dwrite] Replace rest of 'malloc/free's with 'new/delete' (#897) 2018-03-22 16:04:38 +04:30
Ebrahim Byagowi 957e775663
[dwrite] Use new again and enable the build on msys2 bots (#890) 2018-03-19 12:19:42 +03:30
Ebrahim Byagowi d4907e83ef
[dwrite] GCC/mingw/msys2 compatibility (#884) 2018-03-14 11:04:28 +03:30
David Corbett 21646cc4a6 Do not mark the first glyph as unsafe to break
Fixes #791.
2018-02-17 13:35:34 -08:00
Bruce Mitchener 90218fa93c Fix typos. 2018-01-31 08:18:15 -08:00
Behdad Esfahbod e4da380200 [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.
2017-11-10 17:14:27 -08:00
Behdad Esfahbod 40ec3bbb55 Consolidate debug stuff into hb-debug.hh
Part of fixing https://github.com/behdad/harfbuzz/pull/605
2017-11-03 17:18:17 -04:00
Behdad Esfahbod dbdbfe3d7b Use nullptr instead of NULL 2017-10-15 12:11:08 +02:00
Behdad Esfahbod 239119a631 [unsafe-to-break] Mark all positions as unsafe in alternative shapers 2017-08-13 15:08:34 -07:00
Behdad Esfahbod 466b3e58bd Shuffle things around a bit 2017-02-03 16:57:15 -08:00
Behdad Esfahbod d2f249e745 Stub out doc comments for new symbols 2017-01-22 17:42:33 -08:00
Behdad Esfahbod 5dfd341f51 Minor 2017-01-22 16:55:40 -08:00
ebraminio 1e1825bf47 [dwrite] Provide an experimental API for justification (#279) 2016-12-17 10:30:40 +03:30
Behdad Esfahbod 72ada4f0c6 [GX] Hook up feature variations
Shape-plan caching is not implemented.
2016-12-16 19:06:26 -06:00
Ebrahim Byagowi 5362ce6a64 [dwrite] Minor, don't include unnecessary headers (#309) 2016-09-01 08:35:45 -07:00
Behdad Esfahbod 333173103b Fix sign of shift operators
This one:

  map->mask = (1 << (next_bit + bits_needed)) - (1 << next_bit);

before the fix, the shift was done as an int, causing overflow
if it ever got to 1 << 31.  Sprinkle 'u's around.

Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=634805
2016-08-08 17:28:14 -07:00
Ebrahim Byagowi 8179ff5d7b [dwrite] Don't allocate more than needed
Addressing Nikolay Sivov reviews on harfbuzz mailing list
2016-06-27 03:58:49 +04:30
Ebrahim Byagowi 07b724f341 [dwrite] Delete remained objects
No longer noticeable memory increase on create/destroy iterations,
highly better than current state of uniscribe backend
2016-06-24 14:29:24 +04:30
Ebrahim Byagowi be565d1714 [dwrite] Release allocated blob on face destroy
This reduces memory consumption of my iterated font create/destroy cycle test
significantly and makes it much better than uniscribe backend even
2016-06-24 11:46:53 +04:30
Ebrahim Byagowi f3f0ea980a [dwrite] Remove ifdefs without breaking execution on old Windows versions 2016-06-23 17:26:55 +04:30
Ebrahim Byagowi 6b861dbd8b [dwrite] Use stream font loader instead GDI interop
With help of
https://dxr.mozilla.org/mozilla-central/source/gfx/2d/NativeFontResourceDWrite.cpp
2016-06-23 15:57:34 +04:30
Ebrahim Byagowi d3134a66ad Fix when no feature is given 2016-04-05 21:42:37 +00:00
Ebrahim Byagowi 4a10402169 Hide justification behind HB_DIRECTWRITE_EXPERIMENTAL_JUSTIFICATION 2016-04-02 13:47:59 +00:00
Ebrahim Byagowi 63ee9ca5d8 Use standard types instead Windows favourites ones 2016-04-01 15:47:07 +00:00
Ebrahim Byagowi adf20ba0d1 Limit GetJustifiedGlyphs only to scripts with custom justification character 2016-04-01 15:36:40 +00:00
Ebrahim Byagowi 32ae9d1b3f Add justification support 2016-04-01 14:39:07 +00:00
Ebrahim Byagowi 10c3d9e415 Basic opentype features support 2016-04-01 01:39:15 +00:00
Ebrahim Byagowi d129897120 Refactor and remove dupe getglyphs call 2016-03-31 13:47:32 +00:00