summaryrefslogtreecommitdiff
path: root/pango/pangofc-shape.c
Commit message (Collapse)AuthorAgeFilesLines
* Slightly tweak pango_hb_font_get_nominal_glyphMatthias Clasen2021-03-291-15/+12
|
* Fix placement of marks in upright vertical text.Tavmjong Bah2021-03-171-5/+2
|
* Translate origin point for vertical layoutPeng Wu2021-01-201-3/+6
| | | | | The origin point for vertical layout needs to be translated for cairo rendering from the horizontal origin to the vertical origin.
* Remove hb-glib useEbrahim Byagowi2020-07-291-2/+2
| | | | | | glib isn't hard dependency to harfbuzz so we like to make embedders be able to compile harfbuzz for Pango without hb-glib now that hb_glib_get_unicode_funcs use is gone releases ago.
* Fixes harfbuzz codepoint cluster for hyphens.aihui zhu2019-10-081-2/+2
|
* Merge branch 'mark-offset' into 'master'Matthias Clasen2019-08-121-12/+31
|\ | | | | | | | | | | | | Fix vertical offsets Closes #408 See merge request GNOME/pango!130
| * Flip vertical offsetsMatthias Clasen2019-08-121-6/+6
| | | | | | | | | | | | | | | | | | This was experimentally determined to fix placement of diacritics in Arabic text. I am not entirely sure where the negation crept in, compared to 1.43, which makes me a little uncomfortable. Fixes https://gitlab.gnome.org/GNOME/pango/issues/408
| * Add a separate v_advance funcMatthias Clasen2019-08-121-6/+25
| | | | | | | | | | It doesn't make sense to use the same function for both h and v advance.
* | pango/pangofc-shape.c: Fix buildChun-wei Fan2019-08-121-1/+1
|/ | | | | The hb_tag_t array was declared as an array of hb_tag_t pointers, whereas it should have been an array of hb_tag_t's.
* Revert "Revert "shape: Simplify font function""Khaled Hosny2019-08-031-74/+0
| | | | This reverts commit 5590b99fb6369cd16110bce2a3e8ac6371c3c487.
* Remove a unnecessary harfbuzz version checkMatthias Clasen2019-08-031-2/+0
| | | | We require harfbuzz 2.0.0 now.
* Revert "shape: Simplify font function"Matthias Clasen2019-08-011-0/+74
| | | | | | This reverts commit 315e3d4f6182e4cefde3538ede222e53c000f3e8. This made pango-view segfault in win32 ci.
* shape: use hb_font_get_nominal_glyph()Khaled Hosny2019-08-011-1/+1
| | | | Instead of setting variation selector to 0.
* shape: Simplify font functionKhaled Hosny2019-08-011-74/+0
| | | | | If a function is not set, HarfBuzz will default to the parent’s, so no need to set functions we don’t customize.
* Always use our font funcsMatthias Clasen2019-08-011-2/+1
| | | | | | If we don't use our own font funcs, hex boxes don't work, since harfbuzz just replaces missing glyphs with 0.
* Initialize the context structMatthias Clasen2019-08-011-1/+1
| | | | | | It is misleading to see uninitialized pointers in gdb, so set them to NULL, even if they are not used.
* Make our font funcs immutableMatthias Clasen2019-08-011-1/+3
| | | | | While of no immediate consequence, it is the right thing to do.
* Turn off ligatures when letterspacingMatthias Clasen2019-07-291-0/+23
| | | | | | | | | When letterspacing, we don't want the letters making up ligatures to 'stick together', so turn off OpenType features that request optional ligatures (liga, clig, dlig). Closes: https://gitlab.gnome.org/GNOME/pango/issues/182
* shape: Apply the show attributeMatthias Clasen2019-07-251-3/+245
| | | | | | For this, we pull the show attribute out of the analysis and pass the flags on to harfbuzz font funcs, so we can select different glyphs and give them the right extent.
* Don't insert extra runs for hyphensMatthias Clasen2019-07-201-0/+14
| | | | | | | | | Instead, reshape the pre-break run with the soft hyphen replaced by an actual hyphen. This is unfortunately inefficient, we copy the entire text for this. The alternative (scatter-gather populating the harfbuzz buffer) is too hard to manage.
* Rename _pango_fc_shapeMatthias Clasen2019-07-181-8/+8
| | | | It is all harfbuzz now, so call it pango_hb_shape.
* shape: Drop unneeded includesMatthias Clasen2019-07-181-3/+2
| | | | pangofc-shape.c does not use any pangofc api anymore.
* shape: Stop rounding glyph positionsMatthias Clasen2019-07-181-56/+0
| | | | | | | As we move towards subpixel positioning and unhinted rendering, rounding the glyph positions and widths between shaping and rendering is counterproductive. So stop doing that.
* fc: Make pangofc_shape backend-neutralMatthias Clasen2019-07-181-44/+47
| | | | | Use typechecks for the two remaining bits of code that use PangoFcFont.
* fc: Move font setup code from the shaperMatthias Clasen2019-07-181-308/+25
| | | | | | | | | | | | Move all the code that sets up the hb_font_t to pango_fc_font_create_hb_font, and use it from the shaper. This is the second step towards taking over font management. Even better, harfbuzz has a ready-made function for this. We can drop a lot of FT_Face-using code this way. We assume unhinted rendering for now, so we can set ppem to 0.
* Use pango_font_get_featuresMatthias Clasen2019-07-111-56/+45
|
* Set ranges on featuresMatthias Clasen2019-07-111-21/+25
| | | | | | Before passing the features to hb_shape(), set their ranges, since they are no longer always for the full length of the item.
* Header cleanupMatthias Clasen2019-07-041-0/+2
| | | | | | | Abolish the PANGO_ENABLE_BACKEND and PANGO_ENABLE_ENGINE defines. All backend-only apis are moved into private headers, all apis that were engine-only are marked as deprecated, since engines are.
* Fix crash in pango_fc_font_key_get_variations() when key is nullCarsten Pfeiffer2018-08-101-2/+5
|
* Add initial support for OpenType font variationsMatthias Clasen2018-01-031-0/+45
| | | | | | | | This commit lets PangoFontDescription carry font variation information as a string. Only pangocairo has been updated to make use of this information. We pass it to harfbuzz for shaping, and we pass it to cairo when creating scaled fonts.
* Fix warningBehdad Esfahbod2017-09-181-7/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=787194
* Support variation selectors for shapingMatthias Clasen2017-08-121-1/+22
| | | | | This is necessary to make some emoji sequences shape and render correctly.
* Simplify hb_buffer_set_flags()Behdad Esfahbod2017-08-101-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From a 2014 HarfBuzz commit: commit 763e5466c0a03a7c27020e1e2598e488612529a7 Author: Behdad Esfahbod <behdad@behdad.org> Date: Sat Aug 2 16:17:44 2014 -0400 Make it easier to use HB_BUFFER_FLAG_BOT/EOT Previously, we expected users to provide BOT/EOT flags when the text *segment* was at paragraph boundaries. This meant that for clients that provide full paragraph to HarfBuzz (eg. Pango), they had code like this: hb_buffer_set_flags (hb_buffer, (item_offset == 0 ? HB_BUFFER_FLAG_BOT : 0) | (item_offset + item_length == paragraph_length ? HB_BUFFER_FLAG_EOT : 0)); hb_buffer_add_utf8 (hb_buffer, paragraph_text, paragraph_length, item_offset, item_length); After this change such clients can simply say: hb_buffer_set_flags (hb_buffer, HB_BUFFER_FLAG_BOT | HB_BUFFER_FLAG_EOT); hb_buffer_add_utf8 (hb_buffer, paragraph_text, paragraph_length, item_offset, item_length); Ie, HarfBuzz itself checks whether the segment is at the beginning/end of the paragraph. Clients that only pass item-at-a-time to HarfBuzz continue not setting any flags whatsoever. Another way to put it is: if there's pre-context text in the buffer, HarfBuzz ignores the BOT flag. If there's post-context, it ignores EOT flag.
* Don't use deprecated hb_font_funcs_set_glyph_func()Behdad Esfahbod2017-04-171-5/+6
|
* pangofc-shape: Fix potential array overrunPhilip Withnall2017-02-141-4/+0
| | | | | | | | | | | | | | | If this loop adds the final feature to the features array, the start and end assignment for the next feature will drop off the end of the array. I don’t think the assignments are necessary, since num_features stores the number of elements in the array (so it doesn’t need to be terminated), and the start and end elements are assigned each time a feature is parsed. Coverity ID: 1391709 Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=778601
* Only use finer harfbuzz clusters when they workMatthias Clasen2015-09-011-1/+1
| | | | | | Harfbuzz 1.0.2 had errors in this area that gave us crashes in the testsuite (testiter). Therefore, only use this feature with Harfbuzz 1.0.3 or newer.
* Use finer HarfBuzz cluster levelKhaled Hosny2015-08-181-0/+3
| | | | | | | So that we can set attributes (e.g. colors) to the marks and their bases indecently. https://bugzilla.gnome.org/show_bug.cgi?id=541608
* Don't use hb_glib_get_unicode_funcs()Behdad Esfahbod2015-06-261-13/+2
| | | | | HarfBuzz buffer comes with a properly set up Unicode funcs these days. So, trust it.
* Bug 738505 - Add fontfeatures support in PangoAttributes and markupBehdad Esfahbod2015-06-181-0/+39
| | | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=738505 Patch from Matthias Clasen, based on early patch from Akira TAGOH. There's room for improvement in how this is done, but it works now for simple cases, which is what most people will be using it for. Finally!
* Fix PangoFc with non-identity scale matrix (again!)Behdad Esfahbod2015-05-111-29/+69
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=700592
* Fix a few warningsBehdad Esfahbod2015-05-051-2/+0
|
* Increase number of features per runBehdad Esfahbod2015-04-041-1/+1
|
* Deprecate module system, skip it for shaper modulesBehdad Esfahbod2015-04-041-75/+10
| | | | | | | | | | | | | | Now shaper is discovered via (previously unused!) font->find_shaper(). I'm keeping that just to allow clients override shaping. Though, even that I'm not sure we want to keep. Wraps shaper in PangoEngineShape structs to keep PangoAnalysis API intact. Deprecated pango-modules.h and some pango-engine.h. Language modules are not moved yet. Wired up PangoFc, PangoWin32, and PangoCoretext shapers.
* Move shapers from modules/basic/ into pango/Behdad Esfahbod2015-04-041-0/+483
Note wired up yet. Doesn't build.