Most common approach to round a non-integer coordinate for Italic Angle?

Michael Rafailyk
Posts: 190
Hello. I'm working on the plugin for Glyphs that highlights the segments that are not precise (or not closest) to Italic Angle, and proposes the coordinate where the angle will be precise (or closest to it). For a better understanding, here's a preview of how it works:

However, I have a dilemma on how to round the angle with decimal coordinates to the integer ones on the x axis (marked with the red color on the image below). Even with a good Italic Angle ratio, such a rounding cases usually happens in the middle bar of H or E, or in hyphen, etc.

My first implementation was to round to the closest coordinate (left side on the image above), so the angle could be greater or smaller (of precise) depending on which coordinate is closer. Then we talked with Tim Ahrens and he proposed to round down (to a coordinate with a smaller angle) if precise angle is impossible to fit (right side on the image above). By "rounding down" I mean to move the upper node to the left integer, or to move the lower node to the right integer, to have a smaller angle. Perhaps, Tim's approach makes a sense because, for a very short segments, a smaller angle will give less peaky shape. However I still have some doubts of what is best for everyone. So for now I implemented both approaches with an option to switch the rounding mode – to always round down, or to round to a closest coordinate.
The question is what the approach should be by default – round to a closest coordinate or round down. Please share your personal preference, if possible with a reasoning. Thanks in advance.

However, I have a dilemma on how to round the angle with decimal coordinates to the integer ones on the x axis (marked with the red color on the image below). Even with a good Italic Angle ratio, such a rounding cases usually happens in the middle bar of H or E, or in hyphen, etc.

My first implementation was to round to the closest coordinate (left side on the image above), so the angle could be greater or smaller (of precise) depending on which coordinate is closer. Then we talked with Tim Ahrens and he proposed to round down (to a coordinate with a smaller angle) if precise angle is impossible to fit (right side on the image above). By "rounding down" I mean to move the upper node to the left integer, or to move the lower node to the right integer, to have a smaller angle. Perhaps, Tim's approach makes a sense because, for a very short segments, a smaller angle will give less peaky shape. However I still have some doubts of what is best for everyone. So for now I implemented both approaches with an option to switch the rounding mode – to always round down, or to round to a closest coordinate.
The question is what the approach should be by default – round to a closest coordinate or round down. Please share your personal preference, if possible with a reasoning. Thanks in advance.
0
Comments
-
The kind of rounding for OpenType Variations - where you often end up with fractional values that need to be rounded - is specified in the OpenType Spec:round the result to the nearest integer (for fractional values of 0.5 and higher, take the next higher integer; for other fractional values, truncate).
So that's what variable fonts will do; I suggest that should be the default.1
Categories
- All Categories
- 46 Introductions
- 3.8K Typeface Design
- 475 Type Design Critiques
- 555 Type Design Software
- 1.1K Type Design Technique & Theory
- 640 Type Business
- 830 Font Technology
- 29 Punchcutting
- 507 Typography
- 120 Type Education
- 313 Type History
- 74 Type Resources
- 109 Lettering and Calligraphy
- 30 Lettering Critiques
- 79 Lettering Technique & Theory
- 529 Announcements
- 84 Events
- 110 Job Postings
- 165 Type Releases
- 169 Miscellaneous News
- 274 About TypeDrawers
- 54 TypeDrawers Announcements
- 118 Suggestions and Bug Reports