1

I'm interested in creating a program capable of recognition of numbers, letters, symbols from an image. But first off, I went ahead and started to think about: How your system displays a letter?

There are so many fonts, font-sizes and other characteristics. I suppose there is an equation used to generate a letter with given parameters, is that true? Or are there other ways in which your system generates letters?

I found such a basic thing so interesting, and I can’t find any information on the web. Any ideas?

tshepang
  • 12,111
  • 21
  • 91
  • 136
Guillermo
  • 99
  • 1
  • 6

1 Answers1

2

Each character is universally assigned a code.

A font really is a mapping from a code (character) to glyph (instructions on how to draw the character).

A glyph is a collection of paths.

A path is a string that really is coded instructions on where/how to draw the various points, lines, and curves. A glyph has more than one path because some characters have holes (like R) and/or disjoint parts (like j). (So it's not an equation that describes how to draw characters.)

The OS and/or some programs know how to interpret the glyph data and translate that to pixels on the screen.

Mickael Caruso
  • 8,721
  • 11
  • 40
  • 72
  • Where may I find those glyphs ? In which language are they coded ? – Guillermo Dec 12 '12 at 04:04
  • Such a system can be written in any language that gives you the capability to draw on the screen. The glyphs - you actually build those yourself, tweaking the values until you see what you like. Then the hard part comes after - writing a program to read the glyph data and from that, draw characters. Check out [FontCreator](http://www.high-logic.com/font-editor/fontcreator.html). Download a trial version and collect ideas from it. – Mickael Caruso Dec 12 '12 at 04:16
  • Its also worth to say that there are multiple types of "instructions". What you described are true-type/vector fonts. But there are also pixel fonts that contains the glyphes directly as bitmap images and kerning-offsets. I suggest reading up on the different font-formats. – Riki Nov 26 '13 at 05:16