On fonts

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
User avatar
Markelius
Posts: 58
Joined: 19 Mar 2013, 09:13

On fonts

Post by Markelius » 30 Jul 2014, 21:53

So right now, OpenMw comes equipped to read the .fnt files packaged with the vanilla game, with the exception of modded ones such as Hrnchamd's better Morrowind font.

It also comes with the framework using MyGUI to use fonts in .ttf and .otf format (I have tested and confirmed that .otf works).

What this obviously means is that it will now be significantly easier for modders to add in custom fonts, and replace the existing ones. With OpenMw 0.30.0 (have not tested with 0.31.0 yet, but I'm sure it works) I have been able to replace the default Magic Cards font with a slightly edited version of a "Magic Cards" font I downloaded online. The font was free for personal use so it should be okay to distribute.

The issue with this however, is that while I did get a very nice looking replacement for the vanilla font working in game, it does not support international characters. In fact, I have not been able to find a single variant of the Magic Cards font that supports the international characters required. I have tried Planewalker, a couple versions of Magic Cards Normal, Magic Medieval, and Goudy Medieval, and none of these support international characters, which is obviously a huge problem. I don't know what version of Magic Cards Bethesda used in Morrowind, but I have not been able to find a .ttf or .otf version of it.

So what I'm wondering is, is there some way I can get the game's .fnt files into a workable format? Any way I can convert them to a format that fontforge could open? Failing that, would it be possible for someone to get screenshots of every single character in the font? I know this would be extremely tedious and I'm not expecting anyone to be able to help me, but it would be extremely useful.

Lastly, before I commit myself to a rather large project, is there anyone already working on a replacement for Magic Cards? I remember being told someone was working on one that included international characters, but I have not heard about this since. Is it true? If not, I might be able to help. It would require me remaking/adapting a pretty large amount of characters, but I imagine the end result would be very much worth it.

Of course, if I could just find a version of Magic Cards in truetype or opentype that supported these international characters (I still have no clue what variant of Magic Cards Bethesda used), I could put it into OpenMw and be done with it, but I have not had any luck with this myself, so I'm not too optimistic about it.


Bonus: Redguard uses .fnt fonts too, and has its own typeface, unfortunately I have not been able to open these fonts at all. If anyone could help me with this, I might (at some point) create an opentype version of Redguard's font. :)
Known as starwarsgal by the Morrowind Modding community.
modding tumblr | bethsoft forum profile

HiPhish
Posts: 323
Joined: 02 Jul 2012, 08:36

Re: On fonts

Post by HiPhish » 30 Jul 2014, 22:11

If I remember correctly the default font for OpenMW is not the original Magic Cards but an open font named EB Garamond:
http://www.georgduffner.at/ebgaramond/

The problem with the vanilla font is that it's a bitmap font, it cannot be scaled without becoming blurry. it's like scaling up any other bitmap image. EB Garamond however is a vector-based font, so it will always look crisp an pleasant to read at any resolution. If there are missing glyphs it would be best to contact the author and tell him. The bitmap-based vanilla font is best left ignored.

EDIT: which glyphs are you missing anyway? Maybe they are already included and OpenMW is including an older version. Try downloading the newest release from the site and replacing the stock font with it.

User avatar
Markelius
Posts: 58
Joined: 19 Mar 2013, 09:13

Re: On fonts

Post by Markelius » 30 Jul 2014, 22:33

HiPhish wrote:If I remember correctly the default font for OpenMW is not the original Magic Cards but an open font named EB Garamond
EB Garamond is not the default Morrowind font at all, it doesn't look nearly the same, other than being serif.
HiPhish wrote:The problem with the vanilla font is that it's a bitmap font, it cannot be scaled without becoming blurry. it's like scaling up any other bitmap image. EB Garamond however is a vector-based font, so it will always look crisp an pleasant to read at any resolution. If there are missing glyphs it would be best to contact the author and tell him. The bitmap-based vanilla font is best left ignored.
I know that the vanilla font is a bitmap font, that's the whole reason I made this thread, I want to replace it with a vector based font. Also, like I said, EB Garamond is not an option, it doesn't look like Magic Cards at all.
HiPhish wrote:EDIT: which glyphs are you missing anyway? Maybe they are already included and OpenMW is including an older version. Try downloading the newest release from the site and replacing the stock font with it.
There are no glyphs "included" in OpenMw. OpenMw just reads the default "Magic Cards.fnt" in Morrowind's font folder and uses that by default.
Known as starwarsgal by the Morrowind Modding community.
modding tumblr | bethsoft forum profile

HiPhish
Posts: 323
Joined: 02 Jul 2012, 08:36

Re: On fonts

Post by HiPhish » 30 Jul 2014, 23:32

I'm sorry, I thought OpenMW was still using EB Garamond (which is the better font IMO), looks like my knowledge was outdated. Here is when EB Garamond replaced the previous default Comic Sans:
viewtopic.php?f=6&t=561#p4040

Anyway, the only solution is to find a typographer who would be willing to make an open version of Magic Cards. The guy who made EB Garamond is working on a daedric font, so maybe he would be interested in making an open Magic Cards font.
https://github.com/georgd/OpenMW-Fonts

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: On fonts

Post by scrawl » 30 Jul 2014, 23:55

So what I'm wondering is, is there some way I can get the game's .fnt files into a workable format?
Exporting the glyph images and metrics can be done easily by adding some code to OpenMW's font loader, but I'm not sure what format one should use.
The main problem is that .fnt's are bitmap fonts, whereas ttf are vector fonts. Converting a bitmap font to a vector font may be possible with varying degree of success. There are tools for that, it's called autotracing.

Another alternative would be to still use a bitmap font, but in a more sensible format (one that is using Unicode). MyGUI supports this, too (ResourceManualFont). It basically consists of an image containing all the glyphs and an XML file describing the coordinates and metrics of each glyph. That's actually what we internally convert the .fnt files to, so exporting them in that format would be dead simple.

User avatar
Markelius
Posts: 58
Joined: 19 Mar 2013, 09:13

Re: On fonts

Post by Markelius » 31 Jul 2014, 00:55

As I said, I know the game uses bitmap fonts, however, I've tried loading them with bitmap font editors and the font editors always tell me the files are corrupt. I'm lead to believe Morrowind uses some kind of slightly modified .fnt format. This isn't really a problem if you can export out the characters though. I hope someone can help me with this, I could get a good, open source otf version of Magic Cards with a bit of work, would be a huge gain for the Morrowind modding community, not just for OpenMw.
Known as starwarsgal by the Morrowind Modding community.
modding tumblr | bethsoft forum profile

User avatar
Markelius
Posts: 58
Joined: 19 Mar 2013, 09:13

Re: On fonts

Post by Markelius » 31 Jul 2014, 01:15

HiPhish wrote:Anyway, the only solution is to find a typographer who would be willing to make an open version of Magic Cards.
Sorry, I thought I had made it clear that I was offering to do just that. :)
Known as starwarsgal by the Morrowind Modding community.
modding tumblr | bethsoft forum profile

User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: On fonts

Post by scrawl » 31 Jul 2014, 02:37

Here you go (took about 5 lines of code to make).

In the xml file, the indices are decimal 32 bit code points. Image coordinates are specified as (left, top, width, height). Advance and bearing are standard measurements (http://www.freetype.org/freetype2/docs/ ... phs-3.html).
Attachments
font_export.xml
(20.52 KiB) Downloaded 89 times
font.png
Font image

ezze
Posts: 426
Joined: 21 Nov 2013, 13:20

Re: On fonts

Post by ezze » 31 Jul 2014, 10:08

I was thinking... TeX is able to place the diacritics on the letters as needed. E.g.,

Code: Select all

\'a or \`\i
It would be possible to add such a function in OpenMW? It would not solve internalization because many languages need much more that diacritics (Asiatic languages, Russian, Greek...) but it might help for many.

User avatar
pvdk
Posts: 523
Joined: 12 Aug 2011, 16:34

Re: On fonts

Post by pvdk » 02 Aug 2014, 00:45

A while ago I convinced the author of EB Garamond, the font we used at the time (and still do in the launcher), to recreate a libre version of the Magic Cards font, with all the proper glyphs and such. He actually started working on it, but it seems he lost interest. It might be he didn't see the need for it after we implemented support for the original .fnt files. He did however finish a rather nice Daedric font, you can find it here: https://github.com/georgd/OpenMW-Fonts

Here's a screenshot he sent me of his progress, but that was ages ago. Maybe this renewed interest in having a proper bitmap Magic Cards font can convince him to finish it ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests