Bit-mapped Japanese font parser
Details
| Size: | 20K |
| Last Update: | 2008-05-03 00:39:36 |
| Version: | 2.0 |
| OS Support: | Linux |
| License/Program Type: | GPL (GNU General Public License) |
| Publisher: | timecop |
| Price: | $0.00 |
Description:
Bit-mapped Japanese font parser 2.0 is fonts software developed by timecop.
Bit-mapped Japanese font parser is a font parser. Note, this package doesn't include the actual font data. To get the font data you need to download it from the download section in the left.
Then move .jfr into the directory where you unpacked this parser, and follow with the quick instructions.
Quick instructions:
Complete parse requires about 4 megabytes of free disk space. This is a huge improvement over the original version which required almost 45 megabytes.
1. make
2. make parse
3. watch the progress indicator
4. mv .pcf.gz /usr/X11R/lib/X11R6/fonts/misc
5. make clean
6. HUP your font server if you use one
7. xset fp rehash
8. xlsfonts | grep kanji
/usr/X11R/lib/X11R6/fonts/misc is the standard location for all sorts of random bit-mapped fonts, but you might have a special location. Substitute that in step 4.
About:
I came across a number of these "raster fonts" a while ago. Quick look inside the files proved that they are bit-mapped fonts, and the format looked pretty straight-forward. I wrote the original parser for these just guessing the values, basically by experimenting and playing around. Later on I came across some docs on the subject - looks like these fonts were used in Windows 3.1 Japanese edition to substitute back-then low quality Japanese TTF fonts at small point sizes. These were designed using full-scale 16 bit programming techniques.
Quick info about the font format, there are some headers, then follows a "segment table" which is basically a table with pointers inside the font file where to locate a particular chunk of data. Because the 16 bit way of accessing memory is by using 65k "segments", each file is virtually split into < 65k segments which get loaded into separate memory areas, and then there is a algorithm how to assemble whatever character by using the segment number and offset. Anyway, with 32 bit access all of that doesn't really matter. In my implementation I just mmap the whole file and read it all out of memory.
Generating table.h was a LOT of work! First, I took the codearea table out of one of the jfr files (this maps shift-jis code to the character number inside the font file), and extracted the number ranges. These were shift-jis, of course, and X uses jis0208. There is no converter from a shift
jis byte into jis0208. So I had to write one. Taking iconv, and some tables from glibc 2.1.93, I hacked together something which converted the shift-jis data into ucs4 (unicode, I guess) and then from that into jis0208. The code to the converter is about 500k thanks to the huge jis->unicode->jis conversion tables, and you won't need it unless you get a jfr font with a different encoding table (unlikely). Anyway. After I got the font format figured out and converted the character table, everything else was pretty easy. Note some bit hackery in the bitmapXX() functions which was necessary to present the font data in a usable format. Also notice cool use of function pointers to select a conversion function at runtime.
What's New in This Release:
This version uses correct JISX0208 tables, and is much faster.
Bit-mapped Japanese font parser 2.0 supports english interface languages and works with Linux.
Downloading Bit-mapped Japanese font parser 2.0 will take several seconds if you use fast ADSL connection.
0 comments
Add to
Bit-mapped Japanese font parser Version History
Related Software
|
|
From category: Tools |
| Desktop Drapes 0.4.97 is tools software developed by Milosz Tanski. Desktop Drapes is a wallpaper manager application for the gnome desktop. It has features (period) Features like, randomly... |
|
|
From category: KDE |
| Krip2clip is a basic service menu for KDE and command-line tool to extract raw clips from a DVD, or an ISO image of a DVD.... |
|
|
From category: Icons |
| Intrigue is a simple and beautiful icon set for the Kde desktop.... |
|
|
From category: File-managers |
| Nautilus is a graphical shell for the GNOME desktop enviornment that makes it easy to manage your files.... |
|
|
From category: Themes |
| Clearbox 1.0 is themes software developed by Hugo Olabera. Clearbox is a customizable theme for the Metacity Window Manager. A small GTK application allow configure the differents theme aspe... |
|
|
From category: Tools |
| fbpanel 4.5 is tools software developed by Anatoly Asviyan. fbpanel is desktop panel which provides graphical information and feedback about desktop activity and allows interaction with the window... |
|
|
From category: Tools |
| FOX Calculator 2.1.0 is tools software developed by Jeroen van der Zijp. FOX Calculator is a desktop calculator written in FOX. The FOX Calculator is a simple desktop calculator geared towar... |
|
|
From category: Desktop-Widgets |
| dbKalendar 0.9.1 is desktop widgets software developed by PARENA. dbKalendar is a calendar theme for SuperKaramba that tries to mimic the Dashboard calendar widget introduced in Mac OS X 1.04 (Tige... |
|
|
From category: File-managers |
| East-Tec DiskSanitizer 2.1 is file managers software developed by EAST Technologies. Don\'t give away sensitive information, valuable corporate trade secrets, business plans, personal files and let... |
|
|
From category: Desktop-Widgets |
| BBCNews.co.uk RSS reader 0.1.3 is desktop widgets software developed by Curve. BBCNews.co.uk RSS reader is a SuperKaramba theme. Based on LTRSS reader (http://www.kde-look.org/content/show.p... |
|
|
From category: Tools |
| Browser Bookmarks Menu 0.6 is tools software developed by Nigel Tao. Browser Bookmarks Menu is a small Gnome applet to allow easy access to your browser\'s bookmarks, even when your browser is not... |
|
|
From category: Tools |
| Avatar Factory is a bash script that creates eye candy shortcuts for music albums, photo albums, movie files, and more...... |
|
|
From category: File-managers |
| Filelight 1.0 is file managers software developed by Max Howell. Filelight allows you to understand exactly where your diskspace is being used by graphically representating your filesystem as a set... |
|
|
From category: Fonts |
| FreeType 1.3.1 is fonts software developed by FreeType team. FreeType 1 is a portable and highly efficient TrueType rendering engine, that is now successfully used to bring TrueType support to a ve... |
|
|
From category: Gnome |
| Gnome is a .NET language binding for assorted GNOME libraries.... |
Leave a comment