diff options
author | Russ Cox <rsc@swtch.com> | 2012-12-01 00:35:06 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2012-12-01 00:35:06 -0500 |
commit | 1785490baa3720b70ebf10d2e6da99ffb81db728 (patch) | |
tree | d4acbfe8ab6d0580dbd22f69b10e72c77308247f /src/cmd/fontsrv/osx.c | |
parent | c96d832508cc6a8db1420b93242af08ec08be720 (diff) | |
download | plan9port-1785490baa3720b70ebf10d2e6da99ffb81db728.tar.gz plan9port-1785490baa3720b70ebf10d2e6da99ffb81db728.tar.bz2 plan9port-1785490baa3720b70ebf10d2e6da99ffb81db728.zip |
fontsrv: scaled pjw
R=rsc
https://codereview.appspot.com/6854130
Diffstat (limited to 'src/cmd/fontsrv/osx.c')
-rw-r--r-- | src/cmd/fontsrv/osx.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/cmd/fontsrv/osx.c b/src/cmd/fontsrv/osx.c index b00698a8..f393dd3c 100644 --- a/src/cmd/fontsrv/osx.c +++ b/src/cmd/fontsrv/osx.c @@ -241,18 +241,10 @@ mksubfont(char *name, int lo, int hi, int size, int antialias) if(g[0] == 0 || !CGFontGetGlyphBBoxes(font, g, n, r)) { None: fc->width = 0; + fc->left = 0; if(i == 0) { - Point p; - Fontchar *i; - p = Pt(x, y0); - // memimagestring(m, p, memwhite, ZP, defont, peterface); - i = defont->info + 0; - memdraw(m, Rect(p.x+i->left, p.y+i->top, p.x+i->left+(i[1].x-i[0].x), p.y+i->bottom), - memwhite, ZP, defont->bits, Pt(i->x, i->top), S); - p.x += i->width; - fc->left = i->left; - fc->width = i->width; - x = p.x; + drawpjw(m, fc, x, (int)(bbox.size.width * size / unit + 0.99999999), y, y - y0); + x += fc->width; } continue; } |