| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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
|
|
|
|
| |
svn path=/trunk/; revision=2677
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-07-30 Behdad Esfahbod <behdad@gnome.org>
* docs/pango-sections.txt:
* docs/tmpl/pango-renderer.sgml:
* pango/pango-renderer.c:
* pango/pango-renderer.h:
New public API:
PangoRenderer::draw_glyph_item()
pango_renderer_draw_glyph_item()
Make layout and layout-line default renderers go through
draw_glyph_item(), which then by default falls back to
draw_glyphs(). The advantage in draw_glyph_item() is that it
has access to the text and cluster information.
* pango/pangocairo.h:
* pango/pangocairo-render.c:
New public API:
pango_cairo_show_glyph_item()
svn path=/trunk/; revision=2674
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-10-24 Behdad Esfahbod <behdad@gnome.org>
Bug 472629 – Add pango_renderer_get_layout(_line)
* pango/pango-renderer.h:
* pango/pango-renderer.c:
New public API:
pango_renderer_get_layout()
pango_renderer_get_layout_line()
* pango/pangocairo-render.c (pango_cairo_renderer_draw_shape),
(release_renderer), (_pango_cairo_do_layout_line),
(_pango_cairo_do_layout): Use above API to simplify
shape_renderer implementation.
* pango/pango.def:
* docs/pango-sections.txt:
* docs/tmpl/pango-renderer.sgml:
Update.
svn path=/trunk/; revision=2460
|
|
|
|
|
|
|
|
|
|
|
| |
2007-08-21 Behdad Esfahbod <behdad@gnome.org>
Bug 468953 – pango-renderer.c: using function without prototype
* pango/pango-renderer.c: #include <pango-impl-utils.h>
svn path=/trunk/; revision=2412
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-08-15 Behdad Esfahbod <behdad@gnome.org>
Bug 467056 – Shape attribute handling is not consistent
* pango/pango-impl-utils.h:
* pango/pango-layout.c (pango_layout_line_index_to_x), (shape_run),
(pango_layout_line_x_to_index), (pango_layout_run_get_extents),
(update_run):
* pango/pango-renderer.c (pango_renderer_draw_layout_line):
* pango/pango-utils.c (_pango_shape_shape),
(_pango_shape_get_extents):
Fix handling of extents for shaped runs. Previsouly a shaped run
with more than one character was not correctly positioned.
svn path=/trunk/; revision=2401
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-06-03 Behdad Esfahbod <behdad@gnome.org>
* docs/tmpl/main.sgml:
* pango/pango-layout.c (process_item):
* pango/pango-ot-info.c:
* pango/pango-renderer.c (pango_renderer_draw_layout_line):
Fix various typos reported by Peter Moulder.
svn path=/trunk/; revision=2329
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-04-30 Behdad Esfahbod <behdad@gnome.org>
* pango/pango-types.h: Move PANGO_UNITS_ROUND here...
* pango/pangofc-private.h: ...from here.
* pango/pango-gravity.c: Document that pango_gravity_to_rotation()
returns angle in radians but pango_matrix_rotate() takes degrees.
* pango/pango-layout.c (pango_layout_run_get_extents):
* pango/pango-renderer.c (pango_renderer_draw_layout_line):
Retain metrics hinting when centering baseline (used for Latin, etc
in vertical mode).
* pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_metrics),
(pango_cairo_fc_font_glyph_extents_cache_init): Respect metrics
hinting setting when moving glyphs around for vertical writing.
* pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new): Apply
the gravity rotation before the pattern's matrix, such that
vertical text gets correct italic direction.
* pango/pangocairo-font.c (_pango_cairo_font_get_hex_box_info):
Make hexbox font inherit most properties from the current font.
That is, bold hexbox digits for a bold font, etc.
svn path=/trunk/; revision=2238
|
|
|
|
|
|
|
|
|
| |
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>
* pango/pango-renderer.c (pango_renderer_draw_layout_line): Fix
background rendering being off in presence of rise attributes.
svn path=/trunk/; revision=2148
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-01-08 Behdad Esfahbod <behdad@gnome.org>
* docs/pango-sections.txt:
* docs/tmpl/glyphs.sgml:
* docs/tmpl/main.sgml:
* pango/pango-context.c (itemize_state_add_character):
* pango/pango-item.h:
* pango/pango-layout.c (pango_layout_run_get_extents):
* pango/pango-renderer.c (pango_renderer_draw_layout_line):
Don't introduce bitfields in public struct and rename PangoAnalysis.
centered_baseline to PangoAnalysis.flags and introduce
PANGO_ANALYSIS_FLAGS_CENTERED_BASELINE.
svn path=/trunk/; revision=2134
|
|
|
|
| |
svn path=/trunk/; revision=2130
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-12-05 Behdad Esfahbod <behdad@gnome.org>
* docs/pango-sections.txt:
* docs/tmpl/layout.sgml:
* pango/pango-layout.c (pango_layout_get_lines_readonly),
(pango_layout_get_line_readonly),
(pango_layout_iter_get_run_readonly),
(_pango_layout_iter_get_line), (pango_layout_iter_get_line),
(pango_layout_iter_get_line_readonly):
* pango/pango-layout.h:
* pango/pango-renderer.c (pango_renderer_draw_layout):
* pango/pango.def:
Add new functions:
pango_layout_iter_get_line_readonly()
pango_layout_get_lines_readonly()
pango_layout_iter_get_line_readonly()
pango_layout_iter_get_run_readonly()
These should be used when you do not intend to modify the run/line,
which is more than most of the time. So, update your app, benefit
from more optimizations (in this case, line extents caching)!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-12-04 Behdad Esfahbod <behdad@gnome.org>
Bug 135683 – Cache glyphstring extents
* pango/pango-layout.c (pango_layout_get_lines),
(pango_layout_get_line), (pango_layout_line_leaked),
(pango_layout_line_get_extents), (pango_layout_line_new),
(pango_layout_iter_get_run), (pango_layout_iter_get_line):
Cache line extents. Line extents are cached only if the user doesn't
have a pointer to the line or any of its runs. Functions that give
away such pointers mark the line as "leak"ed.
* pango/pango-layout.c (pango_layout_index_to_line_and_extents),
(pango_layout_xy_to_index), (pango_layout_index_to_pos):
Use _pango_layout_iter_get_line() which is like
pango_layout_iter_get_line() but doesn't leak the line.
* pango/pango-layout-private.h: Add pango_layout_iter_get_line()
duplicate _pango_layout_iter_get_line_readonly() that doesn't leak
the line.
* pango/pango-renderer.c (pango_renderer_draw_layout): Use
_pango_layout_iter_get_line_readonly().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-12-04 Behdad Esfahbod <behdad@gnome.org>
* pango/pango-renderer.c (pango_renderer_draw_layout_line),
(pango_renderer_draw_glyphs), (pango_renderer_draw_rectangle),
(pango_renderer_draw_error_underline),
(pango_renderer_draw_trapezoid), (pango_renderer_draw_glyph),
(pango_renderer_activate), (pango_renderer_deactivate),
(pango_renderer_set_color), (pango_renderer_get_color),
(pango_renderer_part_changed), (pango_renderer_prepare_run),
(pango_renderer_set_matrix): Replace PANGO_IS_RENDERER with
PANGO_IS_RENDERER_FAST that is just a NULL-check.
|
|
|
|
|
|
|
|
|
| |
2006-11-30 Behdad Esfahbod <behdad@gnome.org>
* pango/pango-renderer.c (pango_renderer_draw_layout_line):
Don't call into pango_glyph_string_extents() if we don't need anything
out of it! (Ok, that function returns immediately in that case, but
still, avoiding the call overhead.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-09-11 Behdad Esfahbod <behdad@gnome.org>
Bug 347146 – underline/overstrike spaces
* pango/pango-renderer.c (add_underline), (add_strikethrough),
(pango_renderer_draw_layout_line): Use logical extents for
x and width of underline/strikethrough, such that trailing spaces are
correctly handled.
* pango/pango-layout.c (pango_layout_run_get_extents): Use logical
rect for underline/strikethrough, and reflect that in run ink extents.
* pango/pango-layout.c (pango_layout_line_get_extents): Don't
let runs with empty ink extents affect total ink extents.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-08-15 Behdad Esfahbod <behdad@gnome.org>
* pango/pango-layout.c (pango_layout_run_get_extents):
* pango/glyphstring.c (pango_glyph_string_extents_range):
Return if none of logical_rect or ink_rect is non-NULL.
* pango/pango-item.h (PangoAnalysis): Add new member centered_baseline
which if set, makes item rendered such that ascent == descent.
* pango/pango-context.c (itemize_state_init),
(itemize_state_add_character):
* pango/pango-renderer.c (pango_renderer_draw_layout_line):
Implement centered_baseline.
* pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_metrics): When
adjusting ascent/descent for vertical fonts, adjust strikethrough and
underline position too.
* docs/tmpl/main.sgml: Document new struct member.
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-07-08 Behdad Esfahbod <behdad@gnome.org>
* pango/glyphstring.c (pango_glyph_string_get_width):
* pango/pango-glyph.h:
* pango/pango-layout.c (pango_layout_line_index_to_x),
(pango_layout_line_x_to_index), (pango_layout_line_get_x_ranges):
* pango/pango-renderer.c (pango_renderer_draw_layout_line): Fix silly
error in implementation of pango_glyph_string_get_width(), and also
remove unused font parameter from its signature.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-07-08 Behdad Esfahbod <behdad@gnome.org>
Part of Bug 135683 – Cache glyphstring extents
* docs/pango-sections.txt:
* docs/tmpl/glyphs.sgml:
* pango/pango.def:
* pango/pango-glyph.h:
* pango/glyphstring.c (pango_glyph_string_get_width): New function.
Much faster than calling pango_glyph_string_extents and using
logical_rect.width.
* pango/pango-renderer.c (add_underline), (add_strikethrough),
(pango_renderer_draw_layout_line): Use the new function for
optimization.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-06-06 Behdad Esfahbod <behdad@gnome.org>
Followup on previous change.
* pango/pango-renderer.c: Note that pango_renderer_draw_rectangle
and pango_renderer_draw_error_underline should be called with
active renderer.
* pango/pangocairo-render.c (pango_cairo_renderer_draw_glyphs),
(_pango_cairo_do_glyph_string), (_pango_cairo_do_layout_line),
(_pango_cairo_do_layout): Remove excess cairo_save/restore() calls.
* pango/pangocairo-render.c (_pango_cairo_do_error_underline): Don't
go through renderer.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
2006-02-11 Behdad Esfahbod <behdad@gnome.org>
Bug 330795 – pango_renderer_draw_glyph segfaults when trying to call
the class vfunc
Opened by Torsten Schoenfeld
* pango/pango-renderer.c (pango_renderer_draw_trapezoid,
pango_renderer_draw_glyph): Bail if method is not implemented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2006-02-02 Behdad Esfahbod <behdad@gnome.org>
Finish the 'glyph 0' work of this morning:
PANGO_GLYPH_NULL that I introduced is renamed to
PANGO_GLYPH_EMPTY. It means, no rendering should
be performed. The backends however, still return
0 if a glyph is not found. The modules then are
free to replace this 0 glyph with an unknown
character.
* modules/arabic/arabic-fc.c, modules/basic/basic-atsui.c,
modules/basic/basic-fc.c, modules/basic/basic-win32.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-fc.c, modules/tibetan/tibetan-fc.c,
pango/pangox.c, pango/pangowin32.c:
Adapt to above change. Backends return 0 if glyph not
found.
* pango/fonts.c (pango_font_get_glyph_extents): If font
is not usable (!PANGO_IS_FONT (font)), return the generic
UNKNOWN_GLYPH metrics. This is used when your backends
are misconfigured and you don't find *any* font at all.
* pango/pango-engince.c: Add unknown glyphs in fallback
shaper, instead of empty glyphs.
* pango/shape.c: Call the fall-back shaper if shaper
fails, instead of generating a dummy glyph string ourselves.
* pango/pango-layout.c (imposed_shape, shape_tab): Use
PANGO_GLYPH_EMPTY instead of glyph 0.
* pango/pango-renderer.c (pango_renderer_draw_glyph): No-op on
PANGO_GLYPH_EMPTY instead of glyph 0.
* pango/pangocairo-atsuifont.c, pango/pangocairo-win32font.c,
pango/pangocairo-fcfont.c, pango/pangocairo-font.c,
pango/pangocairo-private.h: install_font returns a boolean now.
* pango/pangocairo-render.c, pango/pangoxft-render.c: Handle font
and hex-box failures more gracefully by drawing a generic
unknown-box glyph.
* pango/pangoft2.c, pango/pangoft2-render.c: Draw the generic
unknown-box glyph here too. For unknown glyphs though, if
the font is TTF (FT_IS_SFNT), use the zero-indexed glyph,
otherwise, draw a box of proper size.
|