Difference between revisions of "Dmuse fonts"
(Created page with 'There are two sources for music fonts. The source directory /usr/local/apps/disp/fonts is used by the Dmuse resident utility "Display MuseData file(s) under the Graphics tab at …') |
|||
(One intermediate revision by the same user not shown) | |||
Line 25: | Line 25: | ||
If you look inside a typical "font" file, you will see a top line with | If you look inside a typical "font" file, you will see a top line with | ||
− | 13 numbers (fonthead), followed by a set of glyph descriptions, each starting | + | 13 numbers ([[Media:fonthead.html|fonthead]]), followed by a set of glyph descriptions, each starting |
− | with a parameter line (#) with six numbers (glyphead). The design of this data | + | with a parameter line (#) with six numbers ([[Media:glyphead.html|glyphead]]). The design of this data |
format dates back to the time when these files were used to load fonts | format dates back to the time when these files were used to load fonts | ||
into the LaserJet. The parameters are PLC-3 parameters. You can find | into the LaserJet. The parameters are PLC-3 parameters. You can find |
Latest revision as of 21:45, 18 June 2012
There are two sources for music fonts. The source directory /usr/local/apps/disp/fonts is used by the Dmuse resident utility "Display MuseData file(s) under the Graphics tab at the top of the screen. This application is not used very much, and is out-of-date. The source used for the zbex display engine is in /usr/local/apps/musprint/new; in the sub-libraries mfonts (music glyphs), beams (beam glyphs), ties, misc (wedges, brackets, extended fonts, etc.), and tms (times-roman characters).
There are three programs we run to compile these fonts into useful files. They are in /usr/local/apps/zprogs/apps.
(1) newloadx.z This program loads fonts into the Laser-Jet printer
(2) newmkfxx.z This program compiles the fonts into a binary file, newscrxx.fnt (same library), which is used by the display programs to construct the screen display.
(3) mkpostf.z This program builds a giant file of postscript dictionaries, one for each of the fonts. The dictionaries are stripped off and used as needed by the pspage.z program (compiles display output to a .ps file). The output of mkpostf.z is postdict, in the same library.
If you look inside a typical "font" file, you will see a top line with 13 numbers (fonthead), followed by a set of glyph descriptions, each starting with a parameter line (#) with six numbers (glyphead). The design of this data format dates back to the time when these files were used to load fonts into the LaserJet. The parameters are PLC-3 parameters. You can find a description of them in the two files in /usr/local/apps/musprint/fonts/doc.
The glyphs, themselves, are bitmaps. The "x" character is used to represent 1's (black) and blanks represent 0's. Other characters such as '.' are equivalent to 0's but are used to display in the font where staff lines are supposed to align. When positioning a glyph, there are two important numbers: (1) number of dots above the baseline, and (2) number of dots of empty space to the left of the glyph. In the case of text characters, the horizontal increment of the "cursor" after display is also important.
In the case of music glyphs, we also have to deal with a pre-process vertical shift. This also dates back to the early LaserJets. The file containing these numbers (measured in scale steps) is /usr/local/apps/musprint/new/mfonts/pos3.
Another thing: the MuseData format specifies text fonts starting with font 31 and going to font 48. Fonts 31-33 are "supposedly" 8 point (actually in notesize 14, this is close). Fonts 34-36 are 9 point; fonts 37-39 are 10 point, fonts 40-42 are 11 point, fonts 43-45 are 12 point, and fonts 46-48 are 14 point (all for notesize 14). For the different notesizes, the character fonts also scale up and down. In other words, they keep their same relative size (relative to the size of the notes). This way everything scales up and down with the notesize parameter.
In early implementations of the dmuse, different font sets existed for each note size. But then, at some point, a universal set of fonts was generated, and these use a mapping to say which universal font number (size) corresponded to a, say for example, font-41 in notesize 18. So font-41 in notesize 18 is a different universal font number from font-41 in notesize 6. The master list of fonts and the mapping to the different notesizes is contained in the file: /usr/local/apps/musprint/new/fontmap. We use the map also for choosing the correct beam fonts, wedge fonts, and bracket fonts.