SpeedoFont file viewer / simple GEM font editor
-
- Fuji Shaped Bastard
- Posts: 3413
- Joined: Sun Aug 03, 2014 5:54 pm
SpeedoFont file viewer / simple GEM font editor
During some recent experiments with NVDI & font files, i wrote some utilities.
One is (a very simple) Editor for GEM *.fnt files. For now, you can only edit existing fonts, but there is also some support to export/import them from some propietary text file format.
Another is a viewer for SpeedoFont files.
All programs are clean GEM programs, however the SpeedoFont file viewer might need some reasonable high resolution to be usable. A modified version of it is also running as a web service.
Sources, and binaries for a font file viewer for windows&linux, are available as gemfedit-1.0.2-src.zip.
I you find any problems, or wrong mappings in the font files, please let me know.
Have fun,
Thorsten
One is (a very simple) Editor for GEM *.fnt files. For now, you can only edit existing fonts, but there is also some support to export/import them from some propietary text file format.
Another is a viewer for SpeedoFont files.
All programs are clean GEM programs, however the SpeedoFont file viewer might need some reasonable high resolution to be usable. A modified version of it is also running as a web service.
Sources, and binaries for a font file viewer for windows&linux, are available as gemfedit-1.0.2-src.zip.
I you find any problems, or wrong mappings in the font files, please let me know.
Have fun,
Thorsten
Last edited by ThorstenOtto on Mon Jul 23, 2018 11:42 pm, edited 2 times in total.
Re: SpeedoFont file viewer / simple GEM font editor
Good work on this. I just loaded it up, seems fairly straightforward. Any chance you can add a function to rearrange a font? I'd like to change the greek one to iso8859-7 and see what it does.
Edit:
Also, I had an idea, if I used the txt export and changed the hex codes for the glyphs, would it rearrange them on input?
Edit:
Also, I had an idea, if I used the txt export and changed the hex codes for the glyphs, would it rearrange them on input?
-
- Fuji Shaped Bastard
- Posts: 3413
- Joined: Sun Aug 03, 2014 5:54 pm
Re: SpeedoFont file viewer / simple GEM font editor
The editor is mainly designed for making a few adjustments to existing fonts, like e.g. in EmuTOS when we need to change the glyphs that are used by the window gadgets. Rearranging them might be possible, but remember that the current greek font (as well as the latin2 font) has lots of glyphs that are not present in the original font.christos wrote:Any chance you can add a function to rearrange a font? I'd like to change the greek one to iso8859-7 and see what it does.
Yes, that should work.Also, I had an idea, if I used the txt export and changed the hex codes for the glyphs, would it rearrange them on input?
-
- Atari Super Hero
- Posts: 526
- Joined: Mon Sep 11, 2006 10:15 am
- Location: Frankfurt am Main, Germany
Re: SpeedoFont file viewer / simple GEM font editor
Nice work, thank you:-)
Re: SpeedoFont file viewer / simple GEM font editor
Useful stuff, Thorsten. I only tested the programs quickly on my Firebee and unfortunately spdview.prg froze it. Running it with the 68k emulator works though, and the other two programs ran fine as they are.
-
- Fuji Shaped Bastard
- Posts: 3413
- Joined: Sun Aug 03, 2014 5:54 pm
Re: SpeedoFont file viewer / simple GEM font editor
The TOS programs were all compiled using Pure-C, so that might not work.jfl wrote:I only tested the programs quickly on my Firebee and unfortunately spdview.prg froze it.
Maybe pure luck, they are not native CF binaries.You may want to recompile them for the FireBee.Running it with the 68k emulator works though, and the other two programs ran fine as they are.
- Neurotoxic
- Captain Atari
- Posts: 169
- Joined: Thu Apr 20, 2017 9:29 pm
- Location: Bremen (Germany)
Re: SpeedoFont file viewer / simple GEM font editor
All programs just ran fine on my Milan. Thank you very much!
520 ST(M) (TOS 1.02), Falcon030 (16 MHz, 16 MB RAM, CF-Card, MiNT & MyAES), Milan040 (25 MHz, 48 MB RAM, EasyMiNT 1.90), Firebee, PowerMac G5 Late 2005 (2 x 2,3 GHz, Mac OS 10.5), iMac 4K Late 2015 (intel Core i7 4 x 3,3 GHz, Mac OS 10.11.6), IBM XT SFD (640 KB RAM, DR DOS 6.0), Compaq LTE 5300 (Pentium/133 MHz, DR-DOS 7.03), AT-PC (Cyrix 6x86L/200 MHz, Windows 98 SE/MS-DOS 6.22 & Windows 3.11)
Re: SpeedoFont file viewer / simple GEM font editor
Thanks for providing it! Finally a tool to quickly have a glance at fonts without “installing” ’em first.ThorstenOtto wrote:During some recent experiments with NVDI & font files, i wrote some utilities.
One is (a very simple) Editor for GEM *.fnt files. For now, you can only edit existing fonts, but there is also some support to export/import them from some propietary text file format.
Another is a viewer for SpeedoFont files.
All programs are clean GEM programs, however the SpeedoFont file viewer might need some reasonable high resolution to be usable. A modified version of it is also running as a web service.
Sources, and binaries for a font file viewer for windows&linux, are available as gemfedit-1.0.1-src.zip.
I you find any problems, or wrong mappings in the font files, please let me know.
Have fun,
Thorsten
I just tried it on TOS 2.06 with WINX 2.3n, and I’m getting "AES ERROR - Application: FONTDISP | Function ID: wind_update | END_: … underflow", when loading a new font with ^O, in front of the file selector: https://s1.hoffart.de/~goetz/Schnipsel/1515878064.png
I think it’d be cool if the font would be display enlarged and in original size (perhaps with changeable text strings) for an easier judgement. <edit> Ops, this is built in, but I didn’t notice for the first fonts I tried, because the preview at 1× showed the system font, not the loaded font.
-
- Fuji Shaped Bastard
- Posts: 3413
- Joined: Sun Aug 03, 2014 5:54 pm
Re: SpeedoFont file viewer / simple GEM font editor
That seems to be caused by your file selector. I think that does not happen when using the menu instead. Should be fixed now, but that isarf wrote: I just tried it on TOS 2.06 with WINX 2.3n, and I’m getting "AES ERROR - Application: FONTDISP | Function ID: wind_update | END_: … underflow", when loading a new font with ^O
Yes, the viewer shows the system font in the preview on the left side, because you can scale the loaded font down to its original size. That was done by intention, so you can easily check which characters might be missing, or changed. OTOH, the editor will display the loaded font instead.Ops, this is built in, but I didn’t notice for the first fonts I tried, because the preview at 1× showed the system font, not the loaded font.
- Eero Tamminen
- Fuji Shaped Bastard
- Posts: 3993
- Joined: Sun Jul 31, 2011 1:11 pm
Re: SpeedoFont file viewer / simple GEM font editor
AHCC is Pure-C compatible and supports CF, so for CF build you would just need to add PRJ file for AHCC.ThorstenOtto wrote:The TOS programs were all compiled using Pure-C, so that might not work.jfl wrote:I only tested the programs quickly on my Firebee and unfortunately spdview.prg froze it.
Maybe pure luck, they are not native CF binaries.You may want to recompile them for the FireBee.Running it with the 68k emulator works though, and the other two programs ran fine as they are.
Some of my programs are built with AHCC and have PRJ files both for m68k & CF, which you can use as examples if you haven't used AHCC earlier:
http://eerott.mbnet.fi/hatari/programs.shtml
-
- Fuji Shaped Bastard
- Posts: 3413
- Joined: Sun Aug 03, 2014 5:54 pm
Re: SpeedoFont file viewer / simple GEM font editor
I know, but to be honest i don't trust AHCC. When the developer thinks he can use the 16bit library when compiling for 32bit-ints by just declaring all standard functions taking short arguments instead of int, he obviously did not understand some key concepts of integer promotion. And the GUI is a real mess, with the log window popping up all the time, and that monster configuration dialog...Eero Tamminen wrote:AHCC is Pure-C compatible and supports CF, so for CF build you would just need to add PRJ file for AHCC.
But you can just hack the Makefile in the tos directory to add the necessary flags for CF, and (cross)-compile it using gcc instead. The resulting binaries would of just be larger, due to the overhead of mintlib.
-
- Fuji Shaped Bastard
- Posts: 3413
- Joined: Sun Aug 03, 2014 5:54 pm
Re: SpeedoFont file viewer / simple GEM font editor
Update: link to archive (in first post) changed to current version.
And a new function has been made available on the web: you can now also view most truetype font formats.
Gives some strange results yet with fonts that use lots of combining diacrits, but should otherwise work. But be warned: as for now, every glyph is rendered as a single image. Since truetype fonts usually contain lots of them, your browser will request a few thousands images.
And a new function has been made available on the web: you can now also view most truetype font formats.
Gives some strange results yet with fonts that use lots of combining diacrits, but should otherwise work. But be warned: as for now, every glyph is rendered as a single image. Since truetype fonts usually contain lots of them, your browser will request a few thousands images.
- Rajah Lone
- Atari Super Hero
- Posts: 591
- Joined: Wed Aug 07, 2002 12:27 pm
- Location: Lyon / France
- Contact:
Re: SpeedoFont file viewer / simple GEM font editor
- "Can't open ../fonts/tos/system10.fnt", but it's because I extracted .prg+.rsc from the whole archive to use it in some production mode/folder.ThorstenOtto wrote: Sat Dec 30, 2017 12:58 pmAll programs are clean GEM programs
I you find any problems, or wrong mappings in the font files, please let me know
- suggestion: c:/gemsys/ for default convenient .fnt folder
- gemfedit.prg: complety messy with redraws, on multitasking mode, moving window ontop the charset view. See snapshot (V4SA, 720p, TC32).
- fontdisp.prg: issue to see chars at bottom, if screen height is not enough.
- gemfedit adding new char seems not possible. My favorite "Verdana Bitmap" has no "°" (0xFB) and I would be happy to add it with some tool.
Don't bother. Searching for a similar tool.
You do not have the required permissions to view the files attached to this post.
Re: SpeedoFont file viewer / simple GEM font editor
Any chance of an update? I've stumbled on libpng and later curl
After linking from libpng16 to libpng12 i got this error:
Code: Select all
In file included from spdview.c:9:
../include/writepng.h:59:10: fatal error: libpng12/png.h: Datei oder Verzeichnis nicht gefunden
59 | #include <libpng12/png.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:26: spdview.o] Fehler 1
make[1]: Verzeichnis „/home/ragnar/Downloads/speedo-fonts-editor/spdview“ wird verlassen
make: *** [Makefile:8: all] Fehler 2
ragnar@tower:~/Downloads/speedo-fonts-editor$ sudo su
[sudo] Passwort für ragnar:
root@tower:/home/ragnar/Downloads/speedo-fonts-editor# apt install libpng
libpng16-16 libpng++-dev libpng-dev libpnglite0 libpnglite-dev libpng-sixlegs-java libpng-sixlegs-java-doc libpng-tools
root@tower:/home/ragnar/Downloads/speedo-fonts-editor# apt install libpng-dev
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
libpng-dev ist schon die neueste Version (1.6.39-2).
libpng-dev wurde als manuell installiert festgelegt.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
root@tower:/home/ragnar/Downloads/speedo-fonts-editor# dpkg -l | grep -e "libpng"
ii libpng-dev:amd64 1.6.39-2 amd64 PNG library - development (version 1.6)
ii libpng-tools 1.6.39-2 amd64 PNG library - tools (version 1.6)
ii libpng16-16:amd64 1.6.39-2 amd64 PNG library - runtime (version 1.6)
ii libpng16-16:i386 1.6.39-2 i386 PNG library - runtime (version 1.6)
Code: Select all
cgiutil.c: In function ‘curl_download’:
cgiutil.c:784:9: error: ‘CURLOPT_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Werror=deprecated-declarations]
784 | curl_easy_setopt(curl, CURLOPT_PROTOCOLS, ALLOWED_PROTOS);
| ^~~~~~~~~~~~~~~~
In file included from cgiutil.h:1,
from cgiutil.c:7:
/usr/include/x86_64-linux-gnu/curl/curl.h:1749:3: note: declared here
1749 | CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
| ^~~~~~~~~~~~~~~~~
cgiutil.c:813:9: error: ‘CURLINFO_SIZE_DOWNLOAD’ is deprecated: since 7.55.0. Use CURLINFO_SIZE_DOWNLOAD_T [-Werror=deprecated-declarations]
813 | curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &size);
| ^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2841:3: note: declared here
2841 | CURLINFO_SIZE_DOWNLOAD
| ^~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [<eingebaut>: cgiutil.o] Fehler 1
make[1]: Verzeichnis „/home/ragnar/Downloads/speedo-fonts-editor/spdview“ wird verlassen
make: *** [Makefile:8: all] Fehler 2
• FireBee • Falcon030/040/060 • MiSTer • TT • (Mega)STe • Suska III-B • Suska III-C • (Mega)ST •
-
- Fuji Shaped Bastard
- Posts: 3413
- Joined: Sun Aug 03, 2014 5:54 pm
Re: SpeedoFont file viewer / simple GEM font editor
Should already be fixed in the repo. Please update your local repo and try again.
Re: SpeedoFont file viewer / simple GEM font editor
i didn't know there was a repo, i used the zip file from aboveThorstenOtto wrote: Mon Dec 30, 2024 6:01 am Should already be fixed in the repo. Please update your local repo and try again.
• FireBee • Falcon030/040/060 • MiSTer • TT • (Mega)STe • Suska III-B • Suska III-C • (Mega)ST •
-
- Fuji Shaped Bastard
- Posts: 3413
- Joined: Sun Aug 03, 2014 5:54 pm
Re: SpeedoFont file viewer / simple GEM font editor
I didn't make a new release yet, so there is no new source archive. The repo is available at https://github.com/th-otto/gemfedit/. Unfortunately the source archive is too large to attach it here, so if you can't use the repo, let me know, then i'll make an intermediate archive available for download.
Re: SpeedoFont file viewer / simple GEM font editor
Works, until m68k-atari-mint-gcc comes to play which is not installed yet. Will do it this eveningThorstenOtto wrote: Mon Dec 30, 2024 8:04 am I didn't make a new release yet, so there is no new source archive. The repo is available at https://github.com/th-otto/gemfedit/. Unfortunately the source archive is too large to attach it here, so if you can't use the repo, let me know, then i'll make an intermediate archive available for download.
• FireBee • Falcon030/040/060 • MiSTer • TT • (Mega)STe • Suska III-B • Suska III-C • (Mega)ST •