lilypond-auto
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lilypond-auto] [LilyIssues-auto] [testlilyissues:issues] #5806 Tweak mf


From: Auto mailings of changes to Lily Issues via Testlilyissues-auto
Subject: [Lilypond-auto] [LilyIssues-auto] [testlilyissues:issues] #5806 Tweak mf files to avoid FontForge internal overlap error
Date: Sat, 29 Feb 2020 09:12:52 -0000

Diff:

--- old
+++ new
@@ -1,6 +1,7 @@
+[https://codereview.appspot.com/571780043](https://codereview.appspot.com/571780043)
 #Overlapping mf paths
 In some cases, overlapping mf paths will cause errors in FontForge processing, even if the resulting glyphs seem to be OK.
-Currently, we have **142 error messages** being produced during make, which is quite annoying..
+Currently, we have **352 error messages** being produced during make, which is quite annoying..
 Please find the corresponding log extract attached.

 **Remedy:**  Slightly adapt mf code (where needed), keeping the resulting glyph outline unchanged, but avoid problematic  crossing angles for FontForge.
@@ -22,6 +23,8 @@

 #####feta-arrowheads.mf -> Internal Error (overlap) in arrowheads.*
 * macro **set_arrow_path**: now one single outline.  Fixes glyphs **open.01, open.0M1, open.11, open.1M1**
+#####feta-numbers.mf -> Internal Error (overlap) in two, seven
+* Character defintions "two" and "seven" chnged.  Fixes glyphs **two, seven**
 ##### feta-scripts.mf -> Internal Error (overlap) in scripts.*
 * macro **draw_turn**: "ploops" removed, now one single outline.  Fixes glyphs **reverseturn, turn, slashturn**
 *  char def **"segno"**: similar case as in draw_turn. Fixes glyph **segno**
@@ -32,6 +35,11 @@
 * macro **draw_tab_B**:  Starting angle of one stroke in lower handwriting style "B" of "TAB" slightly changed (invisible difference).  Fixes glyph **tab**
 ##### feta-braces.mf -> Internal Error (overlap) in brace*
 * macro **draw_brace**:  Even simplified a bit and now drawing one single outline without any overlaps.
+##### parmesan-clefs.mf -> Internal Error (overlap) in clefs.*
+* macro **draw_neomensural_c_clef**:  Fixes glyphs **neomensural.c, neomensural.c_change**
+* macro **draw_petrucci_c_clef**:  Fixes glyphs **petrucci.c1, c2, c2_change, c3, c3_change, c4, c5, c5_change**
+##### parmesan-rests.mf -> Internal Error (overlap) in rests.*
+* char def "2neomensural" changed:  Fixes glyph **rests.2neomensural**

 #### Examle: two overlaping outline -> single outline

Diff:

--- old
+++ new
@@ -1 +1,2 @@
 feta-braces-a.pfb (24.8 kB; application/x-font-type1)
+internal-error-overlap-log.txt (41.5 kB; text/plain)

[issues:#5806] Tweak mf files to avoid FontForge internal overlap error

Status: Started
Created: Fri Feb 28, 2020 07:57 PM UTC by Torsten Hämmerle
Last Updated: Sat Feb 29, 2020 09:01 AM UTC
Owner: Torsten Hämmerle
Attachments:

https://codereview.appspot.com/571780043

Overlapping mf paths

In some cases, overlapping mf paths will cause errors in FontForge processing, even if the resulting glyphs seem to be OK.
Currently, we have 352 error messages being produced during make, which is quite annoying..
Please find the corresponding log extract attached.

Remedy: Slightly adapt mf code (where needed), keeping the resulting glyph outline unchanged, but avoid problematic crossing angles for FontForge.
slight path adaptions inside overlapping areas (not affecting the resulting glyph outline at all!)
In some cases (braces, arowheads, segno/turns) now using one single outline rather than combinng two overlapping ones (with the exact same result).

FontForge issue

This has been a pain in the neck for many years now, but it doesn't seem to be easy to fix in FontForge, though. Werner has created a (FontForge) issue: https://github.com/fontforge/fontforge/issues/4184.

Nevertheless, it'd probably be a good idea to make our mf files a bit easier to handle.

Changes to mf files

The mf files have only been changed where needed, using all the original mf control points and directions, keeping the resulting character outline unaltered.
I'll attach PFB files of feta11.pfb and feta.braces-a.pfb so that Werner (and others, of course) can have a look at the final FontForge output.

Overview: Internal Error (overlap) in [...]

The errors are being caused by just a few glyphs in just a couple of mf files. Most of the time, there fixing one macro will fix all the glyphs using that macro.

feta-arrowheads.mf -> Internal Error (overlap) in arrowheads.*
feta-numbers.mf -> Internal Error (overlap) in two, seven
feta-scripts.mf -> Internal Error (overlap) in scripts.*
feta-timesignatures.mf -> Internal Error (overlap) in timesig.*
feta-clefs.mf -> Internal Error (overlap) in clefs.*
feta-braces.mf -> Internal Error (overlap) in brace*
parmesan-clefs.mf -> Internal Error (overlap) in clefs.*
parmesan-rests.mf -> Internal Error (overlap) in rests.*

Examle: two overlaping outline -> single outline

In many symmetric cases, such as arrowheads braces, the glyphs had been constructed by separately drawing half and a mirrored version of itself, thus creating an overlap that might be problematic for FontForge.

Original mf code (with overlap)

   fill path;
   fill path yscaled -1;

New mf code (one single outline)
After determining the intersection point and using the appropriate subpath only, we are able to draw one single cyclic outine by joining one half part and its reversed/mirrored counterpart:
Using subpaths helps keeping the exact original control points and slopes, thus keeping the resulting glyph exactly identical to the original glyph..

   fill path
      .. reverse path yscaled -1
      .. cycle;

Sent from sourceforge.net because address@hidden is subscribed to https://sourceforge.net/p/testlilyissues/issues/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/testlilyissues/admin/issues/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

_______________________________________________
Testlilyissues-auto mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/testlilyissues-auto

reply via email to

[Prev in Thread] Current Thread [Next in Thread]