| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
in ada1bc9385d638e4c42, I switched to using ink rects
for horizontal underline extents, to improve the placement
of single-character underlines in the presence of
kerning. I overlooked the fact that spaces don't have ink,
so the change caused leading and trailing whitespace to
not be underlined anymore. Fix this by using the union
of ink and logical rectangles.
Fixes: #613
|
|
|
|
|
| |
Fix a warnings about garbage values that are
showing up in the gtk static-scan build.
|
|
|
|
|
|
|
|
|
|
|
| |
Apply horizontal displacements for superscripts and subscripts
that are provided in font metrics. This noticably improves the
placement of superscripts in italics.
Currently, we only apply these displacements in post-processing,
and ignore the width changes during line-breaking. This could
be improved by moving the baseline handling into the line-breaking
proper.
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new baseline-shift attribute, which is similar to
rise, but accumulates. In addition, it supports font-
relative values such as superscript and subscript.
We implement support for this by computing baseline
shifts for run during line post-processing, and storing
them in the runs. The renderer now takes these shifts
into account when rendering layout lines.
|
|
|
|
|
|
|
|
|
| |
When rendering underlines and the like, we should use
ink extents, since the logical extents will get shortened
by kerning, which can be pretty noticable when underlining
individual glyphs, such as the T in To.
Fixes: #139
|
| |
|
|
|
|
|
|
|
|
| |
Before dividing by num_glyphs in draw_strikethrough,
make sure it isn't 0. This should fix reported crashes
in this function.
Fixes: #599
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 85bdfead1b36945db251 I made consecutive runs average
their strikeout positions, but I did handle the accounting
properly, causing previous runs to influence the strikeout
of later runs, if we have to draw them separately (due to
color change).
It would be nicer to average even across color changes and
draw the line continuously in that case as well, but that
would require two passes over the runs.
Fixes: #574
|
|
|
|
|
|
| |
Remove a boatload of "or %NULL" from nullable parameters
and return values. gi-docgen generates suitable text from
the annotation that we don't need to duplicate.
|
|
|
|
|
| |
Remove leftovers like #Type, reduce indentations
to avoid markdown block quotes, etc.
|
|
|
|
|
| |
The allow-none annotation has been deprecated for a long
time already. Instead use optional and nullable everywhere.
|
|
|
|
| |
Mainly for my own education.
|
|
|
| |
This reverts merge request !309
|
|
|
|
|
|
|
| |
Extend the PangoUnderline and PangoOverline enumerations to
cover dashed and dotted variants of the various lines, add
api to PangoRenderer to render such lines, and implement it
in the cairo renderer.
|
|
|
|
| |
Add summaries, convert markup, etc.
|
|
|
|
| |
Replace gtk-doc'isms and use gi-docgen links instead.
|
| |
|
|
|
|
|
| |
We want to use pure markdown, since docbook
is going away as the intermediate format.
|
|
|
|
|
|
|
|
|
|
| |
This reverts the ABI break caused by adding the overline to the public
data structure, and is binary- and source-compatible with Pango 1.45.0
and older, but not compatible with versions 1.45.1 to 1.46.0 inclusive.
Resolves: https://gitlab.gnome.org/GNOME/pango/-/issues/497
Bug-Debian: https://bugs.debian.org/968337
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
|
|
|
|
|
|
| |
We need to check if height is zero before dividing by it.
For completeness, check width at the same time.
This was pointed out in
https://gitlab.gnome.org/GNOME/pango/-/merge_requests/167
|
| |
|
|
|
|
|
|
| |
This matches what web browsers do.
Fixes https://gitlab.gnome.org/GNOME/pango/issues/432
|
|
|
|
|
|
|
| |
Implement overlines in PangoRenderer.
This adds a new render part, and mirrors
the machinery we have for underlines and
strikethrough.
|
|
|
|
|
|
| |
Average strikethrough position and thickness across
consecutive struckthrough runs. This gives an OK
result in common cases.
|
|
|
|
|
|
|
| |
Handle these by using the lowest position across
a sequence of runs with the same underline.
Closes: https://gitlab.gnome.org/GNOME/pango/issues/62
|
|
|
|
| |
Clean up some headers, and shovel docs around.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Use the new _pango_layout_get_iter and _pango_layout_iter_destroy
instead.
https://bugzilla.gnome.org/show_bug.cgi?id=788643
|
|
|
|
| |
Owen and I agreed that this doesn't look right.
|
|
|
|
|
|
|
|
|
|
|
| |
When calling into cairo to render glyphs, we want
to use show_text_glyphs and pass the text along,
if the surface supports that operation. But here,
we throw the text away prematurely and end up
always end passing no text or clusters down to
cairo.
https://bugzilla.gnome.org/show_bug.cgi?id=784394
|
|
|
|
|
| |
Some compilers insist on using a number for a guint16 return type, and does
not like using NULL in place of 0, so fix this.
|
|
|
|
|
|
| |
Add pango_renderer_get/set_alpha to allow associating alpha
values with the various colors. The alpha is stored as a value
between 0 and 65536, with 0 meaning 'unset'.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=731022
|
|
|
|
| |
This reverts commit 19a252d9a3d63e7816f9a77bab65bd161675440a.
|
| |
|
|
|
|
| |
Oops
|
| |
|
| |
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=681423
|
| |
|
|
|
|
|
|
|
| |
G_CONST_RETURN is headed for deprecation (as per bug #644611). Stop
using it in Pango.
https://bugzilla.gnome.org/show_bug.cgi?id=652202
|
|
|
|
| |
G_DEFINE_ABSTRACT_TYPE
|
|
|
|
| |
pango_renderer_get_layout
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-28 Behdad Esfahbod <behdad@gnome.org>
Bug 560792 – Make PangoLayoutLine with line->layout==NULL renderable
* pango/pango-renderer.c (pango_renderer_draw_layout_line),
(pango_renderer_draw_glyph_item), (pango_renderer_set_matrix):
Handle line->layout == NULL.
svn path=/trunk/; revision=2814
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-12-25 Behdad Esfahbod <behdad@gnome.org>
Bug 469049 – Fix all compiler warnings
* pango-view/viewer-pangocairo.c (render_callback):
* pango/fonts.c (append_field), (pango_font_description_to_string):
* pango/opentype/harfbuzz-dump.c:
* pango/pango-bidi-type.c (pango_log2vis_get_embedding_levels):
* pango/pango-coverage.c (pango_coverage_set):
* pango/pango-markup.c (span_parse_func):
* pango/pango-renderer.c
(pango_renderer_default_draw_error_underline):
* pango/pango-utils.c (pango_scan_string):
* pango/pangocairo-render.c (pango_cairo_renderer_draw_trapezoid),
(draw_error_underline), (pango_cairo_renderer_class_init):
Fix all the remaining warnings.
svn path=/trunk/; revision=2767
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-12-25 Behdad Esfahbod <behdad@gnome.org>
* pango/break.c (pango_default_break):
* pango/fonts.c (find_field_any), (pango_font_class_init),
(pango_font_init), (pango_font_metrics_ref),
(pango_font_metrics_unref), (pango_font_family_class_init),
(pango_font_family_init), (pango_font_face_class_init),
(pango_font_face_init):
* pango/pango-attributes.c (pango_attr_list_ref),
(pango_attr_list_unref), (pango_attr_iterator_get_font):
* pango/pango-layout.c (pango_layout_set_height), (extents_free),
(no_shape_filter_func), (pango_layout_line_ref),
(pango_layout_line_unref), (pango_layout_get_item_properties):
* pango/pango-markup.c (end_element_handler), (text_handler),
(b_parse_func), (big_parse_func), (span_parse_func),
(i_parse_func), (markup_parse_func), (s_parse_func),
(sub_parse_func), (sup_parse_func), (small_parse_func),
(tt_parse_func), (u_parse_func):
* pango/pango-ot-info.c (get_glyph_class):
* pango/pango-renderer.c (get_item_properties),
(pango_renderer_default_prepare_run):
* pango/pango-utils.c (_pango_shape_shape):
* pango/pangocairo-fcfontmap.c
(pango_cairo_fc_font_map_get_font_type),
(pango_cairo_fc_font_map_context_substitute),
(pango_cairo_fc_font_map_context_key_get),
(pango_cairo_fc_font_map_context_key_copy),
(pango_cairo_fc_font_map_context_key_free),
(pango_cairo_fc_font_map_context_key_hash),
(pango_cairo_fc_font_map_context_key_equal):
* pango/pangocairo-fontmap.c
(pango_cairo_font_map_new_for_font_type),
(pango_cairo_font_map_set_default):
* pango/pangocairo-render.c (pango_cairo_renderer_init):
* pango/pangox-fontcache.c (free_cache_entry):
* pango/pangox-fontmap.c (close_display_cb),
(list_families_foreach), (pango_x_font_map_load_font),
(ignore_error):
* pango/pangox.c (average_width_foreach), (subfonts_foreach),
(pango_x_font_find_shaper), (pango_x_get_unknown_glyph),
(pango_x_get_item_properties), (pango_x_apply_ligatures),
(pango_x_font_get_unknown_glyph):
* pango/pangoxft-fontmap.c (pango_xft_font_map_init),
(close_display_cb):
* pango/querymodules.c (show_version):
Fix warnings.
svn path=/trunk/; revision=2765
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-12-09 Behdad Esfahbod <behdad@gnome.org>
Bug 563803 – pango_renderer_finalize fails to call parent finalize
* pango/pango-renderer.c (pango_renderer_class_init),
(pango_renderer_finalize): Call parent finalize.
* pango/pango-renderer.c (add_strikethrough),
(pango_renderer_default_draw_glyph_item),
(pango_renderer_default_draw_error_underline):
Clean up a bit.
svn path=/trunk/; revision=2755
|