Jump to content
  • The Weighting of Fonts


    TriggerAu

    Preamble (or pre-ramble if you know me)

    After some discussions we thought we’d make use of the Dev Articles section of the forum and post some experiences, stories and information about various development topics. Hopefully this is the first of a number of posts by members of the development team, detailing both old and new topics to do with KSP and our work.

    These will not be scheduled in like regular forum posts. Rather think of them like a blog, with multiple authors (the devs), who can share info when they are able.

    There’s a number of topics we have thought to talk on, but for this first one I thought I could type about something that Julioz and I have been spending a fair bit of time on - Localization and Fonts....

    Background

    Localization is the process by which a product can display text and audio in a language local to the consumer. While English is a very common language there are many people who do not speak it fluently and have asked/and appreciate the ability to more easily read, comprehend and in the end play KSP.

    As we would be needing a much larger range of characters and symbols to be able to handle many different languages we started by having a look at our current fonts and whether they would be up to the task. After some discussion amongst the team it was decided that we would be better served by moving to a different font by the name of NotoSans. This Open source font is similar to the OpenSans font we have been using in KSPedia, but has a much wider character set for Localization so it was decided this would be a  good choice.

    Getting it to “fit” KSP

    You just swap in the new font and all good right? Unfortunately it’s not that simple :( and that’s where Julio and I have spent a bit of time. We use a plugin called TextMesh Pro to place text in KSP. It’s very flexible and easy to use, so the actual swapping of fonts wouldn’t be too big a problem. The challenge that raised its head was when we looked at the size of the fonts and how we would “fit” things.

    Having a printing background in my other job I could tell you all about the Em Square and how that relates to point size, but in the interest of not boring you all to death I’ll give you the simple version: “Not all fonts are created equal.” The visible portion of a 14pt Calibri ‘A’ character is not necessarily the same height and width as a 14pt NotoSans ‘A’ character, and so on. Here’s some lovely ascii art that shows an extreme example:

    Eui7Mmo.png

    The new NotoSans font is wider and taller than our existing Calibri font, so after choosing that font we then need to scale it to suit the games UI - or alternately adjust the game objects to suit the new size. We decided to scale the font down slightly to get things close to the size you are all used to and then adjust the weighting of the font to make sure it wasn’t too thin or hard to read.

    Weighting it as well

    Speaking of weighting (which is in essence the width of each stroke in the character), as some of the languages we are doing contain graphical characters (sorry if that’s the incorrect term) like Kanji we have to work with the font settings a bit to make sure we don’t blow out the characters by overweighting the stroke, and on the flipside we don’t make the weight too narrow that the text disappears. Heres some examples of how not to do these types of fonts…

    KfNWJBT.png  KY5EiyF.png

    And my personal favorite: when I forgot to change all the font sets, this sorta changes the emphasis on some things.

    RYhKPF2.png

    So after a fair bit of back and forth to make sure all of our eyeballs are correctly calibrated we end up with something like this:

    tdUQUAt.png

    Job Done?

    Once we had that all tested, and given the green light, Julio and I could sit back and watch the rest of it all magically happen! Alright maybe not. 

    After that we work to ensure all the text (in all the character sets and languages) fits in the spaces of the KSP UI - this happens alongside the translation, checks of text translations, more tweaks, further checks,... and that is a whole other story. 

    Here endeth the first article.We’ll try and bring these to you periodically on various topics of things we are working on or that we find might be good to shed more light on.
     


    User Feedback

    Recommended Comments



    18 hours ago, 7clem said:

    Though not quite about the WEIGHING of fonts this comment does mention fonts.

    Please Squad devs,

    1) level one : Make sure KSP font matche size with the fallback font (one that has all glyphs present) used whenever the glyph you haven't designed appears in translations .

    2) level max : make sure no glyph is missing for every font you use.

    French uses : é è à  ë ä ê â ç ï ï ö ô ù and É È À Ç Ï Î Ö Ô Ë Ê œ Œ And the game menu looked like excrements in 1.2 in a straight forward translation due to font problems. It was a problem in KSP1.2 patched to French.

    7clem, involved in translating KSP to French.

    From memory the fonts in the project are all scaled the same value, but will check it for you - have you got a good example I can use to reproduce?

    For 2) all the glyphs used in the the languages that are translated should be there yes, as we haven't done french yet that's obviously going to have some gaps in a stock game, but if you wanting to you could look at the modding information about how to add your own font . If/When french is added Im sure all the glyphs wil be available

    Link to comment
    Share on other sites



×
×
  • Create New...