Commit Graph

84 Commits

Author SHA1 Message Date
Behdad Esfahbod 20031ddbb8 [unsafe-to-concat] Mark in all other shapers
unsafe_to_break() implies unsafe-to-concat; but setting the flag
manually wasn't.
2022-01-22 11:53:18 -07:00
Behdad Esfahbod 94d43c008a [buffer] Merge and rename clear_glyph_flags() 2021-12-04 16:56:39 -08:00
Khaled Hosny 7608b19167 [directwrite] Set unsafe to break flag
Like the rest of platform shapers. Otherwise hb-shape --verify goes
crazy.
2021-12-01 19:55:48 +02:00
Khaled Hosny 361a438658 Revert "Revert "[hb-directwrite] Don't load dwrit.dll dynamically""
This reverts commit ecbe224743.

It was causing directwrite shaper to crash in MSVC builds.
2021-12-01 19:55:48 +02:00
Cameron Cawley ecbe224743 Revert "[hb-directwrite] Don't load dwrit.dll dynamically"
This reverts commit 6119ff9d80.
2021-10-23 13:19:39 -07:00
Khaled Hosny 990c15dbe5 [hb-ms-features] Rename types to be less general 2021-07-27 21:07:32 +02:00
Khaled Hosny 69199211b7 [uniscribe/directwrite] Move feature setup to shared file
Fixes https://github.com/harfbuzz/harfbuzz/issues/3070
2021-07-27 21:07:32 +02:00
Behdad Esfahbod 2337f0d047 Internally use hb_malloc/.../hb_free instead of malloc/.../free
Redefining those stock names as macros was conflicting with gcc 10
headers.

Fixes https://github.com/harfbuzz/harfbuzz/issues/3044
2021-07-08 10:54:09 -07:00
Khaled Hosny 14f220b761 [directwrite] Support feature ranges
Code copied from hb-uniscribe.cc and adapted to use DirectWrite types.
May be there is a better way to de-duplicate the code, though I'm not
exactly sure how or if it is worth it.
2021-06-20 17:22:27 -07:00
Khaled Hosny 6119ff9d80 [hb-directwrite] Don't load dwrit.dll dynamically
We already link to it, so I don't see the point of trying to load it
dynamically.
2021-06-05 04:22:46 +02:00
Khaled Hosny b2070a509c [hb-directwrite] Don’t override new/delete
This is a testing shaper, we don’t care for overridden malloc/free here.
Use malloc/free in the code called from hb_directwrite_face_create().
2021-06-05 04:22:46 +02:00
Khaled Hosny 221d642b19 [hb-directwrite] Remove _hb_directwrite_shape_experimental_width
Not used anywhere.
2021-06-05 04:22:46 +02:00
Khaled Hosny e116058bba [directwrite] Use correct UTF-16 string length
Fixes https://github.com/harfbuzz/harfbuzz/issues/2474
2021-04-15 09:30:40 -06:00
Khaled Hosny 3d7a361648 [docs] Miscellaneous missing docs 2020-12-30 19:21:49 -08:00
Khaled Hosny 0826940821 [docs] Add messing sections
Docs for these sections were not generated at all.
2020-12-23 00:58:49 +02:00
Ebrahim Byagowi 2be859d289 minor, replace nullptr checks with implicit ones 2020-04-21 00:30:34 +04:30
Iceflower c4567968cd [dwrite] Fix extra semicolon issue 2019-09-26 13:05:27 +03:30
Ebrahim Byagowi 2a3d4987a7
Remove hb_directwrite_shape_experimental_width public API
I had specially exposed the API as I didn't know how to embed harfbuzz
easily elsewhere but now with harfbuzz.cc it has become very easy
and I don't like to see its use anywhere as it has a bad naming and
its Kashida adding is bogus and only useful to check where it should
be added, not visually useful however.
2019-08-21 03:02:01 +04:30
Ebrahim Byagowi eb8bd2f7ec Add hb_gdi_face_create API
Based on Konstantin Ritt work posted on mailing list
2019-07-21 14:22:19 -07:00
Ebrahim Byagowi 9fea6b4dd4
[amalgam] Use it in cmake port and fix conflicts (#1812) 2019-07-05 18:46:41 +04:30
Ebrahim Byagowi 4ab2d1d676
[dwrite] Apply minor style improves 2019-07-01 19:30:21 +04:30
Carlo Bramini 5ebd265e66
Fix error rised by GCC8+ 2019-07-01 16:06:43 +02:00
Carlo Bramini 693dacbb1c
Use lower case file name with #include
I tried to cross compile harfbuzz for Windows and an error was generated because `DWrite_1.h` was not found.
This happened because the filesystem is case sensitive and for this reason that include file was not found.
The right name of the file to be used is `dwrite_1.h`, with all letters not capitalized:
https://docs.microsoft.com/en-us/windows/desktop/api/dwrite_1/
I also verified in the installation of VS2017 with Windows Kit v10 and in that place it was also lower case.
So, in my opinion it should be better to change this.
2019-07-01 13:31:26 +02:00
Carlo Bramini 601b6825b0
Dynamically load DWRITE
Also checks if DWriteCreateFactory() has been executed successfully.
2019-06-30 15:03:44 +02:00
Behdad Esfahbod 10bac21bb5 [coretext/uniscribe/directwrite] Remove extra semicolons
Fixes https://github.com/harfbuzz/harfbuzz/pull/1783
2019-06-18 15:15:06 -07:00
Behdad Esfahbod aa3450cac1 [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.
2019-06-17 22:41:49 -07:00
Ebrahim Byagowi c91f3fa3ea
[dwrite] Replace REPLACEME with release version the symbol had 2019-06-01 10:55:37 +04:30
Behdad Esfahbod 68e12e68f8 Fix more semi-colon issues 2019-05-13 17:28:59 -07:00
Behdad Esfahbod 41248cce0e Remove MIN/MAX in favor of hb_min/hb_max 2019-05-07 20:54:31 -07:00
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