| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
We accept NULL for log_attrs, so we should not
crash when we are given NULL. While fixing this,
clarify the documentation of the various shaping
APIs for what they can and cannot do.
Related: !641
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is a difficult dance between HarfBuzz and pango
which glyphs we let hb synthesize, and which ones
we need to fake ourselves.
HarfBuzz knows how to create other spaces from 0x20,
so if the font is lacking spaces, we want to tell
HarfBuzz that we don't have that glyph *except* for
0x20 where we need to fake one, and provide HarfBuzz
with a suitable width.
Update affected tests.
|
|
|
|
|
|
|
|
|
| |
This reverts commit ccb651dd2a876a4f4a4cb9351f05332173e709ba.
This broke vertical text rendering, see
https://gitlab.com/inkscape/inkscape/-/issues/2950.
Update affected tests and add a vertical test.
|
|
|
|
|
|
|
|
|
|
|
| |
HarfBuzz knows how to synthesize spaces, we just
need to tickle it in the right way.
Test included.
Update affected tests.
Fixes: #641
|
|
|
|
|
|
|
|
| |
Even when we show ignorables, we still want to
ignore variation selectors and other ignorables
that we don't have nicks for.
Test included.
|
|
|
|
|
| |
This was showing up as glyphs placed outside
their logical extents.
|
|
|
|
|
| |
Make space actually show up as visible space
when we want that.
|
|
|
|
| |
We want last-one-wins semantics here.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The hb_font_t we were passing to Harfbuzz
for shaping was not taking context transforms
into account, and therefore was not scaling
advance widths as necessary. Always go through
pangos glyph extents to fix this.
Fixes: #620
|
|
|
|
| |
Fold markers always just use 3 {, even when nested.
|
|
|
|
|
| |
GTK needs this information to decide how to
render the glyphs, so provide it.
|
|
|
|
|
|
|
|
| |
Replace ‧ and | with a - when we break there.
Update affected test output.
Fixes: #603
|
|
|
|
|
| |
Rearrange the buffer setup code slightly,
so that we can change it easier, later.
|
| |
|
|
|
|
|
|
| |
Transform the text we hand to harfbuzz, as prescribed
by the text transform attributes we have. This uses
the log attrs to find word starts.
|
|
|
|
|
|
| |
Add a pango_shape API variant that takes log attrs,
so we can implement text transforms that depend on
word boundaries, in the future.
|
|
|
|
| |
Streamline the internals of shape.c a bit.
|
|
|
|
|
| |
We use harfbuzz shaping on all platforms now, so
just merge the code into shape.c
|
|
|
|
| |
Fixes: https://gitlab.gnome.org/GNOME/pango/-/issues/592
|
|
|
|
|
|
|
|
|
|
| |
The careful rounding code that was brought back as a result of commit
d4356779 only had effect if we are using a backend that supported font
hinting, so on other backends, use the former rounding code that was
dropped in favor of the careful rounding code that unfortunately did not
apply for all backends.
Should fix #578.
|
|
|
|
|
|
| |
Add private api to get the necessary information from
the font backend, and drop the hack that was added in
d4356779945855f7cc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we added the round-glyph-positions option in
c43da2d3 and b5634799, we lost some code that was careful
to round in device coordinates.
The reason we lost it is that the rounding needs fontconfig-
specific data that is only available in the backend, and the
rounding now happens in the frontend.
Bringing it back is annoying, since we've run out of vfunc
slots to get info from the backend. This commit works around
that limitation in a hacky way.
Fixes: #562
|
|
|
|
|
| |
The allow-none annotation has been deprecated for a long
time already. Instead use optional and nullable everywhere.
|
|
|
|
| |
Add summaries, convert markup, etc.
|
|
|
|
|
|
|
| |
Discuss problems with extra_attr indices in the
docs for pango_shape() and friends.
See: #511
|
|
|
|
|
| |
The only flag currently defined affects whether
glyph positions are rounded or not.
|
| |
|
|
|
|
| |
It is all harfbuzz now, so call it pango_hb_shape.
|
|
|
|
|
|
| |
Drop internal shape engine uses and call
_pango_fc_shape directly. This makes us
use harfbuzz for shaping, on all backends.
|
| |
|
|
|
|
| |
Missing colon broke the g-ir-scanner.
|
|
|
|
| |
Patch from Rafał Mużyło.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Variant of pango_shape() that takes the full paragraph text as input.
This is then passed in entirety to HarfBuzz, which would allow certain
cross-run interactions (in Arabic for example).
When combined with upcoming HarfBuzz 0.9.5+, this fixes:
Red Hat Bug 858736 - [Spanish] Stray dotted circle rendered
https://bugzilla.redhat.com/show_bug.cgi?id=858736
and partially:
Bug 313181 - color changes break arabic shaping
https://bugzilla.gnome.org/show_bug.cgi?id=313181
|
| |
|
|
|
|
|
| |
Fixed all modules to reverse glyphs if run is rtl. Except for Hangul module.
Fixed pango_shape() to detect that, warn, and reverse.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-12-10 Behdad Esfahbod <behdad@gnome.org>
Bug 478914 – Use something invalid instead of '?' when validating
input text
* pango/pango-layout.c (pango_layout_set_text): Set invalid input
bytes to -1, which gives a unichar value of -1, and eventually a
glyph value of -1, aka PANGO_GLYPH_INVALID_INPUT.
* pango/fonts.c (pango_font_get_glyph_extents),
(pango_font_get_metrics), (pango_font_get_font_map):
* pango/modules.c (build_map):
* pango/pango-context.c (get_script), (get_shaper_and_font),
(string_from_script), (itemize_state_process_run):
* pango/pango-coverage.c (pango_coverage_get):
* pango/pango-impl-utils.h:
* pango/pango-utils.c:
* pango/pangocairo-font.c (pango_cairo_font_get_scaled_font),
(_pango_cairo_font_private_get_hex_box_info),
(_pango_cairo_font_private_get_glyph_extents_missing):
* pango/pangocairo-private.h:
* pango/pangocairo-render.c (_pango_cairo_renderer_draw_frame),
(_pango_cairo_renderer_draw_box_glyph),
(_pango_cairo_renderer_draw_unknown_glyph):
* pango/pangofc-fontmap.c (pango_fc_font_map_get_patterns):
* pango/pangoft2-private.h:
* pango/pangoft2-render.c (pango_ft2_font_render_box_glyph),
(pango_ft2_font_render_glyph), (pango_ft2_renderer_draw_glyph):
* pango/pangoft2.c (pango_ft2_font_get_face),
(pango_ft2_font_get_glyph_extents):
* pango/pangox.c (pango_x_find_subfont), (pango_x_render):
* pango/pangoxft-font.c (_pango_xft_font_get_mini_font),
(get_glyph_extents_missing), (pango_xft_font_get_font):
* pango/pangoxft-private.h:
* pango/pangoxft-render.c (get_total_matrix), (draw_box),
(_pango_xft_renderer_draw_box_glyph),
(_pango_xft_renderer_draw_unknown_glyph),
(pango_xft_renderer_draw_glyphs):
* pango/shape.c (pango_shape):
Render PANGO_GLYPH_INVALID_INPUT to a single-width box with a cross
inside. Also cleanup spewed warnings and warn at the source, where
we fail to find a shaper, instead of at every location that we see
a NULL font.
* pango/pango-font.h:
* docs/pango-sections.txt:
* docs/tmpl/glyphs.sgml:
New public macro:
PANGO_GLYPH_INVALID_INPUT
svn path=/trunk/; revision=2519
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-08-14 Behdad Esfahbod <behdad@gnome.org>
Bug 466755 – pango hangul is crashing in gnome-about because it is
failing to retrieve a font.
* pango/pangofc-font.c (pango_fc_font_real_get_glyph),
(pango_fc_font_kern_glyphs), (pango_fc_font_get_raw_extents):
Protect against NULL face.
* pango/shape.c (pango_shape): Improve error message by writing
out shaping engine type name and the text too.
svn path=/trunk/; revision=2396
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-06-04 Behdad Esfahbod <behdad@gnome.org>
* pango/shape.c (pango_shape): Zero glyphs->num_glyphs before
calling into shape engine.
* pango/pango-engine.c (fallback_engine_shape): Improve, to support
clusters and what not.
* pango/pangocairo-font.c (_pango_cairo_font_get_hex_box_info):
Use "pango_script_get_sample_language (PANGO_SCRIPT_LATIN)" instead
of hardcoding "en".
Handle cairo_scaled_font_extents() failure.
svn path=/trunk/; revision=2332
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
2006-09-13 Behdad Esfahbod <behdad@gnome.org>
* pango/pango-engine.h: Remove unnecessary 'static' in type definition
that causes a relocation.
* pango/shape.c (pango_shape): Make sure last_cluster is invalid.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-09-13 Behdad Esfahbod <behdad@gnome.org>
Part of Bug 355782 – Misaligned extents in pango
* pango/pango-layout.c (cluster_width): Rewrite based on
is_cluster_start instead of accessing log_clusters directly. This is
more robust as next_cluster uses that, so the two match now.
* pango/pango-layout.c (update_cluster): Remove the
cluster_start_index parameter and use iter->cluster_start instead.
* pango/pango-layout.c (pango_layout_iter_copy): Fix typo in copying
iter->cluster_width.
* pango/pango-layout.c (pango_layout_iter_get_cluster_extents): Add
an assert to make sure iter->cluster_width is correctly set.
* pango/pango-layout.c (pango_layout_iter_get_char_extents): Remove
assert that was readded above to check more cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-08-15 Behdad Esfahbod <behdad@gnome.org>
* pango/pango-context.c (itemize_state_add_character):
Fix handling of WEST and EAST gravity effect on bidi level.
* pango/pangocairo-fcfont.c
(pango_cairo_fc_font_glyph_extents_cache_init):
For NORTH gravity (upside down text), swap ascent and descent,
and for EAST/WEST, center baseline between ascent/descent.
* pango/shape.c (pango_shape): If glyph width is negative, negate
it and shift glyph by that amount. This allows having font matrices
that essentially move the glyph origin to the right of the glyph to
still work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-02-21 Behdad Esfahbod <behdad@gnome.org>
* pango/fonts.c, pango/glyphstring.c, pango/pango-fontmap.c,
pango/pango-ot-buffer.c, pango/pangocairo-font.c, pango/pangoft2.c,
pango/pangoxft-font.c, pango/shape.c: Change g_critical to g_warning.
We already handle them gracefully.
Bug 331994 – --disable-debug removes G_DISABLE_CAST_CHECKS
Patch from charlet@act-europe.fr
* configure.in: Do not lose PANGO_DEBUG_FLAGS when reassigning.
Bug 331995 – pango_layout_set_text optimization
Patch from charlet@act-europe.fr
* pango/pango-layout.c: Do not validate input text if asserts are
disabled. Moreover, do not truncate input text on invalid sequence.
Bug 331996 – avoid crashes in win32 font handling
Patch from charlet@act-europe.fr
* pango/pangofc-fontmap.c, pango/pangowin32-fontmap.c,
pango/pangowin32.c: if (!font) return NULL in a number of places.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-02-09 Behdad Esfahbod <behdad@gnome.org>
Bug 314548 – pango_shape() is missing const correctness
Patch from Antoine Dopffer.
* modules/arabic/arabic-fc.c, modules/basic/basic-fc.c,
modules/basic/basic-x.c, modules/hangul/hangul-fc.c,
modules/hebrew/hebrew-fc.c, modules/indic/indic-fc.c,
modules/khmer/khmer-fc.c, modules/syriac/syriac-fc.c,
modules/thai/thai-shaper.c, modules/thai/thai-shaper.h,
modules/tibetan/tibetan-fc.c, pango/pango-context.c,
pango/pango-engine-private.h, pango/pango-engine.c,
pango/pango-engine.h, pango/pango-glyph.h pango/pango-layout.c,
pango/shape.c: Make PangoAnalysis *analysis const in all shaper
interfaces.
|
|
|
|
|
|
|
|
|
|
| |
2006-02-06 Behdad Esfahbod <behdad@gnome.org>
* pango/pango-fontmap.c (pango_font_map_real_load_fontset): Warn
only once per font-description that cannot be loaded.
* pango/pangox.c: Make it not crash if no font found, like other
backends.
|