summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* pangodwrite-fontmap: Add APIs to query font description from Windows fontspango2-windowsChun-wei Fan2022-08-012-10/+143
| | | | | | | | | | | | | Add 2 APIs for querying the Pango2FontDescription that corresponds to the specified Windows LOGFONTW (GDI font) or IDWriteFont, largely using the code that we already have in the DirectWrite support. Notice that with the LOGFONTW path, we use DirectWrite's GDI interop to acquire a IDWriteFont first and then go down the same (existing) route as when we use a IDWriteFont, since it may be necessary to use LOGFONTW's since Windows APIs such as SystemParametersInfoW() return LOGFONTW's instead of IDWriteFont's, but DirectWrite has more fine-grained support for font properties than GDI.
* pangodwrite-fontmap.cpp: Set up DirectWrite GDI interopChun-wei Fan2022-08-011-0/+15
| | | | | | | This makes our DirectWrite fontmap object to set up GDI interop, since there are times when we still need to deal with GDI LOGFONTW objects, such as when we query the system fonts via SystemParametersInfoW() where the returned Windows font object is a LOGFONTW.
* gtkjsonprinter.c: Don't check for <0x20 to output \uXXXX stringsChun-wei Fan2022-08-011-1/+1
| | | | | | | | | Apparently the check for character values less than 0x20 to determine whether to output \uXXXX in leau of the actual UTF-8 strings break the layout test on Windows. Just print the UTF-8 string as-is unless specifically set to output only ascii lines.
* docs: Typo fixMatthias Clasen2022-07-311-1/+1
|
* Fix confusion about tab unitsMatthias Clasen2022-07-311-3/+3
| | | | We were mixing up Pango units and pixels here.
* fontmap: Fixes for fallbackMatthias Clasen2022-07-091-1/+10
| | | | | | We were mishandling getting items from the fallback, and we were not sending all required change notification when setting fallback.
* CosmeticsMatthias Clasen2022-07-091-1/+1
|
* generic: Try without language tooMatthias Clasen2022-07-091-0/+10
| | | | | | It turns out that fonts are unreliable in claiming support for und-zsye or und-zsym, so try without language before giving up.
* Use Emoji script when itemizing text emojiMatthias Clasen2022-07-091-6/+19
| | | | | This is an attempt at improving font selection for text-presentation Emoji.
* Support Emoji presentationMatthias Clasen2022-07-0914-270/+603
| | | | | | | | | Add a context property and attribute for influencing the presentation of Emoji. Emoji whose presentation is explicitly set in the text via variation selectors are not changed. Related: #298
* fontconfig: Be more careful with generic familiesMatthias Clasen2022-07-091-3/+7
| | | | | | Actually skip non-monospace fonts for 'Monospace', and skip color Emoji fonts when we're not assembling the 'Emoji' alias.
* pango-list: Dump generic familiesMatthias Clasen2022-07-091-8/+31
|
* Add pango2_generic_family_get_familiesMatthias Clasen2022-07-092-0/+95
| | | | This is useful when dumping fontmaps.
* PangoTabArray: API tweaksMatthias Clasen2022-07-095-63/+113
| | | | Allow specifying tab positions in spaces.
* 0.91pango2-color-paletteMatthias Clasen2022-07-041-4/+21
|
* pangowin32-utils.c: Add aliases as from Pango-1.xChun-wei Fan2022-07-041-6/+103
| | | | | | | | | This adds more font families for the PangoFontMap for the aliases that we are using, as per what we did in Pango-1.x, sans the families that we share for different Unicode needs, which would be used in fallback fontmaps. Fallbacks would be added in a later commit, when it is clearer for how to create a PangoFontMap for that purpose.
* Windows: Split out code for aliases (and fallbacks)Chun-wei Fan2022-07-044-33/+91
| | | | | | | We want to make this code shared between the DirectWrite code and the legacy GDI code, since we want to add aliases (and eventually, fallbacks) for all cases, at least on Windows (well, font family names do not differ between DirectWrite and GDI on a given Windows system :))
* pangocairo-font.c: Only acquire cairo_font_face_t from PangoFont via FreeTypeChun-wei Fan2022-07-041-0/+7
| | | | | | ... for now, until https://github.com/harfbuzz/harfbuzz/issues/3683 is resolved. See discussion in https://gitlab.gnome.org/GNOME/pango/-/merge_requests/602.
* Support color palettes in fontsMatthias Clasen2022-07-0427-144/+680
| | | | | | | | | | | | | | | | | | | | | | | Add a pango_context_set_palette to select whether we prefer the default palette, the palette for light background, or the palette for dark background. Also add a palette attribute that can be used to override this. Make the cairo renderer pick up the palette, and apply it when installing the font for a run. Predefined palette names are "default", "light", "dark", "palette0", "palette1", ... Additionally, PangoHbFace can associate custom names with palette indices. To try this, use the new --palette option of pango-view. Fonts to try this with are Amiri Quran Colored or the Bungee Color family.
* Add pango2_lines_get_trimmed_extentsMatthias Clasen2022-07-042-9/+43
| | | | This was missing
* linebreaker: Apply show flags to line separatorsMatthias Clasen2022-07-041-3/+25
| | | | | | | 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.
* Unset faceid when looking for monospaceMatthias Clasen2022-07-041-4/+3
| | | | | | | We want to keep the characteristics of the font, but the faceid is pointless to keep, since we are explicitly looking for monospace, not the same face.
* Add Pango2HbFaceBuilderMatthias Clasen2022-07-045-235/+438
| | | | | This can replace some of the clunky constructors, and is more extensible, going forward.
* Bump harfbuzz depMatthias Clasen2022-07-041-1/+1
| | | | | This is an attempt to see if the DirectWrite support works better in 4.4.1.
* ci: Fix win32 run scriptsMatthias Clasen2022-07-042-2/+2
| | | | We moved things from pango/ to pango2/.
* build: CosmeticsMatthias Clasen2022-07-041-3/+0
|
* Redo the cairo font codeMatthias Clasen2022-07-041-1/+98
| | | | | | It turns out that the harfbuzz code that gives us native font objects does not always work, so fall back to using cairo-ft on all platforms.
* ci: Don't run HarfBuzz tests on WindowsMatthias Clasen2022-07-041-1/+1
| | | | HarfBuzz does that in its own ci.
* pangodwrite-fontmap.cpp: Fix up Pango2Stretch mappingChun-wei Fan2022-07-041-5/+36
| | | | | | It seems that we weren't getting the Pango2Stretch values from DirectWrite correctly. Seems like the Pango2Stretch enumerations were largely in line with the enumerations indicated by DWRITE_FONT_STRETCH.
* pangocairo-font.c: Fix DirectWrite buildChun-wei Fan2022-07-041-1/+1
| | | | The function called has been renamed. Update accordingly.
* pangodwrite-fontmap.cpp: Fix buildMatthias Clasen2022-07-042-68/+69
| | | | | Fix the build after renaming to pango2. Rename function calls and comments as appropriate.
* Windows: Fix up version resourceMatthias Clasen2022-07-042-10/+12
| | | | | Make sure the version variables are correct in the resource file template, and make up for those that we did not put in to pango_conf in meson.build.
* Undo excessive search/replaceMatthias Clasen2022-07-0446-187/+187
| | | | | We still refer to the project as 'Pango' in docs and comments, even though the prefix now is 'Pango2'.
* Update examples in the docsMatthias Clasen2022-07-045-271/+328
| | | | Sucks that we have to do this manually.
* Add defines for native fontmapsMatthias Clasen2022-07-049-41/+67
| | | | | Add PANGO_HAS_FC/CORE_TEXT/DIRECT_WRITE_FONTMAP macros to let apps check for the presence of native fontmaps.
* pango-view: Remove leftoversMatthias Clasen2022-07-042-155/+1
| | | | | Since we don't have Xft api anymore, the only usable viewer is the cairo one.
* Redo the cairo backend codeMatthias Clasen2022-07-0417-227/+390
| | | | | | | | | | We need to be more careful when creating a cairo font face. Even on Windows or macOS, we may encounter hb_font_t's that haven't been created from a native font, so we need to handle those (if we have freetype). Also simplify the cairo build machinery a bit, and rely more on cairo-features.h.
* Remove the mixed dependency checkMatthias Clasen2022-07-041-22/+0
| | | | With separate namespaces, this is no longer necessary.
* Update newsMatthias Clasen2022-07-041-0/+17
|
* docs: Mention prefix change in migration guideMatthias Clasen2022-07-041-2/+15
|
* Move the code from pango/ to pango2/Matthias Clasen2022-07-04207-259/+260
| | | | | | Life is easier if the src path matches the installed header path prefix, so make them match. Update all users.
* Versioning gymnasticsMatthias Clasen2022-07-043-23/+23
| | | | | | Change our versioning setup from "pango 2.0" to "pango2 1.0". The shared library we install is now libpango2, and the headers go in /usr/include/pango2-1.0/pango2/.
* Convert to the pango2 prefixMatthias Clasen2022-07-04207-16513/+16515
| | | | | | This makes pango 2 not just parallel-installable with pango 1.x, but parallel-usable in the same process.
* README.win32.md: Mention about pixman on ARM64 buildsChun-wei Fan2022-07-041-1/+6
| | | | | | Sadly, building pixman for ARM64 Windows currently requires clang-cl, so let people know that they should not let Pango build pixman for them if they are building for ARM64 Windows.
* README.win32.md: Use UNIX line endingsChun-wei Fan2022-07-041-80/+80
| | | | | Make it more consistent with the other files, since having this file in Windows CR/LF format is not that important anymore.
* README.win32: Convert to MarkDownChun-wei Fan2022-07-042-65/+80
| | | | This makes the text formatting more pleasing to the eye on a web browser.
* Avoid gio in Pango headersMatthias Clasen2022-07-047-1/+8
| | | | | | We had a leftover include in pango-font-family.h. It is not needed, so drop it and instead include gio where we use its api.
* Be careful with acosMatthias Clasen2022-07-041-1/+1
| | | | | If the input is outside the [0, 1] range, acos returns NaN, so clamp to be safe.
* README.win32: Update Windows build informationChun-wei Fan2022-07-041-16/+11
| | | | | | | | | | | | | There is no more FontConfig support for Windows for Pango2, and let people know they need DirectWrite support enabled in HarfBuzz and Cairo, which may not be enabled by default. Also let people know that if building HarfBuzz as a fallback as a part of building Pango2, Visual Studio 2017 or later is required to successfully build HarfBuzz. Note that HarfBuzz DLLs built with Visual Studio 2017 or later should be compatible with Pango built with Visual Studio 2015.
* Clean up testsMatthias Clasen2022-07-048-41/+26
| | | | Most tests don't require cairo apis.