{"id":15113,"date":"2026-11-18T10:19:31","date_gmt":"2026-11-18T09:19:31","guid":{"rendered":"https:\/\/norfont.com\/en\/?p=15113"},"modified":"2026-11-19T21:19:22","modified_gmt":"2026-11-19T20:19:22","slug":"how-to-place-smufl-anchors-from-bezier-geometry-to-accurate-music-engraving","status":"publish","type":"post","link":"https:\/\/norfont.com\/en\/how-to-place-smufl-anchors-from-bezier-geometry-to-accurate-music-engraving\/","title":{"rendered":"How to Place SMuFL Anchors: From B\u00e9zier Geometry to Accurate Music Engraving"},"content":{"rendered":"<style>body.single-post.postid-15113 img.entry-content-featured-img{display:none!important}<\/style>\n<p><em>Inside the NorFonts workflow for calculating, positioning, and verifying music font attachment points in FontLab 8 and 9.<\/em><\/p>\n<p>Designing a music font involves far more than drawing attractive notation symbols. A notehead may look perfectly balanced, yet still produce incorrect results when connected to stems, beams, or other notation elements. One of the most important, and often overlooked, aspects of developing a SMuFL music font is therefore the placement of attachment anchors. These small, invisible reference points play a fundamental role in determining how musical symbols interact when rendered in notation software.<\/p>\n<p>Over the years, while developing NorFonts music fonts, I have spent considerable time refining the relationship between glyph outlines, stem connections, and SMuFL metadata. What initially appeared to be a relatively simple task\u2014finding suitable points on the left and right sides of a notehead\u2014gradually developed into a much more demanding geometric problem. The real challenge is not merely to place an anchor somewhere on a glyph&#8217;s outline, but to identify a precise location that makes both mathematical and musical sense. This article describes the approach I developed for the NorFonts SMuFL workflow, combining B\u00e9zier geometry, reference-guided positioning, native FontLab verification, and automated JSON metadata generation.<\/p>\n<h2>1. Understanding What a SMuFL Anchor Represents<\/h2>\n<p>In a SMuFL music font, anchors specify where other notation elements should connect to a glyph. For a conventional notehead, the two most familiar attachment points are <code>stemDownNW<\/code>, which identifies the connection for a downward-pointing stem on the left side, and <code>stemUpSE<\/code>, which identifies the connection for an upward-pointing stem on the right side. Although their names contain directional references, these should not be interpreted simply as instructions to select the northwestern or southeastern extremity of the notehead. The anchor names refer to the geometry of the attaching stems, and their precise positions depend on the intended engraving behavior.<\/p>\n<p>Some noteheads also require four additional attachment points known as split-stem anchors. These are used for specialized stem connections, particularly in altered unisons and other notation situations involving separate stems. The anchors <code>splitStemUpSW<\/code> and <code>splitStemDownNE<\/code> describe one pair of angled connections, while <code>splitStemUpSE<\/code> and <code>splitStemDownNW<\/code> provide alternative attachment positions. Unlike the two regular stem anchors, these additional points often require a more elaborate geometric construction because they must accommodate specific engraving arrangements without disrupting the visual balance of the notehead.<\/p>\n<p>All these coordinates are stored in the <code>glyphsWithAnchors<\/code> section of the font&#8217;s SMuFL metadata, expressed in staff spaces relative to the glyph&#8217;s origin. For a music font using 1,000 units per em and a staff-space height of 250 font units, a coordinate measured in FontLab can be converted into staff spaces by dividing it by 250. This conversion is straightforward, but it only addresses the numerical representation of the anchor. Determining where that anchor should actually be placed remains the more important and difficult part of the process.<\/p>\n<h2>2. Why Don&#8217;t Simply Use the Glyph&#8217;s Bounding Box<\/h2>\n<p>The simplest possible approach to automatic anchor placement would be to calculate the bounding box of a notehead, identify its leftmost and rightmost coordinates, and place the regular stem anchors at those extremes. For a conventional slanted oval notehead, this method can provide a reasonable approximation. However, its limitations become obvious when applied to the much greater variety of notehead shapes found in a comprehensive SMuFL font.<\/p>\n<p>Consider an X-shaped notehead, whose leftmost outline location may occur at either the upper-left or lower-left extremity. Both positions can have exactly the same horizontal coordinate, yet only one corresponds to the intended attachment of a downward-pointing stem. A similar ambiguity occurs with square noteheads, where an entire vertical edge may share the same minimum or maximum horizontal coordinate. Cluster noteheads, slash symbols, circled noteheads, triangles, diamonds, and decorative noteheads introduce still more complicated situations in which the outermost point is not necessarily the correct attachment location.<\/p>\n<p>This led me to an important realization: <strong>geometric extremity and musical attachment are not the same thing<\/strong>. A point may be mathematically valid, accurately calculated, and located directly on a glyph&#8217;s contour, yet still be inappropriate for connecting a stem. The problem is therefore not simply one of finding extrema, but of identifying which geometric candidate corresponds to the intended musical construction. This distinction eventually became one of the guiding principles of my anchor-generation workflow.<\/p>\n<figure class=\"nf-smufl-figure nf-smufl-example-complete\" style=\"display: block; width: 100%; max-width: 760px; margin: 1.6rem auto; text-align: center;\">\n<div class=\"nf-smufl-example1-comparison\" style=\"display:flex;gap:18px;flex-wrap:wrap;align-items:stretch;justify-content:center;margin:1rem auto 1.2rem;\">\n<div style=\"display:flex;flex-direction:column;flex:1 1 295px;max-width:365px;min-width:0;\">\n<a href=\"https:\/\/norfont.com\/en\/wp-content\/uploads\/2026\/11\/cleanshot-2026-11-19-at-18-6a3d71cb.png\" target=\"_blank\" rel=\"noopener\" style=\"display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:14\/15;line-height:0;background:#fff;border-radius:8px;overflow:hidden;\"><img decoding=\"async\" src=\"https:\/\/norfont.com\/en\/wp-content\/uploads\/2026\/11\/cleanshot-2026-11-19-at-18-6a3d71cb.png\" alt=\"FontLab oval notehead uniE0A4: B\u00e9zier outlines, bounding box, and left and right stem attachment markers\" loading=\"lazy\" style=\"display:block;width:100%;height:100%;object-fit:contain;object-position:center;border-radius:8px;\" \/><\/a><\/p>\n<div style=\"font-size:.84rem;line-height:1.45;margin:0;text-align:center;\"><strong>A \u2014 Conventional Oval Notehead<\/strong><br \/>Stem attachment locations on the curved outline.<\/div>\n<\/div>\n<div style=\"display:flex;flex-direction:column;flex:1 1 295px;max-width:365px;min-width:0;\">\n<a href=\"https:\/\/norfont.com\/en\/wp-content\/uploads\/2026\/11\/fontlab-x-notehead-bbox-transparent-1c951016.png\" target=\"_blank\" rel=\"noopener\" style=\"display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:14\/15;line-height:0;background:#fff;border-radius:8px;overflow:hidden;\"><img decoding=\"async\" src=\"https:\/\/norfont.com\/en\/wp-content\/uploads\/2026\/11\/fontlab-x-notehead-bbox-transparent-1c951016.png\" alt=\"FontLab X-shaped notehead uniE0A9 with dashed bounding box aligned with xMin, xMax, top and bottom outer-contour extrema\" loading=\"lazy\" style=\"display:block;width:100%;height:100%;object-fit:contain;object-position:center;border-radius:8px;\" \/><\/a><\/p>\n<div style=\"font-size:.84rem;line-height:1.45;margin:0;text-align:center;\"><strong>B \u2014 X-Shaped Notehead<\/strong><br \/>The bounding box and candidate contour extrema.<\/div>\n<\/div>\n<\/div><figcaption style=\"font-size: .84rem; line-height: 1.5; text-align: center; margin: .65rem auto 0;\"><strong>[Example 1] \u2014 Bounding-Box Extremes Versus Correct Stem Attachments.<\/strong> (A) A conventional oval notehead in FontLab, with its bounding box and two stem-connection locations. (B) An X-shaped notehead, with a dashed bounding box aligned to its outer contour extrema. The marked <code>xMin<\/code> and <code>xMax<\/code> candidates do not, by themselves, determine the correct <code>stemDownNW<\/code> and <code>stemUpSE<\/code> locations: stem direction, contour shape, and connection geometry must also be considered. <em>Editorial note: the left-hand callout in panel A should read <code>stemDownNW<\/code>, not <code>stemUpSE<\/code>.<\/em> Click either image to inspect the FontLab geometry at full size.<\/figcaption><\/figure>\n<h2>3. Reading the Actual B\u00e9zier Outlines<\/h2>\n<p>Rather than relying exclusively on bounding boxes, I calculate attachment positions from the glyph&#8217;s actual B\u00e9zier outlines. In FontLab, these outlines are composed of straight segments and curves, with cubic B\u00e9zier segments defined by two endpoints and two control points. The control points determine the curvature between the endpoints, allowing complex notehead shapes to be described mathematically. My workflow reads the native outlines from FontLab and reconstructs their geometry for analysis, rather than treating the glyph as a flattened image.<\/p>\n<p>The process involves examining exterior contours, identifying relevant horizontal and vertical extrema, and calculating intersections between selected geometric axes and the outline. An important part of this analysis is distinguishing the exterior boundary from interior counter contours. In a hollow half notehead, for example, the white interior must not be mistaken for the outside edge, since an anchor intended to connect a stem to the exterior should not accidentally be positioned on the inner boundary. The algorithm also accommodates multiple exterior contours when their geometry can be interpreted reliably. If a contour cannot be read or verified with sufficient confidence, I prefer to exclude that glyph from automatic placement rather than generate a potentially misleading attachment point.<\/p>\n<p>One of the most useful aspects of this method is its ability to calculate exact intersections with B\u00e9zier curves. Instead of relying on raster pixels, visual snapping, or approximate bounding-box coordinates, the script solves for the points at which a selected horizontal or vertical axis intersects the actual cubic segments. These intersections produce mathematically defined candidates that can be evaluated for stem placement. This approach provides a much more reliable geometric foundation than estimating positions visually, although it does not, by itself, determine whether a particular intersection is musically appropriate.<\/p>\n<figure class=\"nf-smufl-figure nf-smufl-example-complete\" style=\"display:block;width:100%;max-width:940px;margin:1.6rem auto;text-align:center;\">\n<div class=\"nf-smufl-example2-comparison\" style=\"display:flex;flex-wrap:wrap;gap:12px;align-items:stretch;justify-content:center;margin:0 auto .6rem;\">\n<div style=\"display:flex;flex-direction:column;flex:1 1 220px;max-width:310px;min-width:0;\">\n<a href=\"https:\/\/norfont.com\/en\/wp-content\/uploads\/2026\/11\/norfonts-example2-annotated-original-fontlab-4dccd3c0.png\" target=\"_blank\" rel=\"noopener\" style=\"display:flex;align-items:center;justify-content:center;height:260px;width:100%;line-height:0;background:transparent;overflow:hidden;\"><img decoding=\"async\" src=\"https:\/\/norfont.com\/en\/wp-content\/uploads\/2026\/11\/norfonts-example2-annotated-original-fontlab-4dccd3c0.png\" loading=\"lazy\" alt=\"FontLab half-notehead with an illustrative horizontal B\u00e9zier intersection axis and provisional exterior contour candidates\" style=\"display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;background:transparent;box-shadow:none;\" \/><\/a><\/p>\n<div style=\"font-size:.84rem;line-height:1.45;margin:0;text-align:center;\"><strong>A \u2014 Preliminary B\u00e9zier Candidates<\/strong><br \/>Schematic horizontal axis and provisional exterior-contour intersections.<\/div>\n<\/div>\n<div style=\"display:flex;flex-direction:column;flex:1 1 220px;max-width:310px;min-width:0;\">\n<a href=\"https:\/\/norfont.com\/en\/wp-content\/uploads\/2026\/11\/image-20261119-200514-3dba755f.png\" target=\"_blank\" rel=\"noopener\" style=\"display:flex;align-items:center;justify-content:center;height:260px;width:100%;line-height:0;background:transparent;overflow:hidden;\"><img decoding=\"async\" src=\"https:\/\/norfont.com\/en\/wp-content\/uploads\/2026\/11\/image-20261119-200514-3dba755f.png\" loading=\"lazy\" alt=\"FontLab half-notehead showing regular and split-stem anchors with names and coordinates in Anchors and Pins panel after running the Python script\" style=\"display:block;width:213px;max-width:100%;max-height:100%;height:auto;object-fit:contain;background:transparent;box-shadow:none;\" \/><\/a><\/p>\n<div style=\"font-size:.84rem;line-height:1.45;margin:0;text-align:center;\"><strong>B \u2014 Final Anchors After the Python Script<\/strong><br \/>Regular and split-stem anchor positions and coordinates.<\/div>\n<\/div>\n<div style=\"display:flex;flex-direction:column;flex:1 1 220px;max-width:310px;min-width:0;\">\n<a href=\"https:\/\/norfont.com\/en\/wp-content\/uploads\/2026\/11\/cleanshot-2026-11-19-at-20-54b5deaf.png\" target=\"_blank\" rel=\"noopener\" style=\"display:flex;align-items:center;justify-content:center;height:260px;width:100%;line-height:0;background:transparent;overflow:hidden;\"><img decoding=\"async\" src=\"https:\/\/norfont.com\/en\/wp-content\/uploads\/2026\/11\/cleanshot-2026-11-19-at-20-54b5deaf.png\" loading=\"lazy\" alt=\"Original FontLab half-notehead screenshot showing oblique guide lines passing through split-stem anchors and their endpoints\" style=\"display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;background:transparent;box-shadow:none;\" \/><\/a><\/p>\n<div style=\"font-size:.84rem;line-height:1.45;margin:0;text-align:center;\"><strong>C \u2014 Oblique Anchor Guides<\/strong><br \/>Guide lines illustrating the final split-stem relationships.<\/div>\n<\/div>\n<\/div><figcaption style=\"font-size:.84rem;line-height:1.5;text-align:center;margin:.65rem auto 0;\"><strong>[Example 2] \u2014 Locating Anchor Candidates on B\u00e9zier Curves.<\/strong> (A) A schematic candidate-detection step, where a horizontal reference axis intersects the half notehead\u2019s exterior B\u00e9zier outline at two provisional points. (B) The same glyph in FontLab after running the Python script, showing regular and split-stem anchor names and coordinates. (C) A closer view of the oblique guide lines connecting the split-stem attachment positions. These oblique guides belong to the final stem-attachment construction and are not continuations of the illustrative horizontal axis in A. The three views distinguish preliminary B\u00e9zier intersection candidates, script-generated anchor placement, and the geometry of the resulting split-stem arrangement. The axis and candidate labels in A are schematic, not measured FontLab coordinates. Click any image to inspect it at full size.<\/figcaption><\/figure>\n<h2>4. Learning from Bravura Without Copying Its Coordinates<\/h2>\n<p>An important improvement in my workflow was the introduction of reference-guided anchor placement using the official Bravura SMuFL metadata. Bravura provides an extensive collection of established attachment positions for different kinds of notation symbols, making it a particularly useful reference when examining how regular and unconventional noteheads are expected to connect to stems. However, using Bravura as a reference does not mean copying its coordinates directly into another font.<\/p>\n<p>Each music font has its own visual characteristics, proportions, widths, and outline constructions. A coordinate that works perfectly for Bravura may be completely inappropriate for Vintage BH, The Arranger, or another NorFonts design. Instead of transferring absolute coordinates, I examine the relative positions of Bravura&#8217;s anchors within the reference glyph&#8217;s bounding box. These relationships help the algorithm determine the intended attachment region in the target glyph, after which it searches for suitable locations on that glyph&#8217;s own B\u00e9zier contours. In other words, <strong>Bravura provides guidance about where an anchor is intended to be, while the NorFonts font supplies the actual geometry<\/strong>.<\/p>\n<p>X-shaped noteheads provide a particularly useful illustration. For an ordinary X-shaped notehead, the downward stem should connect toward the lower-left extremity, while the upward stem should connect toward the upper-right extremity. A simple leftmost\/rightmost calculation can easily select the upper-left tip for <code>stemDownNW<\/code>, producing a geometrically valid but musically incorrect result. By examining the reference metadata, the algorithm can distinguish the intended vertical orientation and select an appropriate contact point on the target outline.<\/p>\n<p>The same rule, however, cannot be applied indiscriminately to every glyph containing an X. Circled-X noteheads, for example, generally use more centrally positioned attachment points and require a different geometric interpretation. Other unconventional noteheads may also have deliberately distinctive stem connections. This is why my workflow uses glyph-specific reference guidance rather than imposing a universal attachment rule based solely on the apparent shape of the symbol.<\/p>\n<figure class=\"nf-smufl-figure nf-smufl-example-placeholder\" style=\"display: block; width: 100%; max-width: 760px; margin: 1.6rem auto; text-align: center;\">\n<div style=\"box-sizing: border-box; width: 100%; min-height: 220px; display: flex; align-items: center; justify-content: center; border: 1px dashed #b8bec6; border-radius: 8px; background: #f6f7f9; color: #6b7280; font-size: .93rem;\" role=\"img\" aria-label=\"Placeholder for Example 3: Bravura-Guided Positioning on a Custom Notehead\">Illustration under preparation&#8230;<\/div><figcaption style=\"font-size: .84rem; line-height: 1.5; text-align: center; margin: .65rem auto 0;\"><strong>[Example 3] \u2014 Bravura-Guided Positioning on a Custom Notehead.<\/strong> Place the reference notehead alongside a NorFonts design to compare relative anchor regions, without transferring Bravura\u2019s absolute coordinates.<\/figcaption><\/figure>\n<h2>5. Calculating the Split-Stem Anchors<\/h2>\n<p>The four split-stem anchors introduce an additional level of geometric complexity. For conventional slanted noteheads, I developed a construction based on four important extrema: the leftmost point, represented by L; the rightmost point, represented by R; the topmost point, represented by T; and the bottommost point, represented by B. These points provide a geometric framework from which the regular stem positions and additional attachment regions can be analyzed. Where appropriate, Bravura-derived guidance is also used to resolve ambiguities between possible contour intersections.<\/p>\n<p>For the central split-stem pair, the algorithm constructs an oblique axis derived from the directions established by the notehead&#8217;s extrema. This axis passes through the midpoint between the leftmost and rightmost positions and is used to identify suitable intersections with the exterior contour. Those intersections provide candidate positions for <code>splitStemUpSW<\/code> and <code>splitStemDownNE<\/code>. The remaining anchors, <code>splitStemUpSE<\/code> and <code>splitStemDownNW<\/code>, are calculated using selected horizontal levels near the upper-right and lower-left portions of the notehead, with their positions likewise determined from actual intersections with the outline.<\/p>\n<p>These constructions are primarily intended for conventional notehead geometry and cannot automatically accommodate every possible decorative or unconventional shape. A highly irregular handwritten notehead, for example, may require additional interpretation to identify a visually appropriate connection. Nevertheless, the method provides a systematic way to derive split-stem positions from the geometry of the target font, rather than relying on arbitrary coordinates or copying values from a different design.<\/p>\n<figure class=\"nf-smufl-figure nf-smufl-example-placeholder\" style=\"display: block; width: 100%; max-width: 760px; margin: 1.6rem auto; text-align: center;\">\n<div style=\"box-sizing: border-box; width: 100%; min-height: 220px; display: flex; align-items: center; justify-content: center; border: 1px dashed #b8bec6; border-radius: 8px; background: #f6f7f9; color: #6b7280; font-size: .93rem;\" role=\"img\" aria-label=\"Placeholder for Example 4: Constructing the Four Split-Stem Anchors\">Illustration under preparation&#8230;<\/div><figcaption style=\"font-size: .84rem; line-height: 1.5; text-align: center; margin: .65rem auto 0;\"><strong>[Example 4] \u2014 Constructing the Four Split-Stem Anchors.<\/strong> Show the left, right, top, and bottom extrema, the oblique construction axis, and the four proposed split-stem attachment points.<\/figcaption><\/figure>\n<h2>6. Geometric Accuracy Must Be Verified in FontLab<\/h2>\n<p>One of the most important lessons I learned while developing the NorFonts scripts is that calculating an exact geometric point does not guarantee that FontLab will store it unchanged. Depending on the font&#8217;s coordinate-precision settings, FontLab may round fractional values when an anchor is created or modified. For example, an anchor calculated at <code>(63.863, 83.714)<\/code> font units might be stored at <code>(64, 84)<\/code> if coordinate rounding is enabled. Although the numerical difference may appear negligible, the rounded point is no longer guaranteed to lie exactly on the intended B\u00e9zier curve.<\/p>\n<p>To address this problem, I introduced native anchor readback verification. After calculating and installing an anchor, the script retrieves its actual stored coordinates from FontLab and checks whether they remain sufficiently close to the intended position on the original outline. If the coordinates have changed beyond the permitted geometric tolerance, the placement is rejected rather than silently accepted. This distinction matters because the objective is not simply to calculate precise coordinates in Python, but to preserve those coordinates in the actual font project from which the final SMuFL metadata will be exported.<\/p>\n<p>During development, I repeatedly encountered a particularly frustrating issue: forgetting to disable the <strong>Round coordinates<\/strong> option in FontLab. After several interrupted test runs, I decided that the script should no longer depend entirely on my memory. The current NorFonts workflow therefore includes an automatic coordinate-precision preflight that checks whether FontLab can preserve fractional anchor values before production anchors are installed. The test temporarily creates an anchor at deliberately fractional coordinates, reads back the stored values, and removes the test anchor. If the fractional coordinates are preserved, the workflow can continue; if rounding is detected, or if the test cannot be completed safely, the operation stops before applying the production anchors.<\/p>\n<p>The corresponding setting is located under <strong>Font Info \u2192 Family Dimensions \u2192 Round coordinates<\/strong> and must be disabled when exact fractional anchor placement is required. What initially seemed like a minor inconvenience eventually led to one of the most practical safeguards in the entire workflow. It also reinforced the importance of testing the actual behavior of FontLab rather than assuming that the application will preserve every coordinate exactly as calculated.<\/p>\n<figure class=\"nf-smufl-figure nf-smufl-example-placeholder\" style=\"display: block; width: 100%; max-width: 760px; margin: 1.6rem auto; text-align: center;\">\n<div style=\"box-sizing: border-box; width: 100%; min-height: 220px; display: flex; align-items: center; justify-content: center; border: 1px dashed #b8bec6; border-radius: 8px; background: #f6f7f9; color: #6b7280; font-size: .93rem;\" role=\"img\" aria-label=\"Placeholder for Example 5: Verifying Anchor Precision in FontLab\">Illustration under preparation&#8230;<\/div><figcaption style=\"font-size: .84rem; line-height: 1.5; text-align: center; margin: .65rem auto 0;\"><strong>[Example 5] \u2014 Verifying Anchor Precision in FontLab.<\/strong> Compare the calculated anchor coordinates with the coordinates read back from FontLab, highlighting how rounding can affect placement.<\/figcaption><\/figure>\n<h2>7. Preview First, Apply Second<\/h2>\n<p>Another principle I follow is to separate geometric evaluation from actual modification of the font. My NorFonts SMuFL All-in-One workflow begins by generating a preview of the proposed attachment positions, allowing me to inspect the selected contours, calculated anchors, and overall geometric construction before relying on the results in a finished font. These previews are particularly valuable for unusual notehead shapes, where a mathematically correct point may still deserve closer visual examination.<\/p>\n<p>In the combined workflow, the script proceeds from the preview stage to APPLY, where eligible native FontLab anchors are created or updated and their stored positions are verified. By default, anchors that already exist are preserved. This behavior is important because a font may contain attachment points that were deliberately adjusted by hand, and automatic generation should not casually overwrite those decisions. Once the eligible changes have been applied successfully, the affected glyphs are marked red in FontLab so they can be identified easily in the font window.<\/p>\n<p>The workflow also produces diagnostic reports documenting successful anchor installations, skipped glyphs, verification failures, and other relevant processing information. I consider these reports an essential part of the development process because they establish what the script actually accomplished, rather than merely indicating what it intended to do. A successful preview is useful, but a successful native installation and verification are what ultimately matter when preparing the font for export.<\/p>\n<figure class=\"nf-smufl-figure nf-smufl-example-placeholder\" style=\"display: block; width: 100%; max-width: 760px; margin: 1.6rem auto; text-align: center;\">\n<div style=\"box-sizing: border-box; width: 100%; min-height: 220px; display: flex; align-items: center; justify-content: center; border: 1px dashed #b8bec6; border-radius: 8px; background: #f6f7f9; color: #6b7280; font-size: .93rem;\" role=\"img\" aria-label=\"Placeholder for Example 6: Previewing and Applying Calculated Anchors\">Illustration under preparation&#8230;<\/div><figcaption style=\"font-size: .84rem; line-height: 1.5; text-align: center; margin: .65rem auto 0;\"><strong>[Example 6] \u2014 Previewing and Applying Calculated Anchors.<\/strong> Illustrate the preview of proposed anchor positions before modification and the corresponding anchors after they have been installed in FontLab.<\/figcaption><\/figure>\n<h2>8. Converting Native Anchors to SMuFL JSON<\/h2>\n<p>Once the native FontLab anchors have been installed and verified, their coordinates are converted into SMuFL metadata. The final export uses the positions actually stored in FontLab rather than relying exclusively on the original geometric proposals. This ensures that the JSON reflects the font&#8217;s current native anchor state, including any manually preserved attachments.<\/p>\n<p>In my workflow, the anchor coordinates are exported to three decimal places in staff spaces. It is important to distinguish this export precision from the internal precision used during geometric calculations. The native FontLab anchors retain their fractional coordinates, while rounding to three decimal places is performed when the data is serialized into JSON. This provides a consistent numerical representation without unnecessarily reducing the accuracy of the native font project.<\/p>\n<p>For example, an exported <code>noteheadBlack<\/code> record from The Arranger contains <code>stemDownNW<\/code> at <code>(0.002, -0.188)<\/code> and <code>stemUpSE<\/code> at <code>(1.324, 0.188)<\/code>. Its additional split-stem anchors are recorded as <code>splitStemUpSW<\/code> at <code>(0.327, 0.405)<\/code>, <code>splitStemDownNE<\/code> at <code>(1.029, -0.390)<\/code>, <code>splitStemUpSE<\/code> at <code>(1.250, 0.411)<\/code>, and <code>splitStemDownNW<\/code> at <code>(0.054, -0.390)<\/code>. These numbers belong to that particular font design and should not be treated as universal coordinates for other music fonts.<\/p>\n<p>The exporter also retrieves the family name from FontLab&#8217;s Font Info fields and uses it to generate the final filename automatically. A font named Vintage BH therefore produces <code>Vintage BH.json<\/code>, while a font named The Arranger produces <code>The Arranger.json<\/code>. Beyond anchor information, the unified NorFonts exporter collects glyph advance widths, bounding boxes, optional glyph metadata, supported alternates, sets, ligatures, and configured engraving defaults. These additional metadata sections are handled separately from the anchor-generation engine, and certain values, particularly engraving defaults, must still be checked against the specific proportions and design characteristics of the font.<\/p>\n<figure class=\"nf-smufl-figure nf-smufl-example-placeholder\" style=\"display: block; width: 100%; max-width: 760px; margin: 1.6rem auto; text-align: center;\">\n<div style=\"box-sizing: border-box; width: 100%; min-height: 220px; display: flex; align-items: center; justify-content: center; border: 1px dashed #b8bec6; border-radius: 8px; background: #f6f7f9; color: #6b7280; font-size: .93rem;\" role=\"img\" aria-label=\"Placeholder for Example 7: Exporting Verified Anchors to SMuFL JSON\">Illustration under preparation&#8230;<\/div><figcaption style=\"font-size: .84rem; line-height: 1.5; text-align: center; margin: .65rem auto 0;\"><strong>[Example 7] \u2014 Exporting Verified Anchors to SMuFL JSON.<\/strong> Show selected native FontLab anchors alongside their corresponding <code>glyphsWithAnchors<\/code> entries, with coordinates converted to staff spaces.<\/figcaption><\/figure>\n<h2>9. Testing the Method on Different Music Fonts<\/h2>\n<p>One of my objectives was to develop a method that could be used across different music font families rather than being restricted to Bravura or to conventional engraved noteheads. During development, I used Bravura as a reference test font and subsequently tested the workflow on NorFonts designs with different outlines and proportions. In one successful Vintage BH test, the script generated and installed 268 anchors across 130 notehead glyphs, with no reported placement failures. A separate successful test using The Arranger installed 152 anchors across 68 glyphs.<\/p>\n<p>These results demonstrated that the workflow could adapt its geometric calculations to different font outlines while retaining the reference-guided attachment conventions. They also confirmed the usefulness of native contour verification and fractional-coordinate preservation in ensuring that the calculated positions were actually installed in FontLab. However, successful anchor installation should not be confused with complete musical or aesthetic validation. A notehead may offer several mathematically valid contour positions, and selecting the most appropriate one can still depend on stroke direction, stem thickness, visual weight, and the broader engraving style of the font.<\/p>\n<p>This issue is particularly important for handwritten music fonts, whose irregular contours and expressive proportions can create challenges that are less common in conventional engraving fonts. An attachment point that is technically exact may still need adjustment to produce a natural-looking stem connection. For this reason, I continue to regard practical testing in notation software as an essential part of font development. The geometric engine provides a reliable starting point, but the final assessment must consider how the symbols behave when used in actual musical scores.<\/p>\n<figure class=\"nf-smufl-figure nf-smufl-example-placeholder\" style=\"display: block; width: 100%; max-width: 760px; margin: 1.6rem auto; text-align: center;\">\n<div style=\"box-sizing: border-box; width: 100%; min-height: 220px; display: flex; align-items: center; justify-content: center; border: 1px dashed #b8bec6; border-radius: 8px; background: #f6f7f9; color: #6b7280; font-size: .93rem;\" role=\"img\" aria-label=\"Placeholder for Example 8: Comparing Anchor Placement Across Music Font Designs\">Illustration under preparation&#8230;<\/div><figcaption style=\"font-size: .84rem; line-height: 1.5; text-align: center; margin: .65rem auto 0;\"><strong>[Example 8] \u2014 Comparing Anchor Placement Across Music Font Designs.<\/strong> Compare one or more representative noteheads from different NorFonts families, showing how distinct contours lead to different anchor positions.<\/figcaption><\/figure>\n<h2>10. Why Some Anchors Still Require Manual Decisions<\/h2>\n<p>Not every SMuFL anchor can or should be calculated using notehead contour intersections. Certain anchor types represent entirely different geometric or musical relationships. The <code>cutOutNW<\/code>, <code>cutOutNE<\/code>, <code>cutOutSW<\/code>, and <code>cutOutSE<\/code> anchors, for example, describe cutout regions associated with glyph bounding boxes rather than ordinary stem attachment points. Other anchors, including <code>noteheadOrigin<\/code>, <code>repeatOffset<\/code>, and those used by certain flags or grace notes, have specialized purposes requiring different placement rules.<\/p>\n<p>Furthermore, some valid SMuFL attachment positions are intentionally located away from the visible glyph outline. This can occur with certain cluster noteheads, where the intended stem connection extends beyond the nominal bounding box. A strict contour-only algorithm cannot reproduce every such construction, even if its intersection calculations are mathematically perfect. Attempting to force all anchors onto the nearest visible contour could therefore introduce errors rather than eliminate them.<\/p>\n<p>For this reason, my approach distinguishes between anchors that can be calculated confidently, anchors that require specialized algorithms, and anchors that are better supplied or adjusted manually. The purpose of automation is not to produce coordinates for every possible glyph regardless of their suitability. It is to automate the operations that can be verified reliably while preserving the font designer&#8217;s judgment and control over more complex situations.<\/p>\n<h2>11. From Mathematical Precision to Musical Precision<\/h2>\n<p>The most important lesson from developing this workflow is that a successful attachment point must satisfy two different requirements. First, it must be geometrically reliable: its position should be derived from appropriate outlines or construction rules, stored accurately in FontLab, and exported consistently in SMuFL metadata. Second, it must be musically appropriate: when the notehead appears in a score, the attached stem should connect naturally, without unwanted gaps, collisions, or visually awkward joins.<\/p>\n<p>These two forms of precision are closely related, but they are not interchangeable. A perfectly calculated B\u00e9zier intersection can still be the wrong place to attach a stem, just as a musically appropriate anchor may intentionally lie outside the glyph&#8217;s visible outline. Reliable anchor placement therefore requires both mathematical analysis and an understanding of engraving conventions. The reference-guided approach helps bridge these requirements by combining the geometry of the target font with established attachment practices, while still leaving room for human evaluation.<\/p>\n<p>For me, the real value of the NorFonts workflow lies in making this process more consistent and reproducible. Instead of manually estimating hundreds of attachment positions, I can use a systematic geometric method, verify the stored coordinates, inspect the results, and generate the corresponding SMuFL metadata. This reduces repetitive work and makes it easier to identify the cases that genuinely require typographic judgment.<\/p>\n<h2>Conclusion<\/h2>\n<p>What began as an attempt to automate a few stem attachment points gradually developed into a more comprehensive method for understanding how music font geometry interacts with SMuFL metadata. The current NorFonts approach combines native FontLab outlines, exact B\u00e9zier intersection calculations, Bravura-derived positioning guidance, automatic coordinate-precision checks, visual previews, native anchor verification, and structured JSON export. Each of these elements addresses a different source of potential error, contributing to a workflow that is both more predictable and easier to evaluate.<\/p>\n<p>My intention has never been to replace the artistic and typographic judgment involved in designing music fonts. Rather, I want to provide a consistent mathematical and technical foundation that supports that judgment and reduces unnecessary manual work. Ultimately, the success of an anchor cannot be measured solely by the precision of its coordinates. <strong>An anchor is successful not simply when its position is mathematically correct, but when the resulting music looks correct.<\/strong> That is where font engineering and music engraving meet.<\/p>\n<div style=\"background-color: #fff1f1; border-left: 4px solid #dc2626; border-radius: 8px; padding: 18px 22px; margin: 24px 0; color: #7f1d1d; line-height: 1.7;\" role=\"note\">\n<p style=\"margin: 0 0 8px; color: #991b1b;\"><strong>Important \u2014 Software Compatibility<\/strong><\/p>\n<p style=\"margin: 0;\">The workflow and automation techniques described in this article are intended specifically for <strong>FontLab 8 and FontLab 9<\/strong>. The underlying principles of B\u00e9zier geometry, reference-guided anchor placement, and SMuFL metadata generation can also be applied to <strong>Glyphs 4<\/strong> and <strong>FontForge<\/strong>, but implementation in those applications requires adapting the scripts to their respective APIs, outline representations, and anchor-handling mechanisms. The NorFonts scripts described here are <strong>not directly compatible<\/strong> with Glyphs 4 or FontForge. The documented tests were performed in FontLab 8; FontLab 9 behavior should be verified separately.<\/p>\n<\/div>\n<div>\n<hr \/>\n<\/div>\n<p><em>NorFonts \u2014 Music Font Design, SMuFL Engineering &amp; Notation Technology<\/em><\/p>\n<p><strong>Related reading:<\/strong> <a href=\"https:\/\/norfont.com\/en\/how-to-create-a-smufl-music-font-from-glyph-design-to-accurate-metadata\/\">How to Create a SMuFL Music Font: From Glyph Design to Accurate Metadata<\/a><\/p>\n<p><strong>Technical references:<\/strong> <a href=\"https:\/\/smufl.formats.music\/latest\/specification\/glyphswithanchors.html\">SMuFL \u2014 Glyphs with Anchors<\/a> \u00b7 <a href=\"https:\/\/smufl.formats.music\/latest\/specification\/font-specific-metadata.html\">SMuFL \u2014 Font-Specific Metadata<\/a> \u00b7 <a href=\"https:\/\/help.fontlab.com\/fontlab\/8\/whats-new\/whats-new-03-edit-refine\/\">FontLab 8 \u2014 Edit &amp; Refine<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Inside the NorFonts workflow for calculating, positioning, and verifying music font attachment points in FontLab 8 and 9. Designing a music font involves far more than drawing attractive notation symbols. A notehead may look perfectly balanced, yet still produce incorrect results when connected to stems, beams, or other notation elements.<span class=\"more-link\"><a href=\"https:\/\/norfont.com\/en\/how-to-place-smufl-anchors-from-bezier-geometry-to-accurate-music-engraving\/\">Continue Reading<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":15211,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_glsr_average":0,"_glsr_ranking":0,"_glsr_reviews":0,"footnotes":"","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","_yoast_wpseo_focuskw":"","rank_math_title":"","rank_math_description":"","rank_math_focus_keyword":"","_dpc-meta-title":"","_dpc-meta-description":"","_dpc-keyword":""},"categories":[297],"tags":[],"class_list":["entry","author-nbahha","post-15113","post","type-post","status-publish","format-standard","has-post-thumbnail","category-music-font-guides"],"_links":{"self":[{"href":"https:\/\/norfont.com\/en\/wp-json\/wp\/v2\/posts\/15113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/norfont.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/norfont.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/norfont.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/norfont.com\/en\/wp-json\/wp\/v2\/comments?post=15113"}],"version-history":[{"count":44,"href":"https:\/\/norfont.com\/en\/wp-json\/wp\/v2\/posts\/15113\/revisions"}],"predecessor-version":[{"id":15249,"href":"https:\/\/norfont.com\/en\/wp-json\/wp\/v2\/posts\/15113\/revisions\/15249"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/norfont.com\/en\/wp-json\/wp\/v2\/media\/15211"}],"wp:attachment":[{"href":"https:\/\/norfont.com\/en\/wp-json\/wp\/v2\/media?parent=15113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/norfont.com\/en\/wp-json\/wp\/v2\/categories?post=15113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/norfont.com\/en\/wp-json\/wp\/v2\/tags?post=15113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}