【问题标题】:How are glyph points given in a UFO font?UFO 字体中的字形点是如何给出的?
【发布时间】:2020-02-05 13:49:45
【问题描述】:

我尝试捕获字形点/路径(不使用字体)。我将字形转换为UFO

<contour>
  <point x="281" y="646" type="qcurve"/>
  <point x="273" y="599"/>
  <point x="225" y="411"/>
  <point x="216" y="363" type="qcurve"/>
  <point x="320" y="382"/>
  <point x="426" y="445" type="qcurve"/>
  <point x="603" y="552"/>
  <point x="603" y="626" type="qcurve"/>
  <point x="603" y="676"/>
  <point x="502" y="676" type="qcurve"/>
  <point x="420" y="676"/>
</contour>

根据manualqcurve 代表从 TrueType 派生的quadratic curves。因此,我们可以从一个二次控制点计算出两个贝塞尔控制点

CP1 = QP0 + 2/3 *(QP1-QP0)
CP2 = QP2 + 2/3 *(QP1-QP2)

在这种情况下,我们应该在两点之间有一个控制点(参见前四行;有两个控制点)。

我们如何将具有两个控制点的二次曲线转换为贝塞尔曲线?

【问题讨论】:

    标签: fonts bezier fontforge ufo


    【解决方案1】:

    不存在具有两个控制点的二次曲线。根据定义,它只有一个。但是,TryeType 有一个压缩点表示,它会删除恰好位于连续二次曲线控制点之间的曲线上点,因此您在 UFO 文件中看到的点列表只是映射到 TrueType 自己的“曲线上”和“曲线外”点的定义。

    正如 UFO 文档所解释的,这需要 special handling,因此请参阅 "Why do more than one consecutive off-curve points appear in glyph outline?" Stackoverflow 帖子并回答如何解释这样的序列。

    【讨论】:

      猜你喜欢
      • 2014-04-26
      • 1970-01-01
      • 1970-01-01
      • 2019-06-04
      • 2015-07-09
      • 2015-01-14
      • 1970-01-01
      • 2013-04-25
      • 2023-03-25
      相关资源
      最近更新 更多