summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
* PangoWin32: Use hb_font_get_nominal_glyphKhaled Hosny2019-07-274-731/+60
| | | | | Use hb_font_get_nominal_glyph in pango_win32_font_get_glyph_index (deprecated), to better match what Pango is actually using internally.
* Fix an uninitialized valueMatthias Clasen2019-07-271-9/+13
| | | | https://gitlab.gnome.org/GNOME/pango/issues/383
* fc: Set variation coords on the harfbuzz fontMatthias Clasen2019-07-251-23/+86
| | | | | We need to call hb_font_set_var_coords, otherwise the hb_font_t has no coords.
* PangoWin32: Make font discovery thread-safeChun-wei Fan2019-07-253-32/+38
| | | | | | | | | | | | | | | | | | | | | | Make font discovery using GDI/Unicscribe on Windows thread-safe, by: -Making the alias HashTable a part of the _PangoWin32FontMap struct, so that we only need to initialize this once when we initialize the PangoFontMap on Win32. Make sure that we fill in that hash table with the fonts items we ask from the system once and only once as we initialize the PangoWin32FontMap. -Make the warned_fonts HashTable a part of the _PangoWin32FontMap struct as well, and create the HashTable when we init the PangoWin32FontMap. -Make the access to the common HDC in pangowin32.c where Alex mentioned that could be thread-unsafe done through pango_win32_get_dc(). At this point the test-pangocairo-threads will pass in Meson, tested for 20 successive rounds using 'meson test test-pangocairo-threads'. Note that we still get the "Pango-WARNING **:hh:mm:ss.sss: All font fallbacks failed!!!", but at least we are doing much better on PangoWin32 in terms of thread-safety.
* cairo: Render visible space differentlyMatthias Clasen2019-07-252-3/+80
| | | | | | | | | Instead of a [SPC] hex box, just render a centered dot, as is commonly used to indicate space. Also render synthetic glyphs for tabs and newlines. This makes single-paragraph mode prettier.
* cairo: Better hex boxes for ignorablesMatthias Clasen2019-07-252-9/+32
| | | | | | For ignorable characters such as U+00AD, Soft Hyphen, render a hex box with their 'nickname', which is a 2-6 character short form such as SHY.
* Add a utility function for ignorablesMatthias Clasen2019-07-251-0/+70
| | | | | | | This returns nicknames and formatting information for default ignorable characters. This will be used to render customized hex boxes for these characters.
* 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.
* layout: Don't zero the width of visible spaceMatthias Clasen2019-07-251-0/+4
| | | | | | | | | | | | | | Don't zero out a line separator at the end of line if we turned it into an unknown glyph to render it. And if we zero out whitespace at the end of the line, make sure we don't draw anything there by setting the glyph to EMPTY. Without this, we are getting the [LS] hex box rendered on top of the last character in a line, when the line separator ends up being visible.
* layout: Make tab visible tooMatthias Clasen2019-07-251-2/+24
| | | | | | When the 'show space' attribute is present, arrange for tab characters to be passed on to the rendering layer as non-empty.
* layout: Use a show attributeMatthias Clasen2019-07-251-0/+6
| | | | | Use an attribute to show line breaks in single-paragraph mode.
* layout: The show attribute affects shapingMatthias Clasen2019-07-251-0/+1
|
* markup: Support the new attributeMatthias Clasen2019-07-251-0/+43
| | | | Add markup support for show="space|ignorables".
* Add an attribute for showing invisible charsMatthias Clasen2019-07-252-1/+49
| | | | | Allow to opt-in to showing spaces, line breaks, and default-ignorable chars, separately.
* Add a helper for parsing flagsMatthias Clasen2019-07-252-0/+66
| | | | | We are about to add an attribute whose values are flags.
* xft: Fix compiler warningsMatthias Clasen2019-07-251-2/+2
|
* PangoWin32: Drop _pango_win32_os_version_infoChun-wei Fan2019-07-254-17/+3
| | | | We don't need this anymore since we need Vista or later to run.
* pango/pangowin32-fontmap.c: Fix code formattingChun-wei Fan2019-07-251-216/+221
| | | | Get rid of the tabs...
* layout: Flip the logic for attribute filteringMatthias Clasen2019-07-241-86/+88
| | | | | | | | | | | Instead of filtering out the attributes we don't want to influence itemization, explicitly filter only those attributes that we want to affect itemization. This makes us no longer break items for custom attributes, such as GtkTextAppearance attributes that are created by GtkTextLayout. Update expected output for layout testcases.
* Fix misleading indentationMatthias Clasen2019-07-241-1/+1
|
* layout: Fix misleading namingMatthias Clasen2019-07-241-17/+17
| | | | | | | What I called no_break_attrs are really no_itemize_attrs - some of them explicitly influence line breaking. So fix the misleading naming and call them what they are.
* Bring back unknown glyph size definesMatthias Clasen2019-07-242-6/+4
| | | | | These turned out to be used in a number of places, so just deprecate them for now.
* Add system-ui generic family supportAkira TAGOH2019-07-243-3/+29
|
* doc cleanupsMatthias Clasen2019-07-233-120/+118
| | | | Clean up some headers, and shovel docs around.
* Remove an unused functionMatthias Clasen2019-07-231-9/+0
|
* Merge branch 'better-hyphens' into 'master'Matthias Clasen2019-07-229-150/+240
|\ | | | | | | | | Better hyphens See merge request GNOME/pango!89
| * Fix a comment typoMatthias Clasen2019-07-221-1/+1
| |
| * Add a missing Since tagMatthias Clasen2019-07-201-0/+2
| |
| * layout: Pass offset to pango_tailor_breakMatthias Clasen2019-07-201-31/+10
| | | | | | | | This is necessary to interpret the attributes.
| * break: Implement allow-breaksMatthias Clasen2019-07-201-9/+87
| | | | | | | | | | | | | | | | | | We implement this in pango_tailor_break(), after the script-specific breaking. When line breaks are forbidden in a range, we remove line and char break opportunities inside the range.
| * Add an allow-breaks attributeMatthias Clasen2019-07-203-1/+49
| | | | | | | | | | Add a new attribute type, and parse allow_breaks="false" in markup. This is useful to prevent hyphenation of words.
| * Add an offset argument to pango_tailor_breakMatthias Clasen2019-07-202-2/+5
| | | | | | | | | | | | Without this, it is not possible to interpret attributes, whose offsets are relative to the beginning of the paragraph.
| * Insert hyphens in more placesMatthias Clasen2019-07-201-2/+31
| | | | | | | | | | | | Look for whether the char before the break is not whitespace and doesn't look like a hyphen.
| * Don't insert extra runs for hyphensMatthias Clasen2019-07-203-104/+55
| | | | | | | | | | | | | | | | | | 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.
| * Quiet a compiler warningMatthias Clasen2019-07-201-2/+2
| |
* | pangowin32: add back the old font fallback list for each registered fontChristoph Reiter2019-07-211-0/+11
| | | | | | | | | | | | | | | | | | | | | | In f523c25c12c I changed the font fallback list from hardcoded to reading it from the registry to cover all potentially default Windows UI fonts. Turns out that this doesn't cover all of Unicode and breaks things like Marathi. This adds back the language specific font fallbacks to each font read from the registry to restore the old Unicode coverage. Fixes #375
* | Merge branch 'cairo-detection-improvements' into 'master'Matthias Clasen2019-07-211-1/+9
|\ \ | | | | | | | | | | | | Improve build experience in regards to Cairo/PangoCairo See merge request GNOME/pango!93
| * | pango/meson.build: Fix pangocairo.pc on MSVC buildsChun-wei Fan2019-07-191-1/+9
| | | | | | | | | | | | | | | | | | | | | On MSVC builds, Cairo may be found either via pkg-config files or manually through finding headers and libs, so we need to ensure that we create pangocairo.pc correctly, otherwise items that depend on PangoCairo may not link correctly.
* | | pango/pango-attributes.c: Trivial fix for pre-C99Chun-wei Fan2019-07-201-1/+1
| | | | | | | | | | | | Ensure that we declare variables at the top of the block.
* | | Add a function to update attribute listsMatthias Clasen2019-07-192-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a function that can update positions of attributes as the underlying text is changing. This is meant to be used to update an attribute list as text transformations are applied, like capitalization.
* | | Add pango_attr_list_get_attributesMatthias Clasen2019-07-192-0/+24
| |/ |/| | | | | | | This was a gap in the attribute api - no way to get attributes back out of a list.
* | Remove unused remnants of shape engineKhaled Hosny2019-07-194-184/+0
| |
* | Remove now unused platform shaping codeKhaled Hosny2019-07-195-1353/+0
|/
* Merge branch 'wip/kill-shape-engine' into 'master'Matthias Clasen2019-07-1813-370/+166
|\ | | | | | | | | Kill shape engines See merge request GNOME/pango!75
| * Rename _pango_fc_shapeMatthias Clasen2019-07-184-21/+54
| | | | | | | | It is all harfbuzz now, so call it pango_hb_shape.
| * Stop exporting _pango_fc_shapeMatthias Clasen2019-07-181-1/+0
| | | | | | | | It is no longer used in libpangoft2.
| * Document engines as unusedMatthias Clasen2019-07-181-2/+2
| |
| * Deprecate pango_font_find_shaperMatthias Clasen2019-07-183-12/+3
| | | | | | | | | | Deprecate pango_font_find_shaper, make it return NULL, and remove the find_shaper vfunc.
| * win32: Stop providing a shape engineMatthias Clasen2019-07-181-44/+0
| | | | | | | | It is no longer used.
| * coretext: Stop providing a shape engineMatthias Clasen2019-07-181-41/+0
| | | | | | | | It is no longer used.