| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
When we look up our font from the list of fonts that we enumerated from
the system, follow what the CoreText backend does, so that if the font
gravity in the font description is getting in our way to find the font,
look for it again without the gravity.
This will enable us to find the font that really exists but was not found
due to FontDescription attributes.
Partially fixes #583.
|
| |
|
|\
| |
| |
| |
| | |
pangowin32: Clear cmap on finalize
See merge request GNOME/pango!318
|
| |
| |
| |
| |
| | |
Implement copy method for format_4_cmap and format_12_cmap, and
free don't leak the struct.
|
| |
| |
| |
| |
| | |
Remove leftovers like #Type, reduce indentations
to avoid markdown block quotes, etc.
|
|/
|
|
|
|
|
| |
Originally suggested by Philipp Withnall in
https://bugzilla.gnome.org/show_bug.cgi?id=778655
Fixes: #268
|
|
|
|
|
|
|
| |
the `Cursive` default fallback to not load/work on Windows
It should be `comic` and not `commic`.
Signed-off-by: Naveen M K <naveen@syrusdark.website>
|
|
|
|
|
| |
We want to use pure markdown, since docbook
is going away as the intermediate format.
|
|
|
|
| |
Declare variables at the top of the block...
|
| |
|
| |
|
|
|
|
|
|
|
| |
Currently, because of the g_once_init*, only the very first font map
that is created will get the correct list of aliases. With these changes
the fontmap class loads the aliases once, and this hash table is used
by all fontmap objects.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The document of [CreateDCA][1] says:
> If lpszDriver or lpszDevice is DISPLAY, the thread that calls
> CreateDC owns the HDC that is created. When this thread is
> destroyed, the HDC is no longer valid. Thus, if you create the HDC
> and pass it to another thread, then exit the first thread,
> the second thread will not be able to use the HDC.
So this change introduces GPrivate to fix potential problem.
This also fixes the problem caused by accessing the global
variable DC directly, which makes some early call to Pango functions
fail.
(e.g., failure of calling pango_win32_font_description_from_logfontw
from _get_system_font_name in GTK.)
[1]: https://docs.microsoft.com/windows/win32/api/wingdi/nf-wingdi-createdca
|
|
|
|
|
| |
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
|