| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
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.
|
|
|
|
| |
Fix for memory leaks around PangoWin32Font
|
|
|
|
|
|
| |
These don't have enough meat to warrant turning
them into .md files, so just drop them. They are
no longer used.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Somebody with access to a win32 machine will have
to implement these, as well as overline.
This placeholder should at least fix the build
with draconian compiler flags (-Werror=switch).
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| | |
Kill shape engines
See merge request GNOME/pango!75
|
| |
| |
| |
| | |
It is no longer used.
|
|/
|
|
|
|
| |
It makes more sense to do this in the frontend
that hands the objects out, rather than in each
backend implementation.
|
|
|
|
|
|
|
|
|
| |
This renders correctly in ci.
This attempts to acquire the hb_font_t from the HFont that we acquire
from the Windows HFONT that we use, so that we can pass things to
HarfBuzz, which will handle the shaping for us.
win32: Set scale on hb font
|
| |
|
|
|
|
|
| |
Following information found here:
https://docs.microsoft.com/en-us/windows/win32/gdi/string-widths-and-heights
|
|
|
|
|
|
| |
The meson build uses -Werror=redundant-decls and fails.
https://bugzilla.gnome.org/show_bug.cgi?id=795012
|
|
|
|
|
|
|
| |
Since win32_render_layout and win32_render_layout_line now support
rendering in color, that word no longer applies.
https://bugzilla.gnome.org/show_bug.cgi?id=768679
|
|
|
|
|
|
|
|
| |
Rectangle() uses x1, y1, x2, y2 coordinates instead of x, y, w, h. Fix
the coordinates passed to the function so it draws the background in the
correct location.
https://bugzilla.gnome.org/show_bug.cgi?id=768679
|
|
|
|
|
|
|
| |
Adding 128 to the component value would overflow in colors with full
brightness and set the component to 0.
https://bugzilla.gnome.org/show_bug.cgi?id=768679
|
|
|
|
|
|
|
|
|
| |
If the DC's background mode is set to OPAQUE, ExtTextOut will draw its
own background boxes around glyph items. Since we don't place any
requirements on the DC, set the background mode to TRANSPARENT before
rendering any glyphs (and reset it to its original value afterwards).
https://bugzilla.gnome.org/show_bug.cgi?id=768679
|
|
|
|
|
|
|
|
|
| |
Underline drawing was using the pen selected into DC before
pango_win32_render_layout_line was called. Since layout allow the user to
select underline colors, we have to create a temporary pen in the correct
color before drawing it.
https://bugzilla.gnome.org/show_bug.cgi?id=768679
|
|
|
|
|
|
|
|
|
| |
Increasing the component values by 128 may overflow and result in that
component being treated as 0. Additionally, using a brush to color text
is wrong; ExtTextOut instead uses the color set by SetTextColor to draw
glyphs.
https://bugzilla.gnome.org/show_bug.cgi?id=768679
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Increasing MAX_FREED_FONTS value should make fontset's cache
working normally because of long alias list and available
fonts under Windows 7.
https://bugzilla.gnome.org/show_bug.cgi?id=738868
|
|
|
|
|
|
| |
This patch fixes a leak with lost weak references in fontset.
https://bugzilla.gnome.org/show_bug.cgi?id=738868
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=731022
|
|
|
|
| |
Patch from Rafał Mużyło.
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
The use of Uniscribe script caches was decidedly suboptimal. Use one
persistent SCRIPT_CACHE per Win32 font and script.
Patch by by David E. Hollingsworth and Fredrik Corneliusson, from bug
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-08-12 Sven Herzberg <sven@imendio.com>
Bug 547432: Deprecation of pango_(backend)_font_map_create_context()
not clean
reviewed by: Behdad Esfahbod
* pango/pangocairo-fontmap.c,
* pango/pangofc-fontmap.c,
* pango/pangoft2-fontmap.c,
* pango/pangowin32.c,
* pango/pangox.c,
* pango/pangoxft-fontmap.c: use "Deprecated:" for deprecation messages;
fix the deprecation version number
svn path=/trunk/; revision=2689
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-05 Behdad Esfahbod <behdad@gnome.org>
* pango/pango-context.c:
* pango/pango-context.h:
Make the following API public:
pango_context_new()
pango_context_set_font_map()
* pango/pango-fontmap.c (pango_font_map_create_context):
* pango/pango-fontmap.h:
New public API:
pango_font_map_create_context()
* pango/pangocairo-context.c (pango_cairo_create_context):
* pango/pangocairo-font.c (_pango_cairo_font_get_metrics),
(_pango_cairo_font_private_get_hex_box_info):
* pango/pangocairo-fontmap.c (pango_cairo_font_map_create_context):
* pango/pangocairo.h:
Deprecate pango_cairo_font_map_create_context().
* pango/pangofc-font.c (pango_fc_font_get_metrics):
* pango/pangofc-fontmap.c (pango_fc_font_map_create_context):
* pango/pangofc-fontmap.h:
Deprecate pango_fc_font_map_create_context().
* pango/pangoft2-fontmap.c (pango_ft2_font_map_create_context),
(pango_ft2_get_context):
* pango/pangoft2.h:
Deprecate pango_ft2_font_map_create_context().
* pango/pangowin32.c (pango_win32_get_context),
(pango_win32_font_get_metrics):
* pango/pangowin32.h:
Deprecate pango_win32_get_context().
* pango/pangoxft-font.c (_pango_xft_font_get_mini_font):
* pango/pangoxft-fontmap.c (pango_xft_get_context):
* pango/pangoxft.h:
Deprecate pango_xft_get_context().
* pango/pangox-fontmap.c (pango_x_font_map_for_display):
* pango/pangox.c (get_context_info), (pango_x_get_context),
(pango_x_context_set_funcs), (pango_x_render_layout_line):
Deprecate pango_x_get_context(), again.
* docs/pango-sections.txt:
* docs/tmpl/fonts.sgml:
* pango-view/viewer-pangocairo.c (pangocairo_view_get_context):
* pango-view/viewer-pangoft2.c (pangoft2_view_get_context):
* pango-view/viewer-pangox.c (pangox_view_get_context):
* pango-view/viewer-pangoxft.c (pangoxft_view_get_context):
* pango/check.defs:
* pango/pango.def:
Update.
svn path=/trunk/; revision=2675
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-26 Tor Lillqvist <tml@novell.com>
* pango/pangowin32.c
* pango/pangowin32-fontmap.c: Some whitespace cleanup.
svn path=/trunk/; revision=2636
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-03 Behdad Esfahbod <behdad@gnome.org>
Bug 531242 – Leak when calculating win32 font coverage
Patch from Daniel Atallah
* pango/pangowin32.c (pango_win32_font_calc_coverage): Plug leak.
svn path=/trunk/; revision=2623
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-01-14 Behdad Esfahbod <behdad@gnome.org>
Bug 469313 – Add pango_layout_set_height()
Bug 508179 – PangoGlyphUnit confusion
* pango/pango-layout.h:
* pango/pango-layout-private.h:
* pango/pango-layout.c:
* pango/ellipsize.c (_pango_layout_line_ellipsize):
New public API:
pango_layout_set_height()
See docs for semantics. Currently only negative height values (number
of lines) is implemented.
* pango-view/viewer-render.c (make_layout), (output_body),
(parse_options):
Implement --height.
* pango/pango.def:
* docs/pango-sections.txt:
* docs/tmpl/layout.sgml:
Update.
2008-01-14 Behdad Esfahbod <behdad@gnome.org>
Bug 508179 – PangoGlyphUnit confusion
* pango/pangowin32.c:
* pango/glyphstring.c:
* pango/pango-layout.c (process_item): Remove all traces of
#PangoGlyphUnit
svn path=/trunk/; revision=2542
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-03-10 Tor Lillqvist <tml@novell.com>
* pango/pangowin32-private.h
* pango/pangowin32.c
* pango/pangowin32-fontcache.c
* pango/pangowin32-fontmap.c
* pango/pangocairo-win32font.c
* pango/pangowin32.def: Move functions defined in one file and
used in another to the file where used, make them static, and drop
from pangowin32-private.h. Prefix all private non-static functions
with underscore. Also functions used only by the pangocairo DLL
are considered private. (#120195)
svn path=/trunk/; revision=2213
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-02-26 Tor Lillqvist <tml@novell.com>
This change was supposed to go in the trunk before 1.16.0, but it
didn't quite get there in time. So, to have a clear cut for this
somewhat fundamental change in underlying workings (although there
should be no user-visible changes), I will build and distribute
Win32 binaries only starting from 1.16.1.
Use wide character API for fonts on Windows. Rename functions and
variables that deal with LOGFONTW structs to emphasize
this. (#407315)
* pango/pangowin32.c
* pango/pangowin32-fontcache.c
* pango/pangowin32-fontmap.c: Use LOGFONTW all over the place
instead of LOGFONT, and adapt code accordingly. Use wide character
Win32 API.
* pango/pangowin32.c (pango_win32_font_neww): Renamed from
pango_win32_font_new(), as it now takes a LOGFONTW pointer. This
is a private function and can be renamed though it is exported as
it is used from the pangocairo DLL.
(pango_win32_font_logfont): Mention explicitly in doc comment that
it returns a LOGFONTA, and recommend to use
pango_win32_font_logfontw() instead.
(pango_win32_font_logfontw): New function.
* pango/pangowin32-fontcache.c
(pango_win32_font_cache_load): Must keep this function that takes
a LOGFONTA pointer as it is declared in the public header.
(pango_win32_font_cache_loadw): New public function that takes a
LOGFONTW pointer.
* pango/pangowin32-fontmap.c
(pango_win32_font_description_from_logfont): Mention explicitly in
the doc comment that it takes a LOGFONTA pointer.
(pango_win32_font_description_from_logfontw): New public function
that takes a LOGFONTW pointer.
(pango_win32_make_matching_logfontw): Rename from
pango_win32_make_matching_logfont() to emphasize it takes a
LOGFONTW pointer.
* pango/pangowin32.h: Declare new public functions.
* pango/pangowin32-private.h: Declare new private functions, drop
removed ones.
* pango/pangocairo-win32font.c (_pango_cairo_win32_font_new):
Simplify now that we call pango_win32_make_matching_logfontw().
* pango/pangowin32.def: Add new functions, rename internal
functions that now use LOGFONTW.
2007-02-26 Tor Lillqvist <tml@novell.com>
Fix brokenness in the code that tries to ensure that all fonts
also have italic variants. Now the code hopefully actually does
what it was supposed to. (Which is not necessarily the right thing
to do, though. It can be argued that we should not list
synthesized italic font styles, we should just silently generate
them if asked for. We don't want synthesized italic (or synthesized
bold) styles showing up in the font selector. They don't show up
when using a fontconfig-based Pango backend either.) (#110521)
* pango/pangowin32-fontmap.c
(logfont_nosize_hash, logfont_nosize_equal): Don't use the
lfItalic field as such, just its nonzeroness. When being
enumerated, italic fonts show up with lfItalic=255, but our code
looks up italic versions of fonts by passing a key LOGFONT with
lfItalic=1.
(first_match): Not needed any more, see below.
(ensure_italic): This is now called on the entries in the
size_infos hash table, not families. The code used to randomly
look for the first matching font in size_infoswith the family name
being handled.
(pango_win32_font_map_init): Iterate through the size_infos hash
table with ensure_italic, not through the families table.
* pango/pangowin32-fontcache.c
(logfontw_hash, logfontw_equal): Look at just nonzeroness of
lfItalic here, too.
svn path=/trunk/; revision=2204
|
|
|
|
|
|
|
|
|
| |
2007-01-16 Behdad Esfahbod <behdad@gnome.org>
*.c, *.h: Replace preceding sequences of 8 spaces with tabs.
svn path=/trunk/; revision=2165
|
|
|
|
|
|
|
|
|
| |
2007-01-16 Behdad Esfahbod <behdad@gnome.org>
*.c, *.h: Drop trailing whitespace.
svn path=/trunk/; revision=2163
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-01-16 Behdad Esfahbod <behdad@gnome.org>
* examples/cairotwisted.c (draw_text):
* pango/pangocairo-win32font.c (max_glyph_width):
* pango/pangofc-font.c (max_glyph_width):
* pango/pangowin32.c (max_glyph_width),
(pango_win32_render_layout):
* pango/pangox.c (pango_x_render_layout):
Use pango_layout(_iter)?_get_line_readonly() instead of
pango_layout(_iter)?_get_line().
svn path=/trunk/; revision=2146
|
|
|
|
| |
svn path=/trunk/; revision=2130
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-09-11 Behdad Esfahbod <behdad@gnome.org>
Bug 355435 – Invalid calls to pango_map_get_engine()
Patch from Theppitak Karoonboonyanan
* pango/break.c (pango_get_log_attrs):
* pango/pango-renderer.c (add_underline):
* pango/pangofc-font.c (pango_fc_font_find_shaper):
* pango/pangowin32.c (pango_win32_font_find_shaper):
* pango/pangox.c (pango_x_font_find_shaper):
Pass a PangoScript to pango_map_get_engine, not a gunichar!
|