summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
* Insert hyphens in more placesMatthias Clasen2019-07-161-2/+21
| | | | | | Look for whether the char before the break is not whitespace and doesn't look like a hyphen.
* glyph iter: Relax assertionsMatthias Clasen2019-07-161-2/+2
| | | | | | | Now that we are inserting glyphs out of thin air, we can end up with clusters that have start_char == end_char. Allowing that does not obviously cause any issues.
* Don't insert extra runs for hyphensMatthias Clasen2019-07-161-38/+41
| | | | | | | | | 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.
* Merge branch 'tailor-break' into 'master'Matthias Clasen2019-07-163-64/+106
|\ | | | | | | | | Tailor break See merge request GNOME/pango!86
| * Deprecate pango_breakMatthias Clasen2019-07-162-13/+10
| | | | | | | | | | To break correctly, use pango_default_break and pango_tailor_break.
| * layout: Tailor breaks properlyMatthias Clasen2019-07-161-35/+47
| | | | | | | | | | | | Call pango_default_break on the entire text, and then pango_tailor_break on segments with homogeneous language and script.
| * Add pango_tailor_breakMatthias Clasen2019-07-162-16/+49
| | | | | | | | | | | | This function lets you apply language-specific tailoring on top of breaks produced by pango_default_break.
* | cairo win32: Set height in font metricsMatthias Clasen2019-07-161-4/+3
| |
* | context: Treat metrics height like ascent+descentMatthias Clasen2019-07-161-0/+1
| | | | | | | | | | | | PangoContext has somewhat redundant code to create metrics, which wasn't treating the new height member like it should.
* | layout: Don't free no_break_attributes prematurelyMatthias Clasen2019-07-161-4/+4
|/ | | | | We use them in a loop. Don't free them before the loop is done.
* pangofc-font.c: Trivial fix on pre-C99 compilersChun-wei Fan2019-07-151-2/+2
| | | | Make sure we declare variables at the top of the block.
* layout: Avoid access-after-freeMatthias Clasen2019-07-151-2/+4
| | | | | insert_run (... TRUE) frees the need_hyphen array, so we need to check for the hyphen beforehand.
* layout: Improve soft hyphen handlingMatthias Clasen2019-07-141-1/+8
| | | | | | | | | | | Point the item that we create for the inserted hyphen at the SHY in the paragraph text, shortening the previous run by one character. It would be nicer to not insert an extra run at all and just reshape the previous one in a way that maps the SHY to a hyphen, but that is more difficult to do as long as we are going through the shape engine API.
* layout: Fix some offset-vs-index confusionMatthias Clasen2019-07-141-32/+54
| | | | | | | | | | | | | | | | | We had some sad cases where we used a char offset as a byte index, with the expected bad results once there are multibyte characters in the mix. Instead of poking at the text in the middle of line-breaking, go back to keeping a plain array of positions that need a hyphen inserted. We maintain this array in parallel to the existing log_widths array, so hopefully the offset math is working out now. It is tempting to look at log_attrs.is_white for this, but that gives us double hyphens when breaks are taken at explicit hyphens. So, keep this information separately.
* layout: Correct a field typeMatthias Clasen2019-07-141-1/+1
| | | | | We had a boolean member in ParaBreakState that was used as an int. Oops
* Some more doc tweaksMatthias Clasen2019-07-144-3/+14
|
* Clean up docs a bitMatthias Clasen2019-07-133-53/+15
| | | | Avoid duplicate comments in struct defintions.
* Add some more docsMatthias Clasen2019-07-132-1/+4
|
* Documentation tweaksMatthias Clasen2019-07-136-7/+172
|
* Deprecate pango_fc_font_has_charMatthias Clasen2019-07-122-3/+2
| | | | We have pango_font_has_char now.
* Rename pango_font_coversMatthias Clasen2019-07-124-9/+7
| | | | | We already had a has_char api in pangofc, so use that name.
* Revert "Reduce overlinking"Matthias Clasen2019-07-121-3/+5
| | | | This reverts commit f972ba0562823a8d55ad02ff9609481a884c79f8.
* Revert "Move pangofc to libpango"Matthias Clasen2019-07-121-22/+8
| | | | This reverts commit 8b85815f1b122842d915e7fc29cc68d228a64dbb.
* coverage: Fix the copy implementationMatthias Clasen2019-07-121-1/+10
| | | | This should do a deep copy.
* coverage: Fix the implementationMatthias Clasen2019-07-121-2/+8
| | | | We never created the set. Oops.
* Document pango_item_apply_attrsMatthias Clasen2019-07-121-0/+18
|
* docs: Fix parameter name mismatchesMatthias Clasen2019-07-122-4/+4
| | | | gtk-doc doesn't like these.
* ot: Avoid deprecated harfbuzz apiMatthias Clasen2019-07-121-4/+6
| | | | Don't use deprecated api to implement deprecated api!
* Better docs for pango_font_get_featuresMatthias Clasen2019-07-121-3/+5
| | | | | Clarify that the default features of the rendering system are not included.
* Add freetype includes where they belongMatthias Clasen2019-07-122-0/+6
| | | | | Include freetype.h in headers where freetype types are used.
* Drop an unused functionMatthias Clasen2019-07-122-32/+0
| | | | | We don't use _pango_cairo_fc_font_map_get_library anymore.
* fc: Make pango_fc_font_kern_glyphs emptyMatthias Clasen2019-07-121-57/+5
| | | | | | This function has long been deprecated; and it is is using freetype. So drop the implementation.
* Use pango_font_get_featuresMatthias Clasen2019-07-111-56/+45
|
* fc: Implement get_features for fc fontsMatthias Clasen2019-07-111-1/+30
| | | | | We take features out of the FcPattern and translate them into harfbuzz features.
* Add an api to get features of a fontMatthias Clasen2019-07-113-1/+35
|
* Turn PangoCoverage into an objectMatthias Clasen2019-07-113-86/+215
| | | | | | Make PangoCoverage a GObject, and subclass it in pangofcfontmap.c. This lets us use the FcCharSet without copying the data.
* Reimplement PangoCoverage on top of hb_set_tMatthias Clasen2019-07-113-320/+35
| | | | | | This drops the language dependency and coverage levels, both of which are not used in pango.
* Use pango_font_coversMatthias Clasen2019-07-112-6/+4
| | | | This replaces all uses of _pango_engine_shape_covers.
* Add pango_font_coversMatthias Clasen2019-07-113-1/+24
| | | | | | | | | | | Add a pango_font_covers function, which is like pango_shape_engine_covers, without the engine. This api is simpler than PangoCoverage in that it does not take a language as input, and only returns a boolean. This matches the harfbuzz api.
* 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.
* layout: Don't break runs for font_featuresMatthias Clasen2019-07-111-19/+65
| | | | | | | | | | Don't pass font_features attributes into the itemize run, since we don't need to break runs for this. Split them off, and reapply them after itemization. We rapply them before line breaking, since we want them to affect the shaping. Closes: https://gitlab.gnome.org/GNOME/pango/issues/242
* Add pango_item_apply_attrsMatthias Clasen2019-07-112-0/+49
| | | | | This adds attrs that are overlapping the range of the item to the extra_attrs in the analysis.
* Leave some more attributes out of shapingMatthias Clasen2019-07-111-0/+2
| | | | | | We already count foreground and background color as no-shape attributes, so it makes sense to treat alpha the same.
* Make PangoAttribute a boxed typeMatthias Clasen2019-07-112-0/+7
| | | | | | Based on a patch by Matijs van Zuijlen <matijs@matijs.net>. Closes https://gitlab.gnome.org/GNOME/pango/issues/259
* bidi: Be safer against bad inputMatthias Clasen2019-07-101-2/+5
| | | | | | | Don't run off the end of an array that we allocated to certain length. Closes: https://gitlab.gnome.org/GNOME/pango/issues/342
* Merge branch 'line-separator-font' into 'master'Matthias Clasen2019-07-101-0/+4
|\ | | | | | | | | itemize: Don't change font for line separator See merge request GNOME/pango!71
| * itemize: Don't change font for line separatorMatthias Clasen2019-07-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | If we render this (in single-paragraph mode), we draw a hex box, so changing font just for the line separator is never useful, and in fact, counterproductive in cases where the font has a (typically empty) glyph for it. This fixes the [LS] or [PS] hex boxes not showing up in single-paragraph mode depending on font fallback.
* | Move pangofc to libpangoMatthias Clasen2019-07-091-8/+22
| | | | | | | | | | Move the fontconfig+harfbuzz using parts to libpango, since we want to start using harfbuzz on all platforms.
* | Reduce overlinkingMatthias Clasen2019-07-091-5/+3
| | | | | | | | | | Only link libpangoxft and libpangocairo against xft and cairo.
* | Fix a compiler warningMatthias Clasen2019-07-091-1/+0
| |