freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] x_ppem == 0 with bytecode interpreter


From: Daniel Glöckner
Subject: Re: [ft-devel] x_ppem == 0 with bytecode interpreter
Date: Fri, 2 Mar 2007 12:01:30 +0100
User-agent: Mutt/1.4.2.1i

On Fri, Mar 02, 2007 at 06:12:50AM +0100, Werner LEMBERG wrote:
> We probably have introduced a bug.  Please provide a small sample code
> for further testing.

Is attached.

  Daniel
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_TRUETYPE_UNPATENTED_H

int main()
{
  FT_Library lib;
  FT_Open_Args args;
  FT_Parameter param;
  FT_Face face;
  int glyphA,glyphV;
  FT_Vector kerning;
  
  FT_Init_FreeType(&lib);
  args.flags=FT_OPEN_PATHNAME|FT_OPEN_PARAMS;
  args.pathname="Vera.ttf"; /* 
http://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-vera/1.10/ */
  args.num_params=1;
  args.params=&param;
  param.tag=FT_PARAM_TAG_UNPATENTED_HINTING; /* or build library with 
TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
  FT_Open_Face(lib, &args, 0, &face);
  FT_Set_Char_Size(face,200*64,200*64,0,0);
  glyphA=FT_Get_Char_Index(face,'A');
  glyphV=FT_Get_Char_Index(face,'V');
  FT_Get_Kerning(face,glyphA,glyphV,FT_KERNING_DEFAULT,&kerning);
  printf("Kerning vector pre Load_Glyph: %li %li\n",kerning.x,kerning.y);
  FT_Load_Glyph(face,glyphA,0);
  FT_Get_Kerning(face,glyphA,glyphV,FT_KERNING_DEFAULT,&kerning);
  printf("Kerning vector post Load_Glyph: %li %li\n",kerning.x,kerning.y);
  return 0;
}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]