| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Make pango_font_family_list_faces() return faces
sorted by slant and weight. This makes the font
chooser look much less random.
|
|\
| |
| |
| |
| |
| |
| | |
Add pango_fc_font_map_set_default_substitute
Closes #83
See merge request GNOME/pango!191
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
added:
pango_fc_font_map_set_default_substitute
pango_fc_font_map_default_substitute_changed
deprecated:
pango_ft2_font_map_set_default_substitute
pango_ft2_font_map_changed
pango_xft_font_map_set_default_substitute
pango_xft_font_map_changed
Now PangoCairoFcFontMap will call what is passed to
pango_fc_font_map_set_default_substitute when it is time.
The deprecated functions make calls to the parent (FC) class now.
The user-supplied callbacks are executed in the exact same places as
before.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
This #if snuck in as part of efa66e7b634050ef3.
No need to keep it around.
|
| |
| |
| |
| |
| |
| | |
We can do the format filtering on the unsorted
font lists. Sorting the same list twice may be
fast, but there's still some setup overhead.
|
| |
| |
| |
| |
| | |
We were needlessly duplicating patters when we
could have just referenced them.
|
| |
| |
| |
| |
| |
| |
| | |
If we bail out early, we end up with uninitialised data and no way for a
caller to know that happened.
Fixes: #489
|
|/
|
|
|
| |
Fixes https://gitlab.gnome.org/GNOME/pango/-/issues/484 and
https://gitlab.gnome.org/GNOME/pango/-/issues/457
|
|
|
|
| |
I believe this was meant to assign to variable and not res.
|
|
|
|
|
|
| |
We don't have introspection for fontconfig and freetype2 data types.
While we do have introspection for Harfbuzz, it doesn't really work.
|
|
|
|
|
|
|
| |
- Clarify that the function can return NULL
- Fix annotations
- Allow passing NULL as name to get a guaranteed default face.
- Map the default name to "Regular" in the FC backend
|
|
|
|
| |
We can implement this a bit better in the fontconfig backend.
|
|
|
|
|
| |
Reimplement GListModel in the fontconfig backend.
This implementation avoids memory copies.
|
|
|
|
|
| |
Since we've run out of slots in PangoFontClass,
this is implemented with a vfunc in PangoFontMapClass.
|
| |
|
|
|
|
| |
This lets us get a face by name.
|
|
|
|
| |
This lets us get a PangoFontFamily by name.
|
|
|
|
|
| |
Apparently, people have fonts without formats,
so better don't assert, just silently skip those.
|
|
|
|
|
|
|
|
| |
Some people have been seeing this assertion getting
hit. So don't assert, simply skip fonts that don't
have format information.
Fixes: https://gitlab.gnome.org/GNOME/pango/issues/431
|
|
|
|
|
|
|
| |
Electron apps seem to include a static copy of a
too old version of harfbuzz. Error out with a clear
message in this broken situation, instead of
segfaulting later.
|
|
|
|
|
|
| |
We are now producing an FcFontSet that has only
font patterns with supported formats, so we no
longer need to skip NULL fonts.
|
|
|
|
|
| |
As Behdad pointed out, we were mixing up font
format filtering and coverage trimming.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FontConfig uses FreeType’s FT_Get_X11_Font_Format() to get the font
format. From the list of font formats it supports, only “TrueType” and
“CFF” are supported by HarfBuzz. We now check explicitly for supported
formats and reject anything else:
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/internal/services/svfntfmt.h#n36
FreeType, however, seems to use “CFF” for both OpenType fonts with CFF
table (.otf) and bare CFF fonts (.cff), but the later are not supported
by HarfBuzz although they rather rare (outside of PDF files, which
shouldn’t be rendered with Pango), so it should be OK.
|
|
|
|
|
|
|
|
| |
Make pango_fontset_foreach skip fonts that
in formats that harfbuzz doesn't support.
Some reshuffling was necessary since previously
the code was assuming that the first NULL
indicates the end of available fonts.
|
|
|
|
| |
We don't want to list fonts if we can't handle them.
|
| |
|
| |
|
|
|
|
| |
This is now unused.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
We were just returning a boolean, leaving
it up to luck to match coverage level enum values.
|
|
|
|
|
|
| |
Make PangoCoverage a GObject, and subclass
it in pangofcfontmap.c. This lets us use
the FcCharSet without copying the data.
|
|
|
|
|
|
| |
This drops the language dependency and
coverage levels, both of which are not
used in pango.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The variable face is somewhat special, and we don't want
to confuse things by calling it 'Regular' (since it doesn't
have a style).
|
|
|
|
|
| |
This is very straightforward, since fontconfig has
a field for this.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Instead of a O(n^2.log(n)), we now do O(n) by avoiding calling
FcFontList for each PangoFontFace, and FcFontMatch in
pango_fc_face_describe().
Makes pango-list over 100 times faster for me.
|
| |
|
|
|
|
|
| |
Apple Color Emoji for example has multiple strikes... We were
only listing first.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=792231
|
|
|
|
|
|
|
|
| |
We call pango_fc_font_key_init on a stack-allocated temporary
lookup key, with the expectation that it does not have to be
freed. In the case where we want to use it as key in the font_hash,
we call copy() on it. So, don't duplicate the variations string
in init() - it will get duplicated in copy() later.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This commit lets PangoFontDescription carry font variation
information as a string. Only pangocairo has been updated
to make use of this information. We pass it to harfbuzz
for shaping, and we pass it to cairo when creating scaled
fonts.
|
|
|
|
|
|
| |
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=778663
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These checks are preceded by other checks or code which demonstrates
that the values are definitely always non-NULL.
In the case of pango_attr_list_insert_internal(), the final branch of
the function never needs to update list->attributes_tail, as the middle
branch handles the case of appending to the list. The final case is just
for insertions in the middle of the list.
Coverity IDs: 1391710, 1391711
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://bugzilla.gnome.org/show_bug.cgi?id=778654
|
|
|
|
|
|
|
|
| |
The fallback code for conversion from fontconfig font weights
to PangoWeight was mixing up PANGO_WEIGHT_SEMILIGHT and
PANGO_WEIGHT_LIGHT.
https://bugzilla.gnome.org/show_bug.cgi?id=749635
|