On Tue, 6 Jan 2009 22:49:03 +0000 (UTC) [email protected] wrote:
| Hi Anthony, | | I found that the imagick_type_gen inconvenient for me to use because I | have been trying to add only several fonts into my system each day for | several days. So I made a small enhancement to it. | | I thought I could live with the limitation, but after several days doing | the same thing, I finally can't stand it. Because, each time, I have to | either wait until next day for locate db to be updated, or run the long | long updatedb just to add those several fonts -- most time it were just | only one or two fonts. | | Moreover, the script picks up many duplicated fonts that I don't want. | There is no way to remove duplicated or unwanted fonts. I have to | manually edit the generated file each time. Removing those tried fonts | that I don't like gave me the same pain as well. | | In conclusion, the imagick_type_gen is | | - good to add all fonts within the system to ImageMagick once, but | - not convenient to add just several fonts | - not convenient to add new fonts that is not in locate db yet | - no way to remove duplicated or unwanted fonts | - depends on the external command 'locate'. | | My small enhancement is decoupling the generation of font list and font | registration. Now the fonts that imagick_type_gen needs to register is | read from stdin. So it has the convenient to add fonts system wide, or | only a picked sub set. | | To dupe the old behavior (with a little enhancement in speed) | | slocate -ir '\.\(ttf\|pfb\|afm\)$' | imagick_type_gen | | The only fonts that I care is what I put in a central location. In this | case, I don't need to way for locate db to be updated: | | find /path/to/my/fonts | imagick_type_gen | | The benefits for this is that I can group fonts in different categories | and only need to update the modified ones. Here is my type.xml (under | Debian): | | $ tail -4 /usr/lib/ImageMagick-6.3.7/config/type.xml | <typemap> | <include file="type-ghostscript.xml" /> | <include file="type-win_en.xml" /> | </typemap> | | Anthony, I have received tremendous helps from you, and now I consider it | is a chance to give back. If you want, I can send the patch to you, or | post it here... all up to you. | This is a good enhancment, however can you change it to be a command line option instead. For example imagick_type_gen -d /path/to/my/fonts > my_type.xml Will create a type.xml for a specific directory rather than using locate. this way it remains backward compatible with how it is currently used. PS: At this time my ISP provider is for some reason striping the senders original address from the IM maillist mail. As such I can not send you a direct copy of teh above mail. I have been trying to get a copy of the headers of a mailing list mail someone else has received so I can compare, but with no success so far. Anthony Thyssen ( System Programmer ) <[email protected]> ----------------------------------------------------------------------------- The problem with a kludge is eventually you're going to have to go back and do it right. -- Rick Cook, "Wizardry Cursed" ----------------------------------------------------------------------------- Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/ _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
