From 1e916c95bb218660ed34e9d712969462d9d9c161 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 8 Jun 2000 18:48:32 +0000 Subject: *** empty log message *** --- ChangeLog | 7 ++ ChangeLog.pre-1-0 | 7 ++ ChangeLog.pre-1-10 | 7 ++ ChangeLog.pre-1-2 | 7 ++ ChangeLog.pre-1-4 | 7 ++ ChangeLog.pre-1-6 | 7 ++ ChangeLog.pre-1-8 | 7 ++ docs/Makefile.am | 17 ++++- docs/pango-sections.txt | 31 +++++--- docs/tmpl/fonts.sgml | 170 ++++++++++++++++++++++++++------------------ docs/tmpl/pango-unused.sgml | 75 +++++++++++++++++-- docs/tmpl/x-fonts.sgml | 78 ++++++++++++++++++++ pango/Makefile.am | 1 + pango/itemize.c | 4 +- pango/modules.c | 16 ++--- pango/modules.h | 16 ----- pango/pango-context.c | 7 +- pango/pango-font.h | 8 +++ pango/pango-types.h | 6 -- pango/pangox-fontmap.c | 4 +- pango/pangox-private.h | 2 +- pango/pangox.c | 4 +- 22 files changed, 363 insertions(+), 125 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ec5a0b8..36ee8a82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,11 @@ +Thu Jun 8 14:43:35 2000 Owen Taylor + + * pango/pango-modules.h: pango/Makefile.am: Add a new + header pango-modules.h to export a few parts of the + modules API needed by code for new types of fonts. + 2000-06-08 Elliot Lee + * pango-config.in: Include X_LIBS in libraries for 'pangox' target. 2000-06-07 Havoc Pennington diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0 index 7ec5a0b8..36ee8a82 100644 --- a/ChangeLog.pre-1-0 +++ b/ChangeLog.pre-1-0 @@ -1,4 +1,11 @@ +Thu Jun 8 14:43:35 2000 Owen Taylor + + * pango/pango-modules.h: pango/Makefile.am: Add a new + header pango-modules.h to export a few parts of the + modules API needed by code for new types of fonts. + 2000-06-08 Elliot Lee + * pango-config.in: Include X_LIBS in libraries for 'pangox' target. 2000-06-07 Havoc Pennington diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 7ec5a0b8..36ee8a82 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,4 +1,11 @@ +Thu Jun 8 14:43:35 2000 Owen Taylor + + * pango/pango-modules.h: pango/Makefile.am: Add a new + header pango-modules.h to export a few parts of the + modules API needed by code for new types of fonts. + 2000-06-08 Elliot Lee + * pango-config.in: Include X_LIBS in libraries for 'pangox' target. 2000-06-07 Havoc Pennington diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 7ec5a0b8..36ee8a82 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,4 +1,11 @@ +Thu Jun 8 14:43:35 2000 Owen Taylor + + * pango/pango-modules.h: pango/Makefile.am: Add a new + header pango-modules.h to export a few parts of the + modules API needed by code for new types of fonts. + 2000-06-08 Elliot Lee + * pango-config.in: Include X_LIBS in libraries for 'pangox' target. 2000-06-07 Havoc Pennington diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 7ec5a0b8..36ee8a82 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,4 +1,11 @@ +Thu Jun 8 14:43:35 2000 Owen Taylor + + * pango/pango-modules.h: pango/Makefile.am: Add a new + header pango-modules.h to export a few parts of the + modules API needed by code for new types of fonts. + 2000-06-08 Elliot Lee + * pango-config.in: Include X_LIBS in libraries for 'pangox' target. 2000-06-07 Havoc Pennington diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 7ec5a0b8..36ee8a82 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,4 +1,11 @@ +Thu Jun 8 14:43:35 2000 Owen Taylor + + * pango/pango-modules.h: pango/Makefile.am: Add a new + header pango-modules.h to export a few parts of the + modules API needed by code for new types of fonts. + 2000-06-08 Elliot Lee + * pango-config.in: Include X_LIBS in libraries for 'pangox' target. 2000-06-07 Havoc Pennington diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 7ec5a0b8..36ee8a82 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,4 +1,11 @@ +Thu Jun 8 14:43:35 2000 Owen Taylor + + * pango/pango-modules.h: pango/Makefile.am: Add a new + header pango-modules.h to export a few parts of the + modules API needed by code for new types of fonts. + 2000-06-08 Elliot Lee + * pango-config.in: Include X_LIBS in libraries for 'pangox' target. 2000-06-07 Havoc Pennington diff --git a/docs/Makefile.am b/docs/Makefile.am index 5a3e6d4c..39aa9a03 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,5 +1,19 @@ ## Process this file with automake to create Makefile.in. +pangoheaders = \ + ../pango/pango.h \ + ../pango/pango-attributes.h \ + ../pango/pango-context.h \ + ../pango/pango-coverage.h \ + ../pango/pango-engine.h \ + ../pango/pango-font.h \ + ../pango/pango-fontmap.h \ + ../pango/pango-glyph.h \ + ../pango/pango-item.h \ + ../pango/pango-layout.h \ + ../pango/pango-types.h \ + ../pango/pangox.h + if HAVE_GTK_DOC # The name of the module. @@ -8,11 +22,10 @@ DOC_MODULE=pango # The top-level SGML file. DOC_MAIN_SGML_FILE=pango-docs.sgml -INCLUDE_DIR=../pango SOURCE_DIR=../pango scan: - gtkdoc-scan --module=$(DOC_MODULE) $(INCLUDE_DIR)/pango*.h + gtkdoc-scan --module=$(DOC_MODULE) $(pangoheaders) templates: scan gtkdoc-mktmpl --module=$(DOC_MODULE) diff --git a/docs/pango-sections.txt b/docs/pango-sections.txt index d7a1b673..458ef2a6 100644 --- a/docs/pango-sections.txt +++ b/docs/pango-sections.txt @@ -94,26 +94,32 @@ pango_font_description_to_string PangoFont PangoFontClass PangoFontMetrics -pango_font_init -pango_font_ref -pango_font_unref pango_font_find_shaper pango_font_describe pango_font_get_coverage pango_font_get_glyph_extents pango_font_get_metrics -pango_font_get_data -pango_font_set_data +PANGO_TYPE_FONT +PANGO_FONT +PANGO_IS_FONT +PANGO_FONT_CLASS +PANGO_IS_FONT_CLASS +PANGO_FONT_GET_CLASS +pango_font_get_type PangoFontMap PangoFontMapClass -pango_font_map_init -pango_font_map_ref -pango_font_map_unref pango_font_map_load_font pango_font_map_list_families pango_font_map_free_families pango_font_map_list_fonts +PANGO_TYPE_FONT_MAP +PANGO_FONT_MAP +PANGO_IS_FONT_MAP +PANGO_FONT_MAP_CLASS +PANGO_IS_FONT_MAP_CLASS +PANGO_FONT_MAP_GET_CLASS +pango_font_map_get_type
@@ -250,4 +256,13 @@ pango_x_load_font pango_x_get_unknown_glyph pango_x_has_glyph pango_x_list_subfonts +pango_x_font_map_for_display +pango_x_shutdown_display +pango_x_font_map_get_font_cache +pango_x_font_subfont_xlfd +PangoXFontCache +pango_x_font_cache_new +pango_x_font_cache_free +pango_x_font_cache_load +pango_x_font_cache_unload
diff --git a/docs/tmpl/fonts.sgml b/docs/tmpl/fonts.sgml index dd6ce068..762be79e 100644 --- a/docs/tmpl/fonts.sgml +++ b/docs/tmpl/fonts.sgml @@ -36,12 +36,11 @@ the characteristics of a font to load. -An enumeration specifying the various slant styles possible for a font. -@PANGO_STYLE_NORMAL: the font is upright. -@PANGO_STYLE_OBLIQUE: the font is slanted, but in a roman style. -@PANGO_STYLE_ITALIC: the font is slanted in an italic style. +@PANGO_STYLE_NORMAL: +@PANGO_STYLE_OBLIQUE: +@PANGO_STYLE_ITALIC: @@ -148,10 +147,7 @@ The #PangoFont structure contains one member which the implementation fills in: -@klass: a pointer to the class structure - for this font. People using a #PangoFont should - not directly access this member; they should use the - appropriate wrapper functions. +@parent_instance: @@ -171,7 +167,7 @@ It contains the following members: -@destroy: a function to free the font structure and associated resources. +@parent_class: @describe: a function to describe the characteristics of a font. See pango_font_describe(). @get_coverage: A function to get a coverage map for the font. @@ -199,30 +195,6 @@ a font. It contains the following members: as @ascent + @descent. Individual characters may have extents exceeding this value. - - - - - -@font: - - - - - - - -@font: - - - - - - - -@font: - - @@ -276,25 +248,59 @@ a font. It contains the following members: @metrics: - + -@font: -@key: -@Returns: - + -@font: -@key: -@data: -@destroy_func: +@object: + + + + + + + +@object: + + + + + + + +@klass: + + + + + + + +@klass: + + + + + + + +@obj: + + + + + + + +@Returns: @@ -312,10 +318,7 @@ pango_font_map_init() on the structure. The #PangoFont structure contains one member which the implementation fills in: -@klass: a pointer to the class structure - for this font map. People using a #PangoFontMap should - not directly access this member; they should use the - appropriate wrapper functions. +@parent_instance: @@ -323,76 +326,107 @@ The #PangoFontMapClass structure holds the virtual functions for a particular #PangoFontMap implementation. -@destroy: a function to free the font map structure and associated resources. +@parent_class: @load_font: a function to load a font with a given description. See pango_font_map_load_font() @list_fonts: A function to list available fonts. See pango_font_map_list_fonts() @list_families: A function to list available font families. See pango_font_map_list_families(). - + @fontmap: +@desc: +@Returns: + +@size: - + @fontmap: +@families: +@n_families: - + -@fontmap: +@families: +@n_families: - + @fontmap: -@desc: -@Returns: - -@size: +@family: +@descs: +@n_descs: - + -@fontmap: -@families: -@n_families: - + -@families: -@n_families: +@object: - + -@fontmap: -@family: -@descs: -@n_descs: +@object: + + + + + + + +@klass: + + + + + + + +@klass: + + + + + + + +@obj: + + + + + + + +@Returns: diff --git a/docs/tmpl/pango-unused.sgml b/docs/tmpl/pango-unused.sgml index a2882e7d..d55e95f5 100644 --- a/docs/tmpl/pango-unused.sgml +++ b/docs/tmpl/pango-unused.sgml @@ -2,6 +2,13 @@ ======= + + + + + +@font: + ======= @@ -49,6 +56,29 @@ that may be accessed by derived classes: @font: + + + + + +@fontmap: + + + + + + +@font: + + + + + + +@font: +@key: +@Returns: + ======= @@ -68,6 +98,13 @@ that may be accessed by derived classes: @trailing: @x_pos: >>>>>>> 1.8 + + +The #PangoGlyphIndex type is an integral type used to store glyph +indices. + + + @@ -83,13 +120,6 @@ that may be accessed by derived classes: @logical_ascent: @logical_descent: - - -The #PangoGlyphIndex type is an integral type used to store glyph -indices. - - - @@ -204,6 +234,13 @@ X Rendering @char_pos: @trailing: + + + + + +@font: + @@ -224,6 +261,16 @@ X Rendering @xlfd: @Returns: + + + + + +@font: +@key: +@data: +@destroy_func: + @@ -241,6 +288,13 @@ X Rendering @charset: @Returns: + + + + + +@fontmap: + The PangoXCFont represents a component of a @@ -305,6 +359,13 @@ the X Window system. @Returns: + + + + + +@fontmap: + diff --git a/docs/tmpl/x-fonts.sgml b/docs/tmpl/x-fonts.sgml index 2f19e077..ecbc147f 100644 --- a/docs/tmpl/x-fonts.sgml +++ b/docs/tmpl/x-fonts.sgml @@ -93,3 +93,81 @@ glyph index. @Returns: + + + + + +@display: +@Returns: + + + + + + + +@display: + + + + + + + +@font_map: +@Returns: + + + + + + + +@font: +@subfont_id: +@Returns: + + + + + + + + + + + + + +@display: +@Returns: + + + + + + + +@cache: + + + + + + + +@cache: +@xlfd: +@Returns: + + + + + + + +@cache: +@fs: + + diff --git a/pango/Makefile.am b/pango/Makefile.am index 076e183e..168f014e 100644 --- a/pango/Makefile.am +++ b/pango/Makefile.am @@ -52,6 +52,7 @@ pangoinclude_HEADERS = \ pango-glyph.h \ pango-item.h \ pango-layout.h \ + pango-modules.h \ pango-types.h \ pangox.h diff --git a/pango/itemize.c b/pango/itemize.c index 27e2c81a..ed877fc0 100644 --- a/pango/itemize.c +++ b/pango/itemize.c @@ -204,9 +204,9 @@ add_engines (PangoContext *context, (last_lang == 0 || lang == 0 || strcmp (lang, last_lang) != 0)) { - lang_map = _pango_find_map (lang, PANGO_ENGINE_TYPE_LANG, + lang_map = pango_find_map (lang, PANGO_ENGINE_TYPE_LANG, PANGO_RENDER_TYPE_NONE); - shape_map = _pango_find_map (lang, PANGO_ENGINE_TYPE_SHAPE, + shape_map = pango_find_map (lang, PANGO_ENGINE_TYPE_SHAPE, context->render_type); last_lang = lang; } diff --git a/pango/modules.c b/pango/modules.c index db173e88..c109c3ef 100644 --- a/pango/modules.c +++ b/pango/modules.c @@ -24,8 +24,8 @@ #include #include -#include +#include "pango-modules.h" #include "modules.h" #include "utils.h" @@ -71,9 +71,9 @@ static void build_map (PangoMapInfo *info); static void init_modules (void); PangoMap * -_pango_find_map (const char *lang, - guint engine_type_id, - guint render_type_id) +pango_find_map (const char *lang, + guint engine_type_id, + guint render_type_id) { GList *tmp_list = maps; PangoMapInfo *map_info = NULL; @@ -461,16 +461,16 @@ build_map (PangoMapInfo *info) } PangoMapEntry * -_pango_map_get_entry (PangoMap *map, - guint32 wc) +pango_map_get_entry (PangoMap *map, + guint32 wc) { PangoSubmap *submap = &map->submaps[wc / 256]; return submap->is_leaf ? &submap->d.entry : &submap->d.leaves[wc % 256]; } PangoEngine * -_pango_map_get_engine (PangoMap *map, - guint32 wc) +pango_map_get_engine (PangoMap *map, + guint32 wc) { PangoSubmap *submap = &map->submaps[wc / 256]; PangoMapEntry *entry = submap->is_leaf ? &submap->d.entry : &submap->d.leaves[wc % 256]; diff --git a/pango/modules.h b/pango/modules.h index 3b0ca0e6..2ddc4999 100644 --- a/pango/modules.h +++ b/pango/modules.h @@ -25,15 +25,7 @@ #define __MODULES_H__ typedef struct _PangoIncludedModule PangoIncludedModule; -typedef struct _PangoMap PangoMap; -typedef struct _PangoMapEntry PangoMapEntry; - -struct _PangoMapEntry -{ - PangoEngineInfo *info; - gboolean is_exact; -}; struct _PangoIncludedModule { void (*list) (PangoEngineInfo **engines, int *n_engines); @@ -41,14 +33,6 @@ struct _PangoIncludedModule void (*unload) (PangoEngine *engine); }; -PangoMap * _pango_find_map (const char *lang, - guint engine_type_id, - guint render_type_id); -PangoMapEntry *_pango_map_get_entry (PangoMap *map, - guint32 wc); -PangoEngine * _pango_map_get_engine (PangoMap *map, - guint32 wc); - extern PangoIncludedModule _pango_included_modules[]; #endif /* __MODULES_H__ */ diff --git a/pango/pango-context.c b/pango/pango-context.c index 04325402..cc672383 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -23,8 +23,9 @@ #include #include #include "iconv.h" + #include "utils.h" -#include "modules.h" +#include "pango-modules.h" struct _PangoContext { @@ -732,7 +733,7 @@ add_engines (PangoContext *context, render_type_id = g_quark_from_static_string (PANGO_RENDER_TYPE_NONE); } - lang_map = _pango_find_map (next_lang, + lang_map = pango_find_map (next_lang, engine_type_id, render_type_id); } @@ -780,7 +781,7 @@ add_engines (PangoContext *context, pos = unicode_get_utf8 (pos, &wc); - lang_engines[i] = (PangoEngineLang *)_pango_map_get_engine (lang_map, wc); + lang_engines[i] = (PangoEngineLang *)pango_map_get_engine (lang_map, wc); fonts[i] = get_font (current_fonts, current_coverages, n_families, wc); /* FIXME: handle reference counting properly on the shapers */ diff --git a/pango/pango-font.h b/pango/pango-font.h index eefae335..2ea64df9 100644 --- a/pango/pango-font.h +++ b/pango/pango-font.h @@ -34,6 +34,14 @@ extern "C" { typedef struct _PangoFontDescription PangoFontDescription; typedef struct _PangoFontMetrics PangoFontMetrics; +/** + * PangoStyle: + * @PANGO_STYLE_NORMAL: the font is upright. + * @PANGO_STYLE_OBLIQUE: the font is slanted, but in a roman style. + * @PANGO_STYLE_ITALIC: the font is slanted in an italic style. + * + * An enumeration specifying the various slant styles possible for a font. + **/ typedef enum { PANGO_STYLE_NORMAL, PANGO_STYLE_OBLIQUE, diff --git a/pango/pango-types.h b/pango/pango-types.h index 8c518cb4..cabdf232 100644 --- a/pango/pango-types.h +++ b/pango/pango-types.h @@ -24,12 +24,6 @@ #include -/* Include this here, since we don't depend on GLib 1.3 yet */ - -#ifndef G_N_ELEMENTS -#define G_N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)[0])) -#endif - typedef struct _PangoLangRange PangoLangRange; typedef struct _PangoLogAttr PangoLogAttr; diff --git a/pango/pangox-fontmap.c b/pango/pangox-fontmap.c index 4421f4a6..7f20a52a 100644 --- a/pango/pangox-fontmap.c +++ b/pango/pangox-fontmap.c @@ -1403,13 +1403,13 @@ pango_x_font_entry_get_coverage (PangoXFontEntry *entry, for (ch = 0; ch < 65536; ch++) { - map_entry = _pango_map_get_entry (shape_map, ch); + map_entry = pango_map_get_entry (shape_map, ch); if (map_entry->info) { coverage = g_hash_table_lookup (coverage_hash, map_entry->info->id); if (!coverage) { - PangoEngineShape *engine = (PangoEngineShape *)_pango_map_get_engine (shape_map, ch); + PangoEngineShape *engine = (PangoEngineShape *)pango_map_get_engine (shape_map, ch); coverage = engine->get_coverage (font, lang); g_hash_table_insert (coverage_hash, map_entry->info->id, coverage); } diff --git a/pango/pangox-private.h b/pango/pangox-private.h index 7d581178..ec59df50 100644 --- a/pango/pangox-private.h +++ b/pango/pangox-private.h @@ -22,7 +22,7 @@ #ifndef __PANGOX_PRIVATE_H__ #define __PANGOX_PRIVATE_H__ -#include "modules.h" +#include "pango-modules.h" #include "pangox.h" #include "pangox-private.h" diff --git a/pango/pangox.c b/pango/pangox.c index 37ab9c7c..b0da8d7b 100644 --- a/pango/pangox.c +++ b/pango/pangox.c @@ -987,7 +987,7 @@ pango_x_get_shaper_map (const char *lang) render_type_id = g_quark_from_static_string (PANGO_RENDER_TYPE_X); } - return _pango_find_map (lang, engine_type_id, render_type_id); + return pango_find_map (lang, engine_type_id, render_type_id); } static PangoCoverage * @@ -1007,7 +1007,7 @@ pango_x_font_find_shaper (PangoFont *font, PangoMap *shape_map = NULL; shape_map = pango_x_get_shaper_map (lang); - return (PangoEngineShape *)_pango_map_get_engine (shape_map, ch); + return (PangoEngineShape *)pango_map_get_engine (shape_map, ch); } /* Utility functions */ -- cgit v1.2.1