patched up font to make it presentable. fontforge's svg import is... not great
This commit is contained in:
parent
8525bee4aa
commit
af2679bab4
5380
roms/Apple410.sfd
5380
roms/Apple410.sfd
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -33,5 +33,5 @@ print "glyph count {}".format(len(font))
|
|||
#print font.createChar(0x41)
|
||||
#font[0x41].importOutlines("alpha_41.svg")
|
||||
|
||||
font.save("Apple410.ttf")
|
||||
font.save("Apple410-new.sfd")
|
||||
|
||||
|
|
|
@ -36,17 +36,17 @@ def unpack_byte(b):
|
|||
return (x,y)
|
||||
|
||||
# H:W for a char is 3:2
|
||||
def unpack_coords(b,xscale=66,yscale=100,xoff=10,yoff=10):
|
||||
def unpack_coords(b,xscale=66,yscale=100,xoff=25,yoff=25):
|
||||
"convert two 4-bit signed packed numbers to cairo coordinates"
|
||||
(x,y) = unpack_byte(b)
|
||||
return (x*xscale + xoff, (8 - y)*yscale + yoff)
|
||||
|
||||
def build_char_file(path, ft, offset):
|
||||
surf = cairo.SVGSurface(path, 1000, 1220)
|
||||
surf = cairo.SVGSurface(path, 800, 1280)
|
||||
c = cairo.Context(surf)
|
||||
d = list(get_char(ft, offset))
|
||||
#c.set_source_rgb(0.0, 0.0, 0.0)
|
||||
c.set_line_width(20)
|
||||
c.set_line_width(40)
|
||||
c.set_line_cap(cairo.LINE_CAP_ROUND)
|
||||
c.set_line_join(cairo.LINE_JOIN_ROUND)
|
||||
while d:
|
||||
|
|
Loading…
Reference in New Issue