pango r2751 - in trunk: . docs docs/tmpl pango
- From: behdad svn gnome org
- To: svn-commits-list gnome org
- Subject: pango r2751 - in trunk: . docs docs/tmpl pango
- Date: Mon, 8 Dec 2008 03:28:29 +0000 (UTC)
Author: behdad
Date: Mon Dec 8 03:28:29 2008
New Revision: 2751
URL: http://svn.gnome.org/viewvc/pango?rev=2751&view=rev
Log:
2008-12-07 Behdad Esfahbod <behdad gnome org>
Bug 563557 â set g_get_prgname() in fc pattern
* docs/pango-sections.txt:
* pango/pangofc-fontmap.c (pango_fc_make_pattern):
* pango/pangofc-fontmap.h:
Add PANGO_FC_PRGNAME which is the fontconfig element "pangoprgname".
Populate it on all our fontconfig search patterns using
g_get_prgname(). See bug for sample use.
Modified:
trunk/ChangeLog
trunk/docs/pango-sections.txt
trunk/docs/tmpl/pangofc-fontmap.sgml
trunk/pango/pangofc-fontmap.c
trunk/pango/pangofc-fontmap.h
trunk/pango/pangoft2-fontmap.c
trunk/pango/pangoxft-fontmap.c
Modified: trunk/docs/pango-sections.txt
==============================================================================
--- trunk/docs/pango-sections.txt (original)
+++ trunk/docs/pango-sections.txt Mon Dec 8 03:28:29 2008
@@ -922,6 +922,7 @@
pango_fc_font_description_from_pattern
PANGO_FC_GRAVITY
PANGO_FC_VERSION
+PANGO_FC_PRGNAME
<SUBSECTION Standard>
PANGO_FC_FONT_MAP
PANGO_IS_FC_FONT_MAP
Modified: trunk/docs/tmpl/pangofc-fontmap.sgml
==============================================================================
--- trunk/docs/tmpl/pangofc-fontmap.sgml (original)
+++ trunk/docs/tmpl/pangofc-fontmap.sgml Mon Dec 8 03:28:29 2008
@@ -126,3 +126,10 @@
+<!-- ##### MACRO PANGO_FC_PRGNAME ##### -->
+<para>
+
+</para>
+
+
+
Modified: trunk/pango/pangofc-fontmap.c
==============================================================================
--- trunk/pango/pangofc-fontmap.c (original)
+++ trunk/pango/pangofc-fontmap.c Mon Dec 8 03:28:29 2008
@@ -800,6 +800,7 @@
double dpi)
{
FcPattern *pattern;
+ const char *prgname;
int slant;
int weight;
PangoGravity gravity;
@@ -810,6 +811,7 @@
int width;
#endif
+ prgname = g_get_prgname ();
slant = pango_fc_convert_slant_to_fc (pango_font_description_get_style (description));
weight = pango_fc_convert_weight_to_fc (pango_font_description_get_weight (description));
#ifdef FC_WIDTH
@@ -857,6 +859,9 @@
FcPatternAddString (pattern, PANGO_FC_GRAVITY, value->value_nick);
}
+ if (prgname)
+ FcPatternAddString (pattern, PANGO_FC_PRGNAME, prgname);
+
return pattern;
}
Modified: trunk/pango/pangofc-fontmap.h
==============================================================================
--- trunk/pango/pangofc-fontmap.h (original)
+++ trunk/pango/pangofc-fontmap.h Mon Dec 8 03:28:29 2008
@@ -183,6 +183,8 @@
* than %PangoGravitySouth is desired.
*
* The property will have a #PangoGravity value as a string, like "east".
+ * This can be used to write fontconfig configuration rules to choose
+ * different fonts for horizontal and vertical writing directions.
*
* Since: 1.20
*/
@@ -196,11 +198,29 @@
*
* The property will have an integer value equal to what
* pango_version() returns.
+ * This can be used to write fontconfig configuration rules that only affect
+ * certain pango versions (or only pango-using applications, or only
+ * non-pango-using applications).
*
* Since: 1.20
*/
#define PANGO_FC_VERSION "pangoversion"
+/**
+ * PANGO_FC_PRGNAME:
+ *
+ * String representing a fontconfig property name that Pango sets on any
+ * fontconfig pattern it passes to fontconfig.
+ *
+ * The property will have a string equal to what
+ * g_get_prgname() returns.
+ * This can be used to write fontconfig configuration rules that only affect
+ * certain applications.
+ *
+ * Since: 1.24
+ */
+#define PANGO_FC_PRGNAME "pangoprgname"
+
G_END_DECLS
#endif /* __PANGO_FC_FONT_MAP_H__ */
Modified: trunk/pango/pangoft2-fontmap.c
==============================================================================
--- trunk/pango/pangoft2-fontmap.c (original)
+++ trunk/pango/pangoft2-fontmap.c Mon Dec 8 03:28:29 2008
@@ -311,7 +311,7 @@
*
* Gets the singleton PangoFT2Renderer for this fontmap.
*
- * Return value:
+ * Return value: the renderer.
**/
PangoRenderer *
_pango_ft2_font_map_get_renderer (PangoFT2FontMap *ft2fontmap)
Modified: trunk/pango/pangoxft-fontmap.c
==============================================================================
--- trunk/pango/pangoxft-fontmap.c (original)
+++ trunk/pango/pangoxft-fontmap.c Mon Dec 8 03:28:29 2008
@@ -337,7 +337,7 @@
*
* Gets the singleton #PangoXFTRenderer for this fontmap.
*
- * Return value:
+ * Return value: the renderer.
**/
PangoRenderer *
_pango_xft_font_map_get_renderer (PangoXftFontMap *xftfontmap)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]