summaryrefslogtreecommitdiff
path: root/pango/pangofc-private.h
Commit message (Collapse)AuthorAgeFilesLines
* Support per-item gravity.Behdad Esfahbod2006-08-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-08-20 Behdad Esfahbod <behdad@gnome.org> Support per-item gravity. * pango/pango-context.c (update_attr_iterator), (itemize_state_init), (itemize_state_update_for_new_run), (itemize_state_process_run): Make per-item gravity work, by setting gravity into font description before loading fonts. Also, allow the context font description to override the gravity (but not centered_baseline.) * pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new): Get gravity from font description, not context. * pango/pangofc-fontmap.c (fontset_hash_key_equal), (fontset_hash_key_hash), (fontset_hash_key_copy), (pango_fc_make_pattern), (pango_fc_font_map_get_patterns), (pango_fc_font_map_load_fontset), (pango_fc_font_description_from_pattern): Get gravity from font description, not context. Moreover, put it into pattern, and reconstruct it out of font patterns. * pango/pangofc-private.h: Define PANGO_FC_GRAVITY, which is the key we put PangoGravity into an FcPattern under.
* Fixes #322174:Federico Mena Quintero2005-11-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-11-22 Federico Mena Quintero <federico@ximian.com> Fixes #322174: * pango/pangofc-font.h (struct _PangoFcFont): Replace the "gpointer context_key" field with "gpointer priv". This way we can access the private data quickly, instead of using g_type_instance_get_private(). * pango/pangofc-private.h: Added prototypes for _pango_fc_font_{get,set}_context_key(). * pango/pangofc-font.c (struct _PangoFcFontPrivate): Moved the "context_key" field to here. (PANGO_FC_FONT_GET_PRIVATE): Use the "priv" field instead of GType private data. (pango_fc_font_class_init): Don't register GType private data. (pango_fc_font_init): Initialize the private data here. (pango_fc_font_finalize): Free the private data. (_pango_fc_font_get_context_key): Implement. (_pango_fc_font_set_context_key): Implement. (pango_fc_font_get_glyph): Remove the g_return_val_if_fail(); it was appearing quite high in the profile. * pango/pangofc-fontmap.c (pango_fc_font_map_add): Call _pango_fc_font_set_context_key() instead of setting the fcfont->context_key directly. (_pango_fc_font_map_remove): Likewise; also use _pango_fc_font_get_context_key() instead of accessing the field directly.
* Cut out the meat of pango_fc_font_get_metrics_for_context() and export itOwen Taylor2005-08-151-0/+11
| | | | | | | | | | 2005-08-15 Owen Taylor <otaylor@redhat.com> * pango/pangofc-font.c (pango_fc_font_create_metrics_for_context) pango/pangofc-private.h pango/pangocairo-fcfcont.c: Cut out the meat of pango_fc_font_get_metrics_for_context() and export it (privately), so that PangoCairoFcFont can create a variant that sets the font options on the context it creates. (#311522)
* Add checks for CairoOwen Taylor2005-01-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sat Jan 8 16:46:37 2005 Owen Taylor <otaylor@redhat.com> * configure.in: Add checks for Cairo * pango/Makefile.am: Add libpangocairo. * pango/pangocairo-font.c pango/pangocairo-fontmap.c pango/pangocairo.h pango/pangocairo-private.h pango/pangocairo-fcfont.c pango/pangocairo-fcfontmap.c pango/pangocairo-fc.h: Start of a Cairo/FreeType backend. * pango/pangofc-fontmap.[ch]: Add a "get_render_key" virtual function to allow subclasses to specialize the details of how caching works. Add a default implementation that's a little more sophisticated than what was there before. * pango/pangoft2-private.h pangofc-font.c pangoft2.c: Move default implementations of has_char(), get_glyph() to the base class. * pango/pangofc-private.h pango/pangoft2-private.h: Move PANGO_UNITS_26_6 and friends to pango/pangofc-private.h. * examples/renderdemo.[ch] examples/pangoft2topgm.c examples/xftview.c: Allow passing in a custom function to transform drawing. * examples/Makefile.am examples/cairoview.c: Add a Cairo/Xlib example program. * examples/cairosimple.c: Simple Cairo example with output to a PNG. * pango/pango-layout.c (pango_layout_line_get_extents): Fix bug where line ink rect was always including 0, 0.
* Need to export this function as a symbol if not in the header file sinceOwen Taylor2004-07-191-5/+5
| | | | | | | | | Fri Jul 16 10:29:40 2004 Owen Taylor <otaylor@redhat.com> * pango/pangofc-font.c pango/pangofc-private.h (pango_fc_font_get_raw_extents): Need to export this function as a symbol if not in the header file since it is used by PangoXft.
* Add hinted/transform flags to the font structure to allow efficientOwen Taylor2004-07-101-0/+6
| | | | | | | | | | | | | | | | | | Sat Jul 10 16:39:44 2004 Owen Taylor <otaylor@redhat.com> * pango/pangofc-font.[ch]: Add hinted/transform flags to the font structure to allow efficient conditionalization of behavior rather than repeatedly extracting the information from the FcPattern. * pango/pangofc-font.c pango/pangofc-private.h pango/pangoft2.c: Move the glyph metrics computation into a _pango_fc_font_get_raw_extents() function that can be shared with the Xft backend. * pango/pangoxft.c: When a transform is in effect, don't get glyph extents from Xft ... they are device space and not useful, use _pango_fc_font_get_raw_extents() instead.
* Add export of pangofc-decoder.h. Build pangofc-decoder.c.Christopher Blizzard2004-06-091-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wed Jun 9 17:32:59 2004 Christopher Blizzard <blizzard@redhat.com> * pango/Makefile.am: Add export of pangofc-decoder.h. Build pangofc-decoder.c. * pango/pangofc-decoder.h pango/pangofc-decoder.c: New files. Virtual base class for any custom font decoders. * pango/pangofc-font.c: Add new PangoFcFontPrivate structure. * pango/pangofc-font.c (pango_fc_font_class_init): Attach new private structure using g_type_class_add_private(). * pango/pangofc-font.c (pango_fc_font_finalize): Make sure to unset any decoders that are attached to the font. * pango/pangofc-font.c (pango_fc_font_get_coverage): When determining coverage, use a custom decoder if available. * pango/pangofc-font.c (pango_fc_font_has_char): When determining if a font has a character, use a custom decoder if available. * pango/pangofc-font.c (pango_fc_font_get_glyph): When doing single character to glyph convertions, use a custom decoder if available. * pango/pangofc-font.c (_pango_fc_font_get_decoder): New function. Get the custom decoder for the given font. * pango/pangofc-font.c (_pango_fc_font_set_decoder): New function. Set a custom decoder for the given font. * pango/pangofc-fontmap.c: Add structure PangoFcFindFuncInfo to keep track of callbacks to create custom decoders. Modify PangoFcFontMapPrivate by adding a list of PangoFcFontFuncInfo callbacks that have been registered. * pango/pangofc-fontmap.c (pango_fc_font_map_add_find_func): New function. Add callbacks to the fontmap that will create custom decoders when pango creates new fonts. * pango/pangofc-fontmap.c (pango_fc_font_map_finalize): Clear out any findfuncs that have been registered and notify them about destruction. * pango/pangofc-fontmap.c (pango_fc_font_map_new_font): When creating new fonts, call back to any registered find functions so they can create custom decoders for those fonts. Attach those custom decoders to the newly created fonts. * pango/pangofc-fontmap.c (_pango_fc_font_map_get_coverage): Change the argument to take a PangoFcFont instead of an FcPattern. Call _pango_fc_font_map_fc_to_coverage instead of doing the conversion inline. * pango/pangofc-fontmap.c (_pango_fc_font_map_fc_to_coverage): New function. Convert an FcCharSet to a PangoCoverage object. * pango/pangofc-fontmap.h: New declarations for pango_fc_font_map_add_decoder_find_func and PangoFcDecoderFindFunc. * pango/pangofc-private.h: New declarations for _pango_fc_font_map_fc_to_coverage, _pango_fc_font_get_decoder and _pango_fc_font_set_decoder.
* Make pangoxft depend on pangoft2.Owen Taylor2003-08-031-0/+39
Sat Aug 2 14:33:28 2003 Owen Taylor <otaylor@redhat.com> * pango/Makefile.am (libpangoxft_1_0_la_LIBADD): Make pangoxft depend on pangoft2. * pango/pangofc-fontmap.[ch]: Make pangofc-fontmap.cI into a real base class. * pango/pangofc-font.[ch]: Move some of the pangoxft/ pangoft2 implementation here. * pango/pangoft2.c pango/pangoft2-fontmap.c pango/pangoft2-private.h pango/pangoxft-font.c pango/pangoxft2-fontmap.c pango/pangoxft-private.h: Adapt to the new scheme * modules/*/Makefile.am Modules/*/*/*-fc.c: Don't build separate FT2 and Xft shapers, just build one Fc shaper. * docs/pango-sections.txt docs/pango-docs.sgml docs/tmpl/pangofc-font{,map}.sgml: Basic docs for the new stuff. * configure.in: Up pango_module_version to 1.4.0.