freetype
[Top][All Lists]
Advanced

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

Adding extra character mappings to true type files


From: Craig Peter Drummond
Subject: Adding extra character mappings to true type files
Date: Wed, 8 Mar 2000 23:17:18 +0000

Hello,

I'm writting a program to modify true type font files. What I basically want to
do is re-map some charachters that are not normally accessible into some unused
character positions. (specifically I'm mapping the 66 & 99 style quotation marks
to ASCII characters 147 & 148 - these aren't previously used in the font)

I've managed to locate the character map section in the ttf file, and have
successfully added two segments (one segment for the double quotes (66 & 99), 
and
another for single quotes (6 & 9)) to the 'encoding 4' character map section.

Everything appears to be OK, I can use the extra characters within StarOffice
no problem.

However, when I come to display a postscript file (printed from StarOffice)
using 'gs' or 'gv' the program crashes and complains that there's a problem
with the ttf file. (It works fine with an unmodified file). I don't
understand the error messages that are produced.

So, what I'd like to know - as I'm new to the internals of ttf files - is
what exactly should I be doing when adding new segments to an encoding 4
character map? I presume that I'm not adjusting/setting a value somewhere
that I shoud be.

I've enclosed a copy of my source file. The "ttf.h" file has been copied from 
ttf2pt1

Thanks in advance for any help.

Attachment: edit.c
Description: Source code

Attachment: ttf.h
Description: Header file


reply via email to

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