[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [g-i] fonts: a few thoughts



Hi

As you may ahve read yesterday [1], now it's possible again building g-i ISO images that are based on the latest GTKDFB 2.8.10 libraries instead of the old 2.0.9 ones. One nice thing is that now it's possible changing at runtime the theming of the GTK frontend (fonts, colours and graphics of the widgets ) simply by checking, at every gtk_initialize() and gtk_go() call, if the /etc/gtk-2.0/gtkrc theme file file has changed or not via a gtk_rc_reparse_all() call. In the case the gtkrc file has not changed, no additional oprations are make so overhead is non-existing. Now, this reminds me of this old discussion that was started on this ML some months ago about handling of UTF glyph have to get different rendering in different languages. Hidetaka posted some time ago the above localechooser patch that takes care of setting correct fonts for chinese, japanese and korean languages. Davide and me would like to know if the patch for ja, zh and ko is still needed or if oriental fonts look correct now. Also, Davide told me a very similar problem was found with Persian and Arabic languages: is this still true?

ciao

Attilio


http://lists.debian.org/debian-boot/2006/01/msg00547.html

Hidetaka Iwai wrote:
Frans Pop <aragorn@tiscali.nl> wrote:
Message-ID: <200512062038.20977.aragorn@tiscali.nl>

On Tuesday 06 December 2005 14:52, Attilio Fiandrotti wrote:

ok, let's suppose we can setup a correct gtkrc file every time we need
it: then the GTK frontend will have to read /etc/gtkrc at every
frontend_go() call and so we must be sure this wouldn't be cause of
performance degradation.

Could we not trigger (force) a re-read externally somehow?


That is exactly what the sample program written in [1]Muto-san's previous
mail does.
 1. http://lists.debian.org/debian-boot/2005/12/msg00159.html

To use it, the following steps are needed:

 1. Compile it with libgtk+2.0-directfb0, and archive it with
 tar+gzip, and put on the server where GTK-TARBALL-SOURCE points.
 2. Applied the attached patch to localechooser and rebuild udeb.
 After rebuilding, put the udeb under build/localudebs.
 3. Build gtk-miniiso with ttf-compact-fonts.udeb.

Currently it can change the font successfully, but it crashes cdebconf
(and cdebconf restarts).  It works well with other applications(such
as gimp) and normal libgtk2.0-0.

Best regards,
--
 Hidetaka Iwai
 tyuyu@debian.or.jp


------------------------------------------------------------------------

Index: localechooser
===================================================================
--- localechooser	(revision 32636)
+++ localechooser	(working copy)
@@ -313,6 +313,23 @@
 	pkginstall libfribidi0
 ;;
 esac
+
+# set the primary font accroding to $LANGUAGE
+if [ "$DEBIAN_FRONTEND" = "gtk" ]; then
+    case "$LANGUAGE" in
+	ja)
+	    echo 'gtk-font-name = "Sazanami Gothic 12"' > /.\gtkrc-2.0
+            ;;
+	zh)
+	    echo 'gtk-font-name = "ShanHeiSun-Uni 12"' > /.\gtkrc-2.0
+            ;;
+	ko)
+	    echo 'gtk-font-name = "UnDotum 12"' > /.\gtkrc-2.0
+            ;;
+    esac
+    langupdate || treu
+fi
+
 # This is needed at the end of the script
 COUNTRYCODE_LANGUAGECHOOSER=$COUNTRY
 COUNTRY_LANGUAGECHOOSER=$(code2country $COUNTRY)



Reply to: