- All Categories
- 39 Introductions
- 3.6K Typeface Design
- 764 Font Technology
- 1K Technique and Theory
- 587 Type Business
- 435 Type Design Critiques
- 526 Type Design Software
- 30 Punchcutting
- 132 Lettering and Calligraphy
- 79 Technique and Theory
- 53 Lettering Critiques
- 461 Typography
- 289 History of Typography
- 111 Education
- 61 Resources
- 479 Announcements
- 74 Events
- 104 Job Postings
- 147 Type Releases
- 153 Miscellaneous News
- 259 About TypeDrawers
- 52 TypeDrawers Announcements
- 109 Suggestions and Bug Reports

pthomas505
Posts: **54**

Is there a method in TrueType hinting to round a point to the grid along one axis, and then shift another point by the same amount, but along a different axis?

I am attempting to shift a diagonal line such that it remains at a 45 degree angle, but has both its endpoints rounded to the nearest intersections of the raster grid lines. I have managed to get the top point in the attached picture rounded to the grid in the vertical direction, and the bottom left point shifted in the vertical direction to match, and to get the bottom left point rounded to the grid in the horizontal direction, and the top point shifted in the horizontal direction to match, using this xgridfit code:

<with-round-state round="to-grid">

<with-vectors axis="x">

<move>

<point num="1"/>

<shift><point num="2"/></shift>

</move>

</with-vectors>

<with-vectors axis="y">

<move>

<point num="2"/>

<shift><point num="1"/></shift>

</move>

</with-vectors>

</with-round-state>

Point 1 is the point in the bottom left of the picture. Point 2 is the point at the top of the picture. The line connecting them is the one I am trying to keep at 45 degrees.

The next step is to round the top point in the horizontal direction, and
move the bottom point in the vertical direction the same amount to
compensate and keep the angle of the line at 45 degrees.

Thank you for your time,

Patrick

Tagged:

0

## Comments

545454I note that the width of a diagonal line at 45 degrees can be any half integer multiple of sqrt(2) that is greater than or equal to sqrt(2). For example, the line on the left in the attached picture has a width of sqrt(2) and the line on the right in the attached picture has a width of 1.5 * sqrt(2).

542,746And other than dropout control being on/off, there is no notion of pixels being on: all you do is control distances between specified points (typically on-curve points, but they can be off-curve). You can move specified points either before or after you interpolate untouched points (IUP) for all other points. For most big effects and regularization, you are doing “before” hints. For fine tuning of a curve or diagonal, it might be after.

5418054545423754237180