The Mudcat Café TM
Thread #52506 Message #1209664
Posted By: pavane
18-Jun-04 - 02:14 AM
Thread Name: Tech: Creating New Fonts - Advice Please
Subject: RE: Tech: Creating New Fonts - Advice Please
John, The positioning problem could possibly be overcome using the method I have adopted in Harmony (Next version).
I work using the centre of the character for positioning, which means deducting half the width of the character from the X position where you want the centre of the printed character.
The width of a character at the current font size can be obtained from a Windows function (at least in VB)
For vertical positioning, I have built a table which specifies where the alignment point occurs in the font character. For example, a treble clef should be aligned so that the central point of the circle is on the G line of the staff (cos that's what the treble clef sign is - a big G)
This occurs at about 65% down from the top. So then I work back to where I want the top to be (Y position) based on the current scaling factor.
The result is that the new score in HARMONY 3.3.0 (Not yet available) is almost identical in positioning to the old version which used to draw the characters directly. (I have left the old version as an option in the program in case the font doesn't install correctly.)