[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] Problems with pcf format using freetype in win32 env
From: |
Kalon |
Subject: |
[Freetype] Problems with pcf format using freetype in win32 env |
Date: |
Tue, 09 Nov 2004 13:28:19 -0700 |
User-agent: |
Opera M2/7.54 (Win32, build 3865) |
Hi,
I am trying to use Freetype2 in a Win32 environment. The font that I am
trying to use is Roman Czyborra's unifont. I used his utility to convert
the font from 'hex' format to 'bdf' format. Using this "unifont.bdf"
works fine with Freetype2. The file opens correctly and it renders
correctly with the FT_Load_Char function.
But in order to conserve space I used a linux machine to convert the 'bdf'
file to a 'pcf' file using the command:
bdftopcf -o unifont.pcf unifont.bdf
Then I compressed the font using:
gzip -9 unifont.pcf
I now try to use this "unifont.pcf.gz" file with freetype2 and it does not
work correctly. The file opens just fine but FT_Load_Char seems to return
erronious data in the face structure. I wondered if maybe it was the
gzipped format so I tried again with the "unifont.pcf" file but had the
same trouble (file loads correctly but FT_Load_Char does not return
correct face data). (Detailed information below.)
I don't know how much information is needed to help me figure out what is
going wrong. I've included more technical details below. Seeing that the
'pcf' and 'pcf.gz' return a different pitch for the glyph than the 'bdf'
format, I wonder if it is just an improper use of the bdftopcf program due
to padding or something. If anyone can please help me out I would really
appreciate it.
FYI, my ultimate goal is to correctly render a unicode string using a
small, portable font that contains most unicode characters. Roman
Czyborra's unifont contains all of the characters I need to be able to
render and I don't need multiple font sizes. None of my files contain any
combining characters. If there are better ways to doing this then I would
appreciate that information also.
Thank you very much,
Kalon Mills
(Technical Infomation)
OS: WinXP
IDE: Visual Studio .Net 2002
Freetype2 version: 2.1.9
Freetype2 Library Build Type: Default options compiled in Single Thread
mode
*Loading unicode character 0x062D when using 'bdf' file* (correct version)
(face->glyph->bitmap)
-- bitmap {...} FT_Bitmap_
|- rows 0x00000010 int
|- width 0x00000008 int
|- pitch 0x00000001 int
|-+ buffer 0x00a77570 unsigned char *
|- num_grays 0x0000 short
|- pixel_mode 0x01 char
|- palette_mode 0 char
|- palette 0x00000000 void *
face->glyph->bitmap.buffer contains correct glyph information.
*Loading unicode character 0x062d when using 'pcf' file* (INCORRECT)
(face->glyph->bitmap)
-- bitmap {...} FT_Bitmap_
|- rows 0x00000010 int
|- width 0x00000008 int
|- pitch 0x00000004 int
|-+ buffer 0x0096d3e8 unsigned char *
|- num_grays 0x0001 short
|- pixel_mode 0x01 char
|- palette_mode 0 char
|- palette 0x00000000 void *
face->glyph->bitmap.buffer contains incorrect glyph information. It
conatins the glyph for character 0x072B and seems to be padded to 4 times
the size of what it should be.
*Loading unicode character 0x062D when using 'pcf.gz' file* (INCORRECT)
(face->glyph->bitmap)
-- bitmap {...} FT_Bitmap_
|- rows 0x00000010 int
|- width 0x00000008 int
|- pitch 0x00000004 int
|-+ buffer 0x0096d3e8 unsigned char *
|- num_grays 0x0001 short
|- pixel_mode 0x01 char
|- palette_mode 0 char
|- palette 0x00000000 void *
face->glyph->bitmap.buffer contains incorrect glyph information. It
conatins the glyph for character 0x0F42 and seems to be padded to 4 times
the size of what it should be.
- [Freetype] Problems with pcf format using freetype in win32 env,
Kalon <=