Re: [ft] Creating an [OT]TF font from BDF font
George Williams <[email protected]> 16 Dec 2005 14:16:47 -0800
| Newsgroups | gmane.comp.fonts.freetype.user,gmane.comp.xfree86.fonts |
|---|---|
| Organization | PfaEdit |
| Message-ID | <1134771407.1361.66.camel@lynch> |
--=-shHQBdzp6+/uuVwAFemS
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Thu, 2005-12-08 at 10:29, Juliusz Chroboczek wrote:
> You will find what I believe is the most up-to-date version of
> fonttosfnt in the X.Org CVS tree. There's also a version in XFree86,
> but I'm not sure it has been kept up to date.
I downloaded fonttosfnt from x.org's cvs repository.
I build my little test case (same one ff generated) using this
fonttosfnt. Neither fontforge nor ftview would read the result.
This turned out to be because the faces have different x_ppem and
y_ppem, while the original bdf fonts have the same x/y resolution.
I believe this problem occurs because the call to makeStrike in read.c
uses face->available_sizes[i].width when it should be using
face->available_sizes[i].x_ppem>>6.
So I suggest the following patch (I have no write access to the cvs tree
myself) -- there are several other uses of
face->available_sizes[i].width which may also need to be changed, but
with this patch I can now produce a font which loads.
--=-shHQBdzp6+/uuVwAFemS
Content-Disposition: attachment; filename=ppem.patch
Content-Type: text/x-patch; name=ppem.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit
*** read.c~ 2005-12-16 14:04:44.000000000 -0800
--- read.c 2005-12-16 14:07:04.000000000 -0800
***************
*** 250,257 ****
}
strike = makeStrike(font,
! face->available_sizes[i].width,
! face->available_sizes[i].height);
if(strike == NULL) {
fprintf(stderr, "Couldn't allocate strike.\n");
return -1;
--- 250,257 ----
}
strike = makeStrike(font,
! face->available_sizes[i].x_ppem>>6,
! face->available_sizes[i].y_ppem>>6);
if(strike == NULL) {
fprintf(stderr, "Couldn't allocate strike.\n");
return -1;
--=-shHQBdzp6+/uuVwAFemS
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype
--=-shHQBdzp6+/uuVwAFemS--