freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] BUG report: CJK - can't get SFNT correctly


From: Werner LEMBERG
Subject: Re: [Devel] BUG report: CJK - can't get SFNT correctly
Date: Sun, 02 Sep 2001 20:19:39 +0200 (CEST)

> Description of problem:
> when the TrueType font has some language ID, freetype library 
> can't return
> the SFNT correctly.
> 
> How reproducible:
> Always
> 
> Steps to Reproduce:
> 1.compile a sample code. (gcc -o fttest `freetype-config --cflags 
> --libs`
> fttest.c
> 2../fttest /usr/share/fonts/ja/TrueType/kochi-gothic.ttf
> 3.see also a log.

fttest.c is buggy: You can't use strncpy() to copy `sn.string' since
strncpy() stops at the first \0 -- `sn.string' can contain \0 anywhere
in case it is encoded in Unicode, for example.  You must use a loop to
copy the bytes in the string.


    Werner



reply via email to

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