MFEK / stroke

A utility for stroking paths in font glyphs (UFO .glif) written in Rust.
Apache License 2.0
22 stars 0 forks source link

[PAP] Bizarre alignment on single line as input #19

Closed ctrlcctrlv closed 3 years ago

ctrlcctrlv commented 3 years ago

image

The dots seem to be grouping themselves together, and also there's a gap after the first.

$ MFEKstroke PAP --pattern patterns.ufo/glyphs/dot.glif --path F_.glif --out `mktemp` -m repeated --sx 0.1 --sy 0.1 --spacing 30 -s     3 --simplify false

dot.glif

<?xml version="1.0" encoding="UTF-8"?>
<glyph name="dot" format="2">
  <advance width="1000"/>
  <outline>
    <contour>
      <point x="-27.5" y="0" type="curve" smooth="yes"/>
      <point x="-27.5" y="15"/>
      <point x="-15" y="27.5"/>
      <point x="0" y="27.5" type="curve" smooth="yes"/>
      <point x="15" y="27.5"/>
      <point x="27.5" y="15"/>
      <point x="27.5" y="0" type="curve" smooth="yes"/>
      <point x="27.5" y="-15"/>
      <point x="15" y="-27.5"/>
      <point x="0" y="-27.5" type="curve" smooth="yes"/>
      <point x="-15" y="-27.5"/>
      <point x="-27.5" y="-15"/>
    </contour>
  </outline>
</glyph>

F_.glif

<?xml version='1.0' encoding='UTF-8'?>
<glyph name="F" format="2">
  <advance width="599"/>
  <unicode hex="0046"/>
  <anchor x="537" y="650" name="top"/>
  <outline>
    <contour>
      <point x="0" y="264" type="line"/>
      <point x="599" y="264" type="line"/>
    </contour>
  </outline>
</glyph>
MatthewBlanchard commented 3 years ago

Fixed in latest commit!