Quantcast

FontForge will not open the Terminus raster font

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FontForge will not open the Terminus raster font

Nathan Willis-4


On Thu, Mar 2, 2017 at 8:59 PM, Anton Sherwood <[hidden email]> wrote:
On 2017-3-02 00:18, Nathan Willis wrote:
> Have you read what Bigelow & Holmes wrote about their experience
> converting Apple's system bitmap fonts to TrueType in the 90s, hopefully?

I've read something about it, but not recently!


> The tools available have evolved considerably since then, of course, but
> I'm sure their insights to the issues would be worth seeing.  There are
> a lot of design decisions that crop up when you're out in the weeds, for
> instance, like the drastic differences you get in proportions between
> different bitmap-point-sizes.  Today we could account for that by having
> optical-size variants, which would be fascinating to explore as a project.

Fortunately ;) the font at the top of my agenda, that of the PLATO IV
terminal, has only one size.  But I have pondered what's the Right Way
to approach Apple Geneva, for example.

--
*\\*  Anton Sherwood  *\\*  www.bendwavy.org

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html



--
nathan.p.willis
[hidden email]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html
Joe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FontForge will not open the Terminus raster font

Joe
In reply to this post by Js jS
On March 3, 2017 12:40:59 AM Js jS wrote:
> i figured how to create characters before drawing into them, so now you
> just get the bdf file, start new font and run the script

Interesting method to vectorize the font.
Somewhat similar to building a brick wall.
I could see that cleanup is going to be a fair bit of deleting unneeded
lines, but this is a good starting point, and you do indicate it's very
preliminary.
I would recommend building-up on your idea, and having an intermiediate
stage.
As this is getting technical, I would recommend moving the discussion to
the developer list, and leave the user list to concentrate mainly on fonts.
...however, in terms the middle stage, this is the suggestion:

suppose the font is an 8x8 pixel square.
create an array (8x2+1)x(8x2+1).
then for your main draw routine, replace it with something to fill in the
new array.

for looping through x and y do....
# print "ox,oy",ox, oy
        a(x*2,y*2)=a(x*2,y*2)+1 #top edge
        a(x*2,y*2+1)=a(x*2,y*2+1)+1 #right edge
        a(x*2+1,y*2+1)=a(x*2+1,y*2+1)+1 #bottom edge
        a(x*2+1,y*2)=a(x*2+1,y*2)+1 #left edge

after you fill in the new array, you can now cleanup and remove overlaps
where you see a(nx,ny)>=2, as these are overlapping lines, while 1 is most
likely an edge and therefore what you want to keep.
after cleanup, this next step is harder, but anything with 1, you can test
straight rows and figure-out a way to make your short segments into one long
line.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FontForge will not open the Terminus raster font

Abraham Lee
Hi, All!

I realize this is in response to a slightly older thread, but I thought I'd share my results anyway. 

On Sat, Mar 4, 2017 at 1:19 PM, Jose Da Silva <[hidden email]> wrote:
On March 3, 2017 12:40:59 AM Js jS wrote:
> i figured how to create characters before drawing into them, so now you
> just get the bdf file, start new font and run the script

Interesting method to vectorize the font.
Somewhat similar to building a brick wall.
I could see that cleanup is going to be a fair bit of deleting unneeded
lines, but this is a good starting point, and you do indicate it's very
preliminary.
I would recommend building-up on your idea, and having an intermiediate
stage.
As this is getting technical, I would recommend moving the discussion to
the developer list, and leave the user list to concentrate mainly on fonts.
...however, in terms the middle stage, this is the suggestion:

suppose the font is an 8x8 pixel square.
create an array (8x2+1)x(8x2+1).
then for your main draw routine, replace it with something to fill in the
new array.

for looping through x and y do....
#       print "ox,oy",ox, oy
        a(x*2,y*2)=a(x*2,y*2)+1 #top edge
        a(x*2,y*2+1)=a(x*2,y*2+1)+1 #right edge
        a(x*2+1,y*2+1)=a(x*2+1,y*2+1)+1 #bottom edge
        a(x*2+1,y*2)=a(x*2+1,y*2)+1 #left edge

after you fill in the new array, you can now cleanup and remove overlaps
where you see a(nx,ny)>=2, as these are overlapping lines, while 1 is most
likely an edge and therefore what you want to keep.
after cleanup, this next step is harder, but anything with 1, you can test
straight rows and figure-out a way to make your short segments into one long
line.

I wrote a fairly extensive python script that follows a procedure similar to the one suggested (even though I came up with it on my own) to convert the Terminus fonts into vectorized pixel representations. Each pixel was drawn as a square and in the end I was able to clean up the glyphs by removing all the interior points/contours and removing extra points/contours along the edges (e.g., change 3 colinear segments into a single segment). I call the font family "Vecterminus" to comply with SIL OFL. You can find the OTF files on my github project page: https://github.com/tisimst/vecterminus (couldn't think of a better place to put them).

There are "medium" and "bold" files for each pixel font (12px, 14px, 16px, 18px, 20px, 24px, 28px, and 32px), but I haven't attempted to make italic and bold-italic variants yet. The files are true to the originals in every way, except they are vectorized.

I've done some quick testing to see how well them are rendered at various pt sizes. Doing so, led me to find some optimal display sizes, as shown in the file https://github.com/tisimst/vecterminus/blob/master/match-font-to-size-chart.txt. There's a chart for Notepad++ users (which I use the most) and Word users (which, I don't think I would ever use for coding, but who knows, maybe someone does). Not sure why there's a discrepancy between the two charts, but that's what I found from my own testing. The matched pt sizes assume a screen resolution of 96dpi and look really nice at their intended sizes, but not so great at other sizes.

I initially left them scaled to their low res sizes (e.g., em = 12 for 12px font), but Windows struggled rendering them, so they are all scaled to em=1000, regardless of original px size.

Anyway, have fun using them!

Best,
Abraham 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FontForge will not open the Terminus raster font

Abraham Lee
A little addendum...

On Thu, May 18, 2017 at 5:18 PM, Abraham Lee <[hidden email]> wrote:
I've done some quick testing to see how well them are rendered at various pt sizes. Doing so, led me to find some optimal display sizes, as shown in the file https://github.com/tisimst/vecterminus/blob/master/match-font-to-size-chart.txt. There's a chart for Notepad++ users (which I use the most) and Word users (which, I don't think I would ever use for coding, but who knows, maybe someone does). Not sure why there's a discrepancy between the two charts, but that's what I found from my own testing.

This seems to only be the case on my laptop (sigh). Other monitors show the "Word" matched sizes correctly for 96dpi screens:

12px - 9pt
14px - 10.5pt
16px - 12pt
18px - 13.5pt
20px - 15pt
24px - 18pt
28px - 21pt
32px - 24pt

In case you don't have 96dpi screens, but something else, here's the math to know the right display sizes:

dpi = 96  <---pixels per inch
pt = 72  <--- pts per inch

ratio = pt/dpi = 72/96 = 3/4 = .75

Thus, 12px*ratio = 9pt

So, if your screen resolution is different, just replace 96 with whatever you monitor resolution is to determine the appropriate sizes for each font.

Best,
Abraham 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
fontforge-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html
12
Loading...