| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Since we've run out of slots in PangoFontClass,
this is implemented with a vfunc in PangoFontMapClass.
|
| |
|
|
|
|
|
| |
Use hb_font_get_nominal_glyph in pango_win32_font_get_glyph_index
(deprecated), to better match what Pango is actually using internally.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
We don't need this anymore since we need Vista or later to run.
|
|
|
|
| |
Get rid of the tabs...
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
These were ifdefed to an older version of GLib
than we require now, so are just dead code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hardcoding it for some fonts.
We only had a fallback list for "Segoe UI" which is the default Windows font, but not on
Chinese or Korean Windows version which use "JhengHei UI" etc. and fall back to "Segoe UI".
Instead of hardcoding the fallbacks in the alias list read them from the registry
(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink)
This should allow us to use the default Windows font by default in gtk+ on Win8+,
see https://gitlab.gnome.org/GNOME/gtk/merge_requests/436 for details.
This also bumps the required Windows version to Vista for RegGetValueW().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an Emoji font family that maps to the following fonts in this order
(by fallback):
Segoe UI Emoji
Segoe UI Symbol
Segoe UI
This will enable Emoji to be displayed correctly in GTK+ apps (without
the use of FontConfig) on Windows Vista and later, providing that one
of the aforementioned fonts are installed.
Note that this only enables Emoji display (*not* colored ones) as
achieving colored Emoji requires PangoWin32 and Cairo to be ported to
Direct2D and DirectWrite from Uniscribe and GDI, as Uniscribe and GDI
does not support colored Emoji.
https://bugzilla.gnome.org/show_bug.cgi?id=794705
|
|
|
|
|
|
|
|
| |
Add finalizers to PangoWin32FontMap
Patch from Geoffrey Yerem.
Part of https://bugzilla.gnome.org/show_bug.cgi?id=764089
|
| |
|
|
|
|
| |
Part of Bug 733882 - Kill Pango modules, engines, and config files
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on patch from Chun-wei Fan. Original patch comments:
Improve the thread-safety situation on Windows by only allowing the
pango_aliases_ht GHashTable be populated once.
Pango on Windows is not yet thread-safe, but with the thread safety
patch on Cairo-Win32-Font[1], it does seem that the test program
test-pangocairo-threads does not crash randomly anymore, which seems
to be an improvement.
[1]: https://bugs.freedesktop.org/show_bug.cgi?id=73012
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=695913
|
|
|
|
| |
Patch from Rafał Mużyło.
|
|
|
|
| |
Based on patch from Chun-wei Fan.
|
|
|
|
| |
Patch from Chun-wei Fan.
|
|
|
|
|
|
| |
When win32 fontmap goes away, font->fontmap becomes NULL. Deal
with that. Technically speaking, we need to port this to GWeakRef
like the other fontmaps do. But this would do for now.
|
|
|
|
|
| |
g_type_init has been deprecated in GLib 2.35.x. Use a
version check here to avoid depending on unstable GLib.
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now need a load_fontset() implementation for the Windows backend as the
pango.aliases handling is moved to pangowin32-fontmap.c since commit
831611158, so that it will go through the pango.aliases file and load
the appropriate fontset needed to display various texts.
This basically copies pango_font_map_load_fontset() from pango-fontmap.c
and adds the old (pre-commit 831611158) pango_font_map_fontset_add_fonts(),
but using pango_win32_font_map_load_font() in place of
pango_font_map_load_font().
|
|
|
|
|
|
| |
-Include glib/gstdio.h for g_fopen
-Make up for a missed #endif
-correct an internal function name, pango_load_aliases to load_aliases
|
| |
|
| |
|
| |
|
|
|
|
| |
Part of Bug 377539 - (pango-threadsafe) Make Pango thread-safe
|
|
|
|
| |
Add missing semicolon.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
indicate weight or stretch into the corrersponding Pango font
description setting and stripped those word(s) from the family name.
Personally I liked the effect this had on the GTK+ font picker,
combining all weight and stretch variants of what de facto is one
typeface family (for instance DejaVu) under one family name. But Bulia
Byak reported that this caused regressions in Inkscape. So OK then.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-22 Behdad Esfahbod <behdad@gnome.org>
Bug 143542 – PangoFT2Fontmap leak
* pango/fonts.c:
* pango/pangoatsui.c (pango_atsui_font_finalize),
(_pango_atsui_font_set_font_map):
* pango/pangocairo-font.c (_pango_cairo_font_get_metrics),
(_pango_cairo_font_private_get_hex_box_info):
* pango/pangocairo-win32font.c (_pango_cairo_win32_font_new):
* pango/pangofc-font.c (pango_fc_font_get_metrics):
* pango/pangofc-fontmap.c (pango_fc_font_map_add),
(_pango_fc_font_map_remove), (cleanup_font):
* pango/pangowin32-fontmap.c (pango_win32_font_neww),
(pango_win32_font_map_real_find_font):
* pango/pangowin32.c (pango_win32_font_finalize):
* pango/pangox-fontmap.c (pango_x_font_map_load_font):
* pango/pangox.c (pango_x_font_new), (pango_x_font_finalize):
Make the reference the font->fontmap reference weak.
The code for setting the reference must look like this:
g_assert (font->fontmap == NULL);
font->fontmap = (PangoFontMap *) fontmap;
g_object_add_weak_pointer (G_OBJECT (font->fontmap), (gpointer *) (gpointer) &font->fontmap);
And releasing it like:
g_assert (font->fontmap != NULL);
g_object_remove_weak_pointer (G_OBJECT (font->fontmap), (gpointer *) (gpointer) &font->fontmap);
font->fontmap = NULL;
I have converted all fontmaps. The win32 and atsui ones can
use some simple testing.
The PangoFc fonts actually don't need the weakref as the fontmap
already provides a similar link by itself.
svn path=/trunk/; revision=2704
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-06-21 Johan Dahlin <jdahlin@async.com.br>
* *.[ch]: Include "config.h" instead of <config.h>
Command used:
find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
Rubberstamped by Behdad
svn path=/trunk/; revision=2657
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-28 Tor Lillqvist <tml@novell.com>
* pango/pangowin32-fontmap.c
(pango_win32_font_description_from_logfont)
(pango_win32_font_description_from_logfontw):
Map words that indicate weight and slant in the font name into the
corresponding Pango font description settings, and strip those
words from the family name. This maps for instance the DejaVu
Sans, DejaVu Sans Condensed and DejaVu Sans Light fonts into a
single DejaVu Sans family with styles Ultra-Light, Condensed,
Oblique Condensed, Oblique, Bold Condensed, Bold, Bold Oblique
Condensed, and Bold Oblique, which is nice.
svn path=/trunk/; revision=2644
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-28 Tor Lillqvist <tml@novell.com>
* pango/pangowin32-fontmap.c (synthesize_foreach)
(_pango_win32_font_map_init): Rework face synthesis once
again. Code is simpler now, and we don't needlessly synthesize
bold weights for fonts that have a real semi-bold weight, like
Lucida Sans. (The bold weight ended up looking like the semi-bold
anyway.)
(pango_win32_font_description_from_logfont): Recognize the
semi-bold weight interval.
svn path=/trunk/; revision=2642
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-27 Tor Lillqvist <tml@novell.com>
* pango/pangowin32-fontmap.c (pango_win32_family_list_faces):
After the change to how the standard pseudo font families are set
up below, we don't need to prune out duplicate face names any
longer.
svn path=/trunk/; revision=2641
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-27 Tor Lillqvist <tml@novell.com>
* pango/pangowin32-fontmap.c: Synthesize also Bold and Bold Italic
(or Oblique) faces when feasible. Don't synthesize these for
decorative or script fonts. Kill the magic code snippet mentioned
below. Instead, explicitly create font families for the standard
pseudo fonts that correspond to the first existing font of the
corresponding built-in alias list. Use the face style name Oblique
for slanted sans and monospace fonts, not Italic.
svn path=/trunk/; revision=2639
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-27 Tor Lillqvist <tml@novell.com>
* pango/pangowin32-fontmap.c (pango_win32_family_list_faces):
Prune duplicated face names. Makes the GTK+ font selector look a
bit saner for the "sans", "serif" and "monospace" standard pseudo
font families with just one instance of each style.
That we get duplicated styles in the first place is because of the
magic code snippet in pango_win32_insert_font() that sets up the
list of faces for the standard pseudo font families. I don't like
that code but without it these families wouldn't currently show up
in the font selector at all.
A problem is still that the magic code blindly adds all random
fonts that claim to be FF_ROMAN to the list of faces for the
"serif" family, etc. I think it would be preferrable to do it only
for well-known sensible fonts. That would be those that are listed
in builtin_aliases in pango-utils.c, I guess.
svn path=/trunk/; revision=2638
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-26 Tor Lillqvist <tml@novell.com>
* pango/pangowin32-private.h
* pango/pangowin32-fontmap.c: Drop the PangoWin32FontMap::n_fonts
field which wasn't really used for anything. Rename the field
PangoWin32Family::font_entries to faces. Rename some local
variables to be more consistently named.
svn path=/trunk/; revision=2637
|
|
|
|
|
|
|
|
|
|
| |
2008-05-26 Tor Lillqvist <tml@novell.com>
* pango/pangowin32.c
* pango/pangowin32-fontmap.c: Some whitespace cleanup.
svn path=/trunk/; revision=2636
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-26 Tor Lillqvist <tml@novell.com>
* pango/pangowin32-private.h
* pango/pangowin32-fontmap.c: Drop the PangoWin32SizeInfo struct
and the hash table mapping from the relevant part of a
LOGFONTW struct to a list of PangoWin32SizeInfos in
PangoWin32FontMap. It seems that each list was always of length
one anyway, so instead just map directly to each such single list
member, also a LOGFONTW struct. Actually I wonder whether this map
is needed at all, will have to experiment.
svn path=/trunk/; revision=2635
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-02-24 Tor Lillqvist <tml@novell.com>
Bug 515484: Pango on Windows is missing Type 1
font support
Patch from Adrian Johnson.
* pango/pangowin32-private.h (PangoWin32Face): Add has_cmap field
that tells whether the font has a cmap or not. A Type 1 font
doesn't.
* pango/pangowin32.c (pango_win32_font_get_type1_glyph_index): New
static function. Uses GetGlyphIndicesW() to get the glyph indices
for Type 1 fonts. Possibly also TrueType fonts that for some
reason lack the cmap formats we understand.
(pango_win32_font_calc_type1_coverage): New static function. Uses
GetFontUnicodeRanges() to get the coverage for Type 1 fonts, and
possibly TrueType fonts that lack the cmap formats we understand.
(pango_win32_font_get_glyph_index): Set has_cmap to false if the
font doesn't have a cmap. Call
pango_win32_font_get_type1_glyph_index() in that case.
(pango_win32_font_calc_coverage): Set has_cmap to false if the
font doesn't have a cmap. Call
pango_win32_font_calc_type1_coverage() in that case.
* pango/pangowin32-fontmap.c (pango_win32_enum_proc): Accept also
Type 1 fonts.
(pango_win32_insert_font): Initialise has_cmap tentativaly to True.
svn path=/trunk/; revision=2573
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-02-14 Tor Lillqvist <tml@novell.com>
Bug 515484: Pango on Windows is missing non-TrueType
font support
Patch from Adrian Johnson.
* pango/pangowin32-fontmap.c (pango_win32_enum_proc): Accept also
OpenType/PS fonts. Interpret the metrics parameter as a
NEWTEXTMETRICW struct and check the ntmFlags field.
svn path=/trunk/; revision=2566
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-10-15 Behdad Esfahbod <behdad@gnome.org>
Bug 483600 – Leak of font family name in
pango_win32_font_description_from_logfont(w)
Patch from Daniel Atallah
* pango/pangowin32-fontmap.c
(pango_win32_font_description_from_logfont),
(pango_win32_font_description_from_logfontw):
Free family.
svn path=/trunk/; revision=2446
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-06-20 Behdad Esfahbod <behdad@gnome.org>
* pango/fonts.c (pango_font_description_get_type),
(pango_font_metrics_get_type):
* pango/glyphstring.c (pango_glyph_string_get_type):
* pango/pango-attributes.c (pango_attr_list_get_type):
* pango/pango-color.c (pango_color_get_type):
* pango/pango-item.c (pango_item_get_type):
* pango/pango-language.c (pango_language_get_type):
* pango/pango-layout.c (pango_layout_line_get_type),
(pango_layout_iter_get_type):
* pango/pango-matrix.c (pango_matrix_get_type):
* pango/pango-ot-info.c (pango_ot_info_get_type):
* pango/pango-ot-ruleset.c (pango_ot_ruleset_get_type):
* pango/pango-tabs.c (pango_tab_array_get_type):
* pango/pangoatsui-fontmap.c (pango_atsui_family_get_type),
(pango_atsui_face_get_type):
* pango/pangofc-fontmap.c (pango_fc_face_get_type),
(pango_fc_family_get_type):
* pango/pangowin32-fontmap.c (pango_win32_family_get_type),
(pango_win32_face_get_type):
* pango/pangox-fontmap.c (pango_x_font_map_get_type),
(pango_x_face_get_type), (pango_x_family_get_type):
* pango/pangox.c (pango_x_font_get_type):
Add G_UNLIKELY() to type registration block in _get_type() functions.
svn path=/trunk/; revision=2364
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-06-12 Tor Lillqvist <tml@novell.com>
* pango/pangowin32-private.h (struct PangoWin32Face: Add
is_synthetic field.
* pango/pangowin32-fontmap.c: Implement is_synthesized.
* pango/pangocairo-win32font.c
* pango/pangocairo-win32fontmap.c: Update for the changes to
PangoCairoFontMap and PangoCairoFont.
svn path=/trunk/; revision=2347
|
|
|
|
|
|
|
|
|
|
|
| |
2007-04-30 Tor Lillqvist <tml@novell.com>
* pango/pangowin32-fontmap.c (get_family_nameA, get_family_nameW):
A font name in encoding UCS4_ENCODING_ID actually is in UTF-16,
not UCS-4. (#429397, Akihiro Okamura)
svn path=/trunk/; revision=2237
|
|
|
|
|
|
|
|
|
|
| |
2007-03-14 Tor Lillqvist <tml@novell.com>
* pango/pangowin32-fontmap.c: Add missing declaration of
pango_win32_family_get_type(). (#417946, Ivan Wong)
svn path=/trunk/; revision=2217
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-03-12 Behdad Esfahbod <behdad@gnome.org>
* docs/pango-sections.txt:
* pango/pangowin32-fontmap.c:
* pango/pangowin32.c:
Add new symbols to docs.
svn path=/trunk/; revision=2216
|