[Q] [Beginner] About measures


Greetings, everyone.

As I'm relatively new in the typography world, i'm in need of help to understand some basic concepts about measures and, i guess, the methods some softwares use to display typefaces.

The tools i'm using are Inkscape and Fontforge.

To the problem.

I'm able to draw the characters in Inkscape and importing them successfully inside Fontforge to create fonts, that perfectly install, however, they are displayed "blurred" inside the softwares i tested them in. The problem arise because i'm trying to build what is commonly reffered to as a bitmap or pixel font, and, because i tested other fonts of the same style, i know they don't usually come with this behaviour. Is this related to the measures of the characters or to anti-alias?

I attached a project with four characters ( 8, A, g, i) 
http://s000.tinyupload.com/?file_id=53685718602435244159

Would anyone be gentle enough to provide an explanation?



Comments

  • Adam JagoszAdam Jagosz Posts: 689
    edited January 2019
    The font you created is an outline font. If you want to create a bitmap font, follow this tutorial https://fontforge.github.io/editexample8.html (or try).

  • K PeaseK Pease Posts: 182
    There's a whole process that has to do with the number of units in the em; I haven't bothered to remember it because there are free web tools to make pixel fonts.
    If there's something this can't do for you, like say you want to have kerning pairs, you can always import the result into Fontforge to make changes.
  • Thank you Adam. Thank you K.

    The reason I mention Inkscape and Fontforge is because I would like to use both: one to make, the other to build. I'm not only interested in the result but also in the process. ( I did use Fontstruct in the past for example )

    Another important thing to consider, is that the "bitmap" part of it was merely a pretext; infact, by using a bitmap tool would not solve my wanting to understand how measures works and the relation between the graphic I see inside Inkscape and the font displayed in programs like Notepad++ or Openoffice. If latter I woukd like to add curves to the squares, I simply could not do it by using those tools, so I should start all over again. 

    My intention was to draw objects with Inkscape and expecting to see them displayed in other programs in the same way; at least, to have one pt size where they actually have the same dimentions. By now, if i draw a square of 8px and assign it to a number,  it becomes blurred when typing, because its shape changes in something like 8.04px or 7.96px, eventually, ruining the decision of giving it a size of 8px. Obviously I don't mind for the selection of more sizes, I'm only trying to understand if there is a way to achieve the same result I draw inside Inkscape, by typing a letter.       
  • Adam JagoszAdam Jagosz Posts: 689
    edited January 2019
    First of all: FontForge is a much better tool to draw fonts than Inkscape. While you might be used to drawing in Inkscape, I find it very limiting and imprecise (unless you are using the built-in XML editor). You'd be better off using FF to draw your glyphs: you can use the arrow keys to move points by 1 unit or by 10 units with Shift held down. The coords of the selected point are displayed in the top bar.
    When you draw an 8px stroke in Inkscape, I think it forgets it was supposed to be 8px the moment you draw it. Pixel is not the default unit in SVG and the width is recalculated to mimic 8px. Ofc it isn't in FF either.
    I'd go for trial and error to get the stroke width you need. Though for sure there is a mathematical way to calculate it. First you need to decide what point size you're going for. Let's say you want your font to align to pixel grid at 8pt in a certain app. Put some test characters with vertical and horizontal stems of your desired width into a glyph. Then copy that into several other glyphs and change the widths (by 1 unit, 10 units, you name it). Then export the font, open up your app, and type the character. Note that depending on the app, there might be no guarantee the same glyph is always rendered the same in different positions. But I think some apps do render glyphs uniformly (MS Paint).
  • Kent LewKent Lew Posts: 905
    The relationship you are concerned with is essentially the units per em. The “em” is the virtual distance from the top (the defined “ascender”) to the bottom (the defined “descender”).
    When the font is rendered, that virtual distance is scaled to the nominal size of the rendering.
    So, if you are working in an environment of 1000 units per em, and you set the corresponding font at a size of 8px, then those 1000 units are being scaled down to 8 px. If you want discrete shapes that correspond exactly to a single pixel, then they need to be drawn to dimensions that are 1000/8, or 125 em unit increments.
    (This assumes that the environment is truly rendering a size of 8px with 8 pixels, of course.)
  • Adam JagoszAdam Jagosz Posts: 689
    edited January 2019
    Kent Lew said:
    (This assumes that the environment is truly rendering a size of 8px with 8 pixels, of course.)
    my wanting to understand how measures works and the relation between the graphic I see inside Inkscape and the font displayed in programs like Notepad++ or Openoffice.
    OpenOffice and Notepad++ use points (pt) as font size unit. So when you type something and set the size to 8 it is nothing like 8px. There might be environments where the size unit is pixel, but that is rare nowadays. One example is web browsers where there are many units available.
    One thing more: the other fonts you tested might not render blurry either because they have bitmap version (created as in the tutorial in my initial comment or similarly) or have been hinted.
Sign In or Register to comment.