Re: Pango API (Re: Many fixes and enhancement about font handling)



Shun-ichi TAHARA writes:
|In non-latin (especially in CJK) environment, we want to use various
|cool latin fonts. But those fonts does not have glyphs for our local
|language (for example, Kanji or Kana character in Japanese, or Hangul
|character in Korea). We often handle strings where the latin
|characters and those local characters are mixed, and we expects that
|the glyph-rendering engine to fallback other existing font for local
|characters. Raw Xft API does not have such features, but Pango API
|does. So I implemented "Pango" font handling method on Sawfish.
|
|The following patch can be applied after the last (in "Many fixes and
|enhancement about font handling") patch.
|
|This enable setting font as
|  (setq default-font '("pango" . "Nimbus Sans L, Bold 12"))
|and if Xft features is activated, sawfish-ui stores selected font as
|pango-type one.

wow, thanks. I've been meaning to add a pango backend for a while :-)

I committed all your changes (except one, see below), and added an
optional pango dependency to configure.in and the Makefiles

Since the pango backend has the glib UTF-8 conversion, is it necessary
to also add it to the Xft backend? (it would have to be conditional)

The one bit I didn't include was this:

|@@ -87,7 +89,8 @@
| 		   (let* ((pango-name (gtk-entry-get-text entry))
| 			  (face (pango-description->face pango-name)))
| 		     (cond ((not face) nil)
|-			   (use-xft (cons "Xft" (face->xft-description face)))
|+			   (use-xft
|+			    (cons "pango" (face->pango-description face)))
| 			   (t (cons "xlfd" (face->xlfd-description face)))))))

the problem is that there's no way of knowing if pango will be
supported by sawfish. Sawfish has the function font-type-exists-p to do
this, but unfortunately that's not available to the script. I'm not
sure what to do about this yet..

	John




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