[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freetype] type1 charmaps
From: |
tor . andersson |
Subject: |
[Freetype] type1 charmaps |
Date: |
Fri, 31 May 2002 19:16:18 +0200 |
User-agent: |
nail 9.30 2/20/02 |
Hello,
When I load a type 1 font with freetype-2.1.0 I can't seem to be able to
load the glyph index with FT_Get_Char_Index(). Truetype fonts work fine.
FT_Get_Char_Name() works fine. Freetype-2.0.9 works fine.
#include <assert.h>
#include <stdio.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#define FONT "times.pfb"
//#define FONT "times.ttf"
main()
{
FT_Library ftlib;
FT_Face ftface;
int err;
err = FT_Init_FreeType(&ftlib);
assert(err == 0 && "init");
err = FT_New_Face(ftlib, FONT, 0, &ftface);
assert(err == 0 && "newface");
err = FT_Set_Char_Size(ftface, 0, 12 * 64, 72, 72);
assert(err == 0 && "setcharsize");
err = FT_Get_Char_Index(ftface, 'a');
printf("glyph index = %d\n", err);
}
And testing:
falk-5[~/src/freetypetest] ./a-210
glyph index = 0
falk-5[~/src/freetypetest] ./a-209
glyph index = 27
/tor
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freetype] type1 charmaps,
tor . andersson <=