summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
...
| * pangowin32: Use DirectWrite to enumerate system fontsChun-wei Fan2022-09-263-12/+144
| | | | | | | | | | | | | | | | | | | | | | | | ...instead of using EnumFontFamiliesEx(), and retrieve the LOGFONTW's that we need via DirectWrite's GDI interop. Also cache up our IDWriteFont's that we obtained, so that we can use DirectWrite to query font properties better than what GDI/Uniscribe can do for us, such as obtaining stretch info from the font. Also update synthesize_foreach() accordingly, since we should also record the IDWriteFonts as well for synthesized LOGFONTWs. Portions based on Luca Bacci's implementation of the DirectWrite fontmap support in the upcoming Pango2.
| * pangowin32: Initialize DirectWriteChun-wei Fan2022-09-266-1/+115
| | | | | | | | | | We set up the boilerplate that is necessary for using DirectWrite in our code. Also add code to tear it down after we are done with it.
| * build: Check for DirectWrite supportChun-wei Fan2022-09-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | ...in Cairo, as well as their presence in the Windows SDKs (which should always be there in the Windows SDKs). We want to use items in DirectWrite to help us improve support on Windows regarding looking up for features (description) of a font. Since upstream Cairo gained DirectWrite support very recently, check for it only via pkg-config, since Cairo had Meson build support quite a bit before that happened.
* | Merge branch 'more-gir-annotations-fixes' into 'main'Matthias Clasen2022-10-134-76/+76
|\ \ | | | | | | | | | | | | Fix GIR annotations in multiple files See merge request GNOME/pango!648
| * | Fix GIR annotations in multiple filesGuillaume Gomez2022-10-124-76/+76
| | |
* | | Merge branch 'fix-gir-annotations-fonts' into 'main'Matthias Clasen2022-10-131-48/+48
|\ \ \ | | | | | | | | | | | | | | | | Fix GIR annotations for fonts.c See merge request GNOME/pango!647
| * | | Fix GIR annotations for fonts.cGuillaume Gomez2022-10-121-48/+48
| |/ /
* | | Fix GIR annotation for pango contextGuillaume Gomez2022-10-121-19/+21
|/ /
* | Update pango-break-table.h to Unicode 15Peng Wu2022-10-111-175/+192
| |
* | Update pango-emoji-table.h to Unicode 15Peng Wu2022-10-111-27/+23
| |
* | Fixes typo in MR GNOME/pango!502 (commit 050e321e) (ct_weight -> pango_weight).Hugo Herbelin2022-10-041-1/+1
| | | | | | | | See #705 and also https://gitlab.gnome.org/GNOME/gtk/-/issues/5226.
* | shape: Don't crash if log_attrs is NULLavoid-shape-crashMatthias Clasen2022-10-021-4/+17
| | | | | | | | | | | | | | | | | | We accept NULL for log_attrs, so we should not crash when we are given NULL. While fixing this, clarify the documentation of the various shaping APIs for what they can and cannot do. Related: !641
* | serializer: Handle lack of fontsMatthias Clasen2022-09-261-1/+2
| | | | | | | | | | | | Make the serializer only serialize the font of a layout if it is not NULL. This lets us survive no-fonts situations better.
* | fonts: Handle lack of fontsMatthias Clasen2022-09-261-0/+6
|/ | | | | | | | Make pango_font_get_scale_factors return 1 if the font is NULL. This avoids crashes in situations where we cannot find any fonts. Fixes: #701
* layout: Fix line height computationslayout-font-scaleMatthias Clasen2022-09-061-2/+7
| | | | | | | | We were using the font metrics height, which is scaled by the ctm, so we need to take the font scale factors into account here. Fixes: #691
* itemize: Use pango_font_get_variantstrdup-avoidanceMatthias Clasen2022-08-271-9/+2
| | | | | This avoids the unnecessary copy of the fonts font description, just to extract the variant.
* font: Add private api to get the variantMatthias Clasen2022-08-272-0/+31
| | | | | | Add a private pango_font_get_variant, and implement it for PangoFcFont. This will let us avoid many pointless font description copies.
* fc: Avoid extra copies of family namesMatthias Clasen2022-08-273-21/+38
| | | | | | | | When we create a PangoFcFont from an FcPattern, we know that the pattern will live as long as the font and the font description we create at the same time. So there is no need to copy the strings we get out of the pattern.
* fix thread safety problemmisos12022-07-311-7/+8
|
* docs: Remove an oddityMatthias Clasen2022-07-141-1/+1
| | | | | It seems odd to document PANGO_WEIGHT_MEDIUM as the 'normal' weight, when we also have PANGO_WEIGHT_NORMAL.
* layout: Apply show flags to line separatorsMatthias Clasen2022-07-031-2/+26
| | | | | | | We only want line separators at the line end to be visible when the show flags say so. This was not working before, because the shaping always marks LS as unknown glyph.
* Merge branch 'typo-PangoEngineShape' into 'main'Matthias Clasen2022-06-281-1/+1
|\ | | | | | | | | Fix typo in declaration of PangoEngineShape See merge request GNOME/pango!629
| * Fix typo in declaration of PangoEngineShapeAki Sakurai2022-06-251-1/+1
| |
* | Update gir dependenciesMatthias Clasen2022-06-271-1/+1
| | | | | | | | | | This is necessary to make GListModel show up as implemented interface in the docs.
* | Revert "Add a check for mixed linkage"Matthias Clasen2022-06-271-24/+0
|/ | | | | | | This reverts commit e5b62c8c27599699fa583a18e5346138799d9f50. No longer needed. We've renamed everything to avoid conflicts, instead.
* Fix handling of ligature carets in some casesfix-lig-carets-sinhalaMatthias Clasen2022-06-241-1/+1
| | | | | | | | | | With a text of "ර් ", we were accidentally producing a cursor position outside of the [start_xpos, end_xpos] range, which clearly makes no sense. Test included. Fixes: #684
* Add a check for mixed linkageprevent-mixed-linkageMatthias Clasen2022-06-231-0/+24
| | | | | | | | Having both pango 1.x and pango 2 linked into the same process will cause trouble, because the type and function names conflict. Error out if we detect this situation.
* Merge branch 'GitS7-main-patch-22994' into 'main'Matthias Clasen2022-06-221-1/+2
|\ | | | | | | | | Update pango/pangowin32-fontmap.c, Do not enum Type-1-fonts See merge request GNOME/pango!625
| * Update pango/pangowin32-fontmap.cGitS72022-06-201-6/+1
| |
| * Update pango/pangowin32-fontmap.cGitS72022-06-171-0/+6
| |
* | Avoid overflow when calculating caret slopeMatthias Clasen2022-06-211-1/+1
|/ | | | This showed up as wrong slopes with font size > 60.
* fc: Notify :n-items when neededlistmodel-propertiesMatthias Clasen2022-06-101-0/+2
| | | | | Notify :n-items when reloading the configuration, since that may change the number of families.
* Add listmodel properties to PangoFontMapMatthias Clasen2022-06-101-0/+59
| | | | | Add :item-type and :n-items properties, which make the list model implementation more useful.
* Add listmodel properties to PangoFontFamilyMatthias Clasen2022-06-101-1/+56
| | | | | Add :item-type and :n-items properties, which make the list model implementation more useful.
* Merge branch 'survive-without-fonts' into 'main'Matthias Clasen2022-04-131-1/+6
|\ | | | | | | | | | | | | layout: Try harder to survive without fonts Closes #680 See merge request GNOME/pango!610
| * Apply 1 suggestion(s) to 1 file(s)survive-without-fontsMiloš Komarčević2022-04-111-1/+1
| |
| * layout: Try harder to survive without fontsMatthias Clasen2022-04-081-1/+6
| | | | | | | | | | | | | | | | No great typography can be expected without fonts, but we should try not to crash, since this situation can apparently happen on Windows. Fixes: #680
* | itemize: Be more defensivenull-fontsMatthias Clasen2022-04-121-4/+10
| | | | | | | | | | Let them have their NULL fonts. Produce hexboxes without criticals.
* | Merge branch 'win32-sans-serif' into 'main'Matthias Clasen2022-04-111-1/+2
|\ \ | | | | | | | | | | | | pangowin32: register a "Sans-Serif" font See merge request GNOME/pango!613
| * | pangowin32: register a "Sans-Serif" fontChristoph Reiter2022-04-111-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | This creates a fake font family which will fall back to the first available font in the alias list and as a result pango_win32_font_map_load_font() will no longer fail for "sans-serif". This was already done for other aliases, but for some reason not for "sans-serif". See #680
* | pangowin32: try harder to load a fontChristoph Reiter2022-04-111-1/+44
|/ | | | | | | | | | | load_fontset() in pangowin32 has various fallback code in case no font is found, but load_font() doesn't and just returns NULL in more cases. I saw that the other backends like fc and coretext just call load_fontset() in load_font() and return the first one. This copies this strategy to the win32 backend.
* Merge branch 'fix-rtl-cursor-move' into 'main'Matthias Clasen2022-03-311-2/+2
|\ | | | | | | | | | | | | Fix move pango_layout_move_cursor_visually Closes #679 See merge request GNOME/pango!608
| * Fix move pango_layout_move_cursor_visuallyfix-rtl-cursor-moveMatthias Clasen2022-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | When moving the cursor off the paragraph end to the left in RTL text, we were moving to the previous line, and not to the next line, as expected. Test included. Fixes: #679
* | Coretext: fix clang build failure.John Ralls2022-03-221-3/+0
|/ | | | | Recent versions of clang notice that pango_core_text_fontset_load_font's `key` local variable isn't used and errors out. Remove it.
* AVoid a use-after-free in pango_attr_list_changeMatthias Clasen2022-03-181-0/+3
| | | | | | | | | This was showing up as crashes in pitivi and inkscape. The added test does not crash, but it does produce the wrong result without the fix. Fixes: #678
* Maintain order in pango_attr_list_changeMatthias Clasen2022-03-181-0/+3
| | | | | | | When PangoAttrList was changed to use an array, we lost the code that maintained non-decreasing order in pango_attr_list_change. Bring it back, and add a test for this.
* Drop the hb-glib dependency againMatthias Clasen2022-03-091-2/+1
| | | | | | It is not really needed. Fixes: #674
* Meson: Clean up HarfBuzz searchChun-wei Fan2022-02-211-12/+4
| | | | | | | | | | | Pango 1.50.x and later require a HarfBuzz version that is buildable via Meson, so we can just use the standard dependency() call for HarfBuzz for all builds. This means that we can drop all the items where we search for HarfBuzz manually. Also remove the stray HarfBuzz items that are no longer used.
* layout: Handle baselinesbaseline-handlingMatthias Clasen2022-02-171-2/+64
| | | | | | | During post-processing for lines, take into account the baselines for each run, and shift them vertically to align them on the dominant baseline.
* pango/pango-version-macros.h: Mention correct version check macroGuido Günther2022-01-271-1/+1
| | | | | Pango names it PANGO_VERSION_CHECK not PANGO_CHECK_VERSION (like glib). Fix the one incorrect mention in the documentation comment.