[Fonts]Storing the cached font (fonts.cache) information
Fontconfig currently stores cached information about fonts in per-directory files called 'fonts.cache-version'. These are stored right in the font directories which means they'll get copied and managed automatically as people move fonts around. However, storing cached information in what is ostensibly a read-only directory is unfriendly and violates the FSH guidelines. This data is just cached versions of data available from the font files themselves and so the FSH says it should live (somehow) in /var/cache. I'm open to suggestions, but here's one simplistic possibility: Create a shadow heirarchy in /var/cache/fonts which mirrors the various font directory heirarchies and populate that at appropriate points with fonts.cache files. I'd do this by creating a new table of cache prefix mappings: /usr/share/fonts - /var/cache/fonts/share This mapping would direct any fonts.cache files related to directories under /usr/share/fonts to be stored in /var/cache/fonts/share by simply replacing the /usr/share/fonts prefix with /var/cache/fonts/share: /usr/share/fonts/truetype/arphic/fonts-cache-1 - /var/cache/fonts/share/truetype/arphic/fonts-cache-1 Any directories not matching a configured prefix would map to themselves; this makes the existing configuration and cache files compatible. Does this seem like a good plan? Can anyone come up with a better way of moving the storage of fonts.cache into /var/cache? Keith PackardXFree86 Core TeamHP Cambridge Research Lab ___ Fonts mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/fonts
Re: [Fonts]Storing the cached font (fonts.cache) information
Hi, I think I've some opinion on this ~ However, storing cached information in what is ostensibly a read-only directory is unfriendly and violates the FSH guidelines. This data is just cached versions of data available from the font files themselves and so the FSH says it should live (somehow) in /var/cache. Good move! Any directories not matching a configured prefix would map to themselves; this makes the existing configuration and cache files compatible. How do you resolve any fonts which doesn't located under /usr/share/fonts ? Some one like to put fonts under different mount points and for me, I put most of my TTF under /usr/X11R6/lib/X11/fonts/local . Is it possible to for this way : 1. Let's assume the caching directory is called FontCachePrefix/ 2. Add one additional mapping table under the FontCachePrefix/ 3. Such that, we lookup the cache for a specific directory by keeping the relation of each cache file and its' corresponding font directory. 4. So that, we don't need a complicated sub-dir. tree under our FontCachePrefix/ 5. The listing can be in binary to minmize the extrax cost for this additional table (file). 6. Finally, for each font directory, we can put the cache as something like path-to.cache or simply 1.cache, 2.cache etc. Does this seem like a good plan? Can anyone come up with a better way of moving the storage of fonts.cache into /var/cache? Yes, personally, I don't like cache placed around my fonts directory : ) Also, this will make reonly /usr partition for practical. But, /var/cache/fonts is already specified in the FHS, that, this directory is for dynamically generated fonts, I quote it here : 5.5.3 /var/cache/fonts : Locally-generated fonts (optional) 5.5.3.1 Purpose The directory /var/cache/fonts should be used to store any dynamically-created fonts. In particular, all of the fonts which are automatically generated by mktexpk must be located in appropriately-named subdirectories of /var/cache/fonts.[footnote 31] 5.5.3.2 Specific Options Other dynamically created fonts may also be placed in this tree, under appropriately-named subdirectories of /var/cache/fonts. Hence, I think, cooperation with FHS is needed or, we simply use another prefix. Though, I think /var/cache/fonts should be the better, as I like the style what fontconfig do. I hope that, the combination ft + fc can be adopted more widely. Zenith Lau ___ Fonts mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/fonts
[Fonts]About Fcpackage and Li18nux2K.
Hi, I have recently read the Li18nux2K. The globalization spec. from li18nux.org. but it seems that, there is no any relation between fontconfig/Xft and this spec. IMHO, Li18nux2K regulate and standardize the direction of i18n while, fontconfig/Xft is complete font management for fonts and the next trend in drawing in X. Why fontconfig/Xft doesn't appear in that spec. ? On the other hand, I remember this is some projects on fonts and type service from Li18nux.org. I afraid there will be two set of facility regard fonts handling in further, if there is no cooperation between fontconfig/Xft and li18nux. Zenith Lau ___ Fonts mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/fonts
Re: [Fonts]About Fcpackage and Li18nux2K.
On Sat, Sep 07, 2002 at 09:54:31AM +0800, Zenith Lau wrote: I have recently read the Li18nux2K. The globalization spec. from li18nux.org. but it seems that, there is no any relation between fontconfig/Xft and this spec. IMHO, Li18nux2K regulate and standardize the direction of i18n while, fontconfig/Xft is complete font management for fonts and the next trend in drawing in X. Why fontconfig/Xft doesn't appear in that spec. ? Because, at the time LI18NUX2000 was drafted, fontconfig/Xft2 didn't exist, and Xft was quite new (and immature). Also, LI18NUX2000 was mostly about documenting the (then) best practice. On the other hand, I remember this is some projects on fonts and type service from Li18nux.org. I afraid there will be two set of facility regard fonts handling in further, if there is no cooperation between fontconfig/Xft and li18nux. Perhaps you're talking about the STSF? http://stsf.sourceforge.net But personally, I think fontconfig/Xft is fast becoming the defacto standard anyway, at least on Linux. -- Roger So Debian Developer Sun Wah Linux Limitedi18n/L10n Project Leader Tel: +852 2250 0230 [EMAIL PROTECTED] Fax: +852 2259 9112 http://www.sw-linux.com/ ___ Fonts mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/fonts
Re: [Fonts]Storing the cached font (fonts.cache) information
Around 9 o'clock on Sep 7, Zenith Lau wrote: Any directories not matching a configured prefix would map to themselves; this makes the existing configuration and cache files compatible. How do you resolve any fonts which doesn't located under /usr/share/fonts ? The prefix mapping would be configurable; add a map from /usr/X11R6/lib/X11/fonts to /var/cache/fontconfig/x11-fonts and you'll get your cache files for fonts in the standard X directories stored in /var/cache/fontconfig/x11-fonts. 2. Add one additional mapping table under the FontCachePrefix/ I can either store the mapping table in a file or directly in the file system; I don't have a strong preference, but using the file system is likely to involve fewer but more complicated system calls during application startup. It might also involve a slight bit of overhead. The advantage is that there aren't any synchronization issues; each cache file is accessable without reference to a separate file. It seems like that should be more robust in many ways. But, /var/cache/fonts is already specified in the FHS, that, this directory is for dynamically generated fonts, I quote it here : Sigh. We'll use /var/cache/fontconfig then. I don't really care. Though, I think /var/cache/fonts should be the better, as I like the style what fontconfig do. To some extent, we can ask if a slight reinterpretation of the FSH can be permitted in this case. Keith PackardXFree86 Core TeamHP Cambridge Research Lab ___ Fonts mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/fonts
Re: [Fonts]Storing the cached font (fonts.cache) information
Hi, Any directories not matching a configured prefix would map to themselves; this makes the existing configuration and cache files compatible. How do you resolve any fonts which doesn't located under /usr/share/fonts ? The prefix mapping would be configurable; add a map from /usr/X11R6/lib/X11/fonts to /var/cache/fontconfig/x11-fonts and you'll get your cache files for fonts in the standard X directories stored in /var/cache/fontconfig/x11-fonts. 2. Add one additional mapping table under the FontCachePrefix/ I can either store the mapping table in a file or directly in the file system; I don't have a strong preference, but using the file system is likely to involve fewer but more complicated system calls during application startup. It might also involve a slight bit of overhead. The advantage is that there aren't any synchronization issues; each cache file is accessable without reference to a separate file. It seems like that should be more robust in many ways. Sorry, do you mean that, store the mapping table in the file system, you are talking about the first idea? Anyway, I agree that additional table in a file is less robust and involve more overhead. For the configurable prefix mapping, how do it exists? Also it is permissable that, there are many dir in the fonts.conf. Is it possible to store the mapping as properties of the dir elements? But, /var/cache/fonts is already specified in the FHS, that, this directory is for dynamically generated fonts, I quote it here : Sigh. We'll use /var/cache/fontconfig then. I don't really care. Though, I think /var/cache/fonts should be the better, as I like the style what fontconfig do. To some extent, we can ask if a slight reinterpretation of the FSH can be permitted in this case. Ok. Best Regards, Zenith Lau ___ Fonts mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/fonts
Re: [Fonts]Compilation fail in fcpackage-2.0-Xrender
Around 12 o'clock on Sep 7, Zenith Lau wrote: Cursor.c: In function `XRenderCreateCursor': Cursor.c:39: `X_RenderCreateCursor' undeclared (first use in this Hmm. This is a new request, but it should be defined in the 'render.h' file included with fcpackage. You may have to replace the render.h found in /usr/X11R6/include/X11/extensions to get things to build. If so, let me know and I'll see how I can fix the package. Keith PackardXFree86 Core TeamHP Cambridge Research Lab ___ Fonts mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/fonts
Re: [Fonts]Storing the cached font (fonts.cache) information
Around 13 o'clock on Sep 7, Zenith Lau wrote: Sorry, do you mean that, store the mapping table in the file system, you are talking about the first idea? I can either use a sequence of directories to encode the source font path, or I can create a file which maps path names to file names. In the first method, with the mapping: /usr/share/fonts - /var/cache/fontconfig/share the cache file: /usr/share/fonts/truetype/kochi/fonts.cache-1 would live in: /var/cache/fontconfig/share/truetype/kochi/fonts.cache-1 This is done by simply replacing the prefix of the path matching the left hand of the mapping with the right hand of the mapping. The library would automatically take care of creating any necessary directories to create the matching directory heirarchy. In the second method, with the mapping: /usr/share/fonts - /var/cache/fontconfig/share I'd create a cache mapping file (cache.map?), that file would live in /var/cache/fontconfig/share/cache.map It would contain an entry like: truetype/kochi/fonts.cache-1 1.cache-1 and the cache file /usr/share/fonts/truetype/kochi/fonts.cache-1 would like in: /var/cache/fontconfig/share/1.cache-1 I would keep the cache.map file synchronized with the cache file contents somehow; programs would be required to open the mapping file to locate cache files for each directory. For the configurable prefix mapping, how do it exists? Also it is permissable that, there are many dir in the fonts.conf. Is it possible to store the mapping as properties of the dir elements? That's a good idea -- I hadn't thought of that. I'd thought, instead, of creating new configuration data which mapped names. I like the directory property better. Thanks. Keith PackardXFree86 Core TeamHP Cambridge Research Lab ___ Fonts mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/fonts