summaryrefslogtreecommitdiff
path: root/pango/pangofc-font.c
Commit message (Collapse)AuthorAgeFilesLines
* docs: Reduce redundancydocs-cleanupsMatthias Clasen2021-05-201-2/+2
| | | | | | Remove a boatload of "or %NULL" from nullable parameters and return values. gi-docgen generates suitable text from the annotation that we don't need to duplicate.
* docs: Convert gtk-doc syntax leftoversdocs-cleanupMatthias Clasen2021-05-191-8/+8
| | | | | Remove leftovers like #Type, reduce indentations to avoid markdown block quotes, etc.
* pangofc: Tweak docsMatthias Clasen2021-03-111-19/+11
| | | | Convert link syntax and add summaries.
* docs: Port PangoFc apis to the new doc formatMatthias Clasen2021-03-111-29/+37
| | | | | | Replace gtk-doc'isms and use gi-docgen links instead. Cross-gir links are still an open issue.
* docs: Replace lots of vestigial xml markupMatthias Clasen2021-03-111-10/+5
| | | | | We want to use pure markdown, since docbook is going away as the intermediate format.
* Skip a pangofc accessorEmmanuele Bassi2020-09-301-1/+1
| | | | | | The handwritten fontconfig introspection data does not cover all types, and even if it did, it wouldn't know how to handle their ownership because fontconfig is not a GObject-based API.
* fc: Add a getter for PangoFcFont::patternfont-pattern-getterMatthias Clasen2020-09-211-0/+16
| | | | Properties are better with getters.
* pangofc: Add pango_fc_font_get_languagespreferred-languagesMatthias Clasen2020-09-181-0/+32
| | | | | | | This really belongs into PangoFont, but we're out of room in the PangoFontClass struct for vfuncs, so this will have to remain backend-specific functionality for now.
* Small const correctness fixMatthias Clasen2020-09-171-1/+1
| | | | | | | clang complains that initializing 'FcPattern *' (aka 'struct _FcPattern *') with an expression of type 'const FcPattern *' (aka 'const struct _FcPattern *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] FcPattern *pattern = pango_fc_font_key_get_pattern (key);
* Skip introspection on low level APIEmmanuele Bassi2020-06-081-3/+3
| | | | | | We don't have introspection for fontconfig and freetype2 data types. While we do have introspection for Harfbuzz, it doesn't really work.
* fc: Make sure ink rectangle has positive heightMatthias Clasen2019-08-121-1/+1
| | | | | | | | We are getting extents with negative height from harfbuzz, we have to flip them around. This was causing problems in lilypond. Closes: https://gitlab.gnome.org/GNOME/pango/issues/406
* Use latest version of metrics naming in pangofc-fontEbrahim Byagowi2019-08-101-4/+4
|
* Reinstate the return type of pango_fc_font_lock_face()Matthias Clasen2019-08-061-1/+1
| | | | | | | | | We did not remove the freetype dependency from libpango anyway, so bite the bullet, and keep including freetype headers. Changing the return type to gpointer broke C++ users, where casts from void* are not automatic.
* Set design coords for named instancesMatthias Clasen2019-07-291-84/+47
| | | | | | | | | Fontconfig has FC_INDEX, and harfbuzz has hb_ot_var_named_instance_get_design_coords. We can combine the two to set coords for variable fonts, while taking overridden variations from both the fontconfig configuration and the font description into account.
* Take font matrix into accountMatthias Clasen2019-07-281-0/+19
| | | | | | | | | | | | | When setting up the scale of the hb_font_t, we need to take both the pango ctm and the font matrix into account - this used to come for free when we were calling into cairo for getting glyph metrics. Now, we use harfbuzz for glyph metrics, so we need to give it the proper scale info. The symptom of this was Emoji getting an enormous width. Curiously, cairo would still render them at the expected size.
* Fix up harfbuzz includesMatthias Clasen2019-07-281-1/+1
| | | | | | The correct include is without harfbuzz/. Closes: https://gitlab.gnome.org/GNOME/pango/issues/387
* 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.
* Quiet a compiler warningMatthias Clasen2019-07-201-2/+2
|
* Merge branch 'wip/kill-shape-engine' into 'master'Matthias Clasen2019-07-181-45/+0
|\ | | | | | | | | Kill shape engines See merge request GNOME/pango!75
| * fc: Stop providing a shape engineMatthias Clasen2019-07-181-45/+0
| | | | | | | | It is no longer used.
* | Make hb fonts immutable in the frontendMatthias Clasen2019-07-181-2/+0
|/ | | | | | It makes more sense to do this in the frontend that hands the objects out, rather than in each backend implementation.
* fc: Drop freetype from pangofc-font.hMatthias Clasen2019-07-181-1/+1
| | | | | Stop using FT_Face here, so we can stop including freetype headers.
* fc: Drop some gratitious use of FT typesMatthias Clasen2019-07-181-12/+2
|
* fc: Deprecate FT_Face gettersMatthias Clasen2019-07-181-0/+2
| | | | | We are moving away from a freetype dependency, so these will be going away at some point.
* fc: Use harfbuzz for glyph extentsMatthias Clasen2019-07-181-63/+28
| | | | Harfbuzz has the api, no need to use freetype.
* fc: Use harfbuzz for font metricsMatthias Clasen2019-07-181-111/+28
| | | | | | Note that some of the harfbuzz api we use here has not landed yet. See https://github.com/harfbuzz/harfbuzz/pull/1432
* fc: Drop the cmap cacheMatthias Clasen2019-07-181-4/+0
| | | | This is now unused.
* fc: Use harfbuzz for glyph lookupMatthias Clasen2019-07-181-42/+4
| | | | We don't need our own caching here.
* fc: Make hb font immutableMatthias Clasen2019-07-181-0/+2
| | | | | | The frontend is caching this object, and we are giving it out to applications. We really can't allow them to modify it in any way.
* fc: Move font setup code from the shaperMatthias Clasen2019-07-181-23/+119
| | | | | | | | | | | | 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.
* fc: Implement create_hb_fontMatthias Clasen2019-07-181-0/+39
|
* 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.
* Deprecate pango_fc_font_has_charMatthias Clasen2019-07-121-0/+1
| | | | We have pango_font_has_char now.
* 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.
* 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 line height to font metricsMatthias Clasen2019-07-051-20/+39
| | | | Add a getter for the line height of a font.
* Header cleanupMatthias Clasen2019-07-041-1/+1
| | | | | | | 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.
* Drop deprecated instance private data APIEmmanuele Bassi2018-08-301-6/+3
| | | | | | | GLib 2.58 deprecated g_type_class_add_private(), at long last. Use the G_ADD_PRIVATE macro, and the generated instance private data getter function.
* Add assertions to guard against division by zero on sample text pathsPhilip Withnall2017-02-141-1/+4
| | | | | | | | | | | | | There are a few code paths where pango_utf8_strwidth() is called on language-specific sample text. The sample text should have been chosen to never have a zero width, but we should add some assertions to ensure that’s the case. This guides static analysers into the right analysis. Coverity IDs: 1391697, 1391698, 1391699 Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=778602
* Fix MT-unsafe initializationsBehdad Esfahbod2015-04-041-2/+2
|
* Deprecate module system, skip it for shaper modulesBehdad Esfahbod2015-04-041-18/+31
| | | | | | | | | | | | | | 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.
* Add many missing nullability annotations.Evan Nemerson2014-10-161-2/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=731022
* Bug 685167 - migrate docs to no-tmpl flavourBehdad Esfahbod2013-09-271-0/+18
| | | | Patch from Rafał Mużyło.
* Use g_value_take_objectBehdad Esfahbod2012-08-291-3/+1
|
* Port pangofc-font.c to GWeakRefBehdad Esfahbod2012-08-291-24/+26
|
* More churnBehdad Esfahbod2012-08-281-6/+5
|
* Deprecate pango_fc_font_kern_glyphs()Behdad Esfahbod2012-08-251-0/+1
| | | | No use for this anymore.
* Deprecate pango-ot.hBehdad Esfahbod2012-08-231-2/+0
| | | | | | Still needs document Deprecated tags to be done. Soon to add pango-hb.h
* Annotations: add missing colons after symbol namesPavel Holejsovsky2012-06-041-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=677407