diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-06-30 22:08:26 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-06-30 22:08:26 +0000 |
commit | b49e8181c16e91afc0b2e771243f9adab9bc8b5d (patch) | |
tree | f3b463eec927649a43bd0b22464a5118f0b0d4a7 /examples | |
parent | 036da71c38c9d81a087f20079cc7b96154fc5a3c (diff) | |
download | pango-b49e8181c16e91afc0b2e771243f9adab9bc8b5d.tar.gz |
A bunch of simple functions for reading from files, manipulating strings
Fri Jun 30 16:46:31 2000 Owen Taylor <otaylor@redhat.com>
* pango/pango-utils.[ch] Makefile.am: A bunch of simple functions
for reading from files, manipulating strings as necessary for
config files. Also, a simple gnome-config/win.ini style
config file reader.
* pango/modules.c: Remove DOTFILES stuff. Instead, read names
of modules file from pangorc. (Which can be set from PANGO_RC_FILE).
Rewrite parsing code using pango-utils.c.
* pango/pangox-fontmap.c: Read list of files from
PangoX/AliasFiles key. Rewrite parsing code for alias files using
pango-utils.c.
* examples/pangox.aliases: Move to new name from pangox_aliases,
reformat using new parsing code.
* examples/pangorc (AliasFiles) examples/pango-viewer: Add a
pangorc file for in-place testing.
* pango/querymodules.c (main): Add comment to the top of
the output indicating that the file should not be hand-edited.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile.am | 4 | ||||
-rw-r--r-- | examples/pangorc | 10 | ||||
-rw-r--r-- | examples/pangox.aliases | 24 | ||||
-rw-r--r-- | examples/pangox_aliases | 8 | ||||
-rw-r--r-- | examples/viewer-qt.cc | 4 |
5 files changed, 40 insertions, 10 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am index 4c3ae795..225498d1 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -34,7 +34,7 @@ pango.modules: ( cd ../modules && \ ../pango/pango-querymodules `find . -name '*.so'` > ../examples/pango.modules ) -EXTRA_DIST=HELLO.utf8 muru.utf pangox_aliases +EXTRA_DIST=HELLO.utf8 muru.utf pangox.aliases -alias_DATA = pangox_aliases +alias_DATA = pangox.aliases diff --git a/examples/pangorc b/examples/pangorc new file mode 100644 index 00000000..bfbecbd6 --- /dev/null +++ b/examples/pangorc @@ -0,0 +1,10 @@ +# +# pangorc file for uninstalled operation. If pango-viewer is run with +# this file in the current directory it will set it as PANGO_RC_FILE +# + +[Pango] +ModuleFiles = ./pango.modules + +[PangoX] +AliasFiles = ./pangox.aliases
\ No newline at end of file diff --git a/examples/pangox.aliases b/examples/pangox.aliases new file mode 100644 index 00000000..3ab9bf45 --- /dev/null +++ b/examples/pangox.aliases @@ -0,0 +1,24 @@ +# File defining aliases of PangoFontDescription to X font set +# +# family style variant weight stretch XLFD + +sans normal normal normal normal "-*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*,\ + -*-fixed-medium-r-normal--*-*-*-*-*-*-*-*,\ + -kaist-iyagi-bold-r-normal--*-*-*-*-*-*-johab-1,\ + -*-song ti-medium-r-normal--*-*-*-*-*-*-*-*,\ + -tamil-tscakaram-medium-r-normal--*-*-*-*-*-*-tscii-0,\ + -*-devanagari-medium-r-normal--*-*-*-*-*-*-iso10646-dev" + +serif normal normal normal normal "-*-times-medium-r-normal--*-*-*-*-*-*-*-*,\ + -*-fixed-medium-r-normal--*-*-*-*-*-*-*-*,\ + -kaist-iyagi-bold-r-normal--*-*-*-*-*-*-johab-1,\ + -*-song ti-medium-r-normal--*-*-*-*-*-*-*-*,\ + -tamil-tscakaram-medium-r-normal--*-*-*-*-*-*-tscii-0,\ + -*-devanagari-medium-r-normal--*-*-*-*-*-*-iso10646-dev" + +monospace normal normal normal normal "-*-fixed-medium-r-normal--*-*-*-*-*-*-*-*,\ + -*-fixed-medium-r-normal--*-*-*-*-*-*-*-*,\ + -kaist-iyagi-bold-r-normal--*-*-*-*-*-*-johab-1,\ + -*-song ti-medium-r-normal--*-*-*-*-*-*-*-*,\ + -tamil-tscakaram-medium-r-normal--*-*-*-*-*-*-tscii-0,\ + -*-devanagari-medium-r-normal--*-*-*-*-*-*-iso10646-dev" diff --git a/examples/pangox_aliases b/examples/pangox_aliases deleted file mode 100644 index 5926511d..00000000 --- a/examples/pangox_aliases +++ /dev/null @@ -1,8 +0,0 @@ -# File defining aliases of PangoFontDescription to X font set -# -# family style variant weight stretch XLFD - -sans normal normal normal normal "-*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*,-*-fixed-medium-r-normal--*-*-*-*-*-*-*-*,-kaist-iyagi-bold-r-normal--*-*-*-*-*-*-johab-1,-*-song ti-medium-r-normal--*-*-*-*-*-*-*-*,-tamil-tscakaram-medium-r-normal--*-*-*-*-*-*-tscii-0,-*-devanagari-medium-r-normal--*-*-*-*-*-*-iso10646-dev" -serif normal normal normal normal "-*-times-medium-r-normal--*-*-*-*-*-*-*-*,-*-fixed-medium-r-normal--*-*-*-*-*-*-*-*,-kaist-iyagi-bold-r-normal--*-*-*-*-*-*-johab-1,-*-song ti-medium-r-normal--*-*-*-*-*-*-*-*,-tamil-tscakaram-medium-r-normal--*-*-*-*-*-*-tscii-0,-*-devanagari-medium-r-normal--*-*-*-*-*-*-iso10646-dev" -monospace normal normal normal normal "-*-fixed-medium-r-normal--*-*-*-*-*-*-*-*,-kaist-iyagi-bold-r-normal--*-*-*-*-*-*-johab-1,-*-song ti-medium-r-normal--*-*-*-*-*-*-*-*,-tamil-tscakaram-medium-r-normal--*-*-*-*-*-*-tscii-0,-*-devanagari-medium-r-normal--*-*-*-*-*-*-iso10646-dev" - diff --git a/examples/viewer-qt.cc b/examples/viewer-qt.cc index b2522063..0f5aeae0 100644 --- a/examples/viewer-qt.cc +++ b/examples/viewer-qt.cc @@ -27,6 +27,7 @@ #include <qcdestyle.h> #include <qcombobox.h> #include <qfile.h> +#include <qfileinfo.h> #include <qmenubar.h> #include <qpopupmenu.h> #include <qspinbox.h> @@ -502,6 +503,9 @@ main (int argc, char **argv) QApplication::setStyle (new QCDEStyle()); + if (QFileInfo ("./pangorc").exists ()) + putenv ("PANGO_RC_FILE=./pangorc"); + ViewerWindow *vw = new ViewerWindow (); vw->show(); |