MutatorMath 与响应式字体设计

来源:互联网 发布:淘宝网天猫吉他 编辑:程序博客网 时间:2024/05/16 16:18

来自 LettError 的 MutatorMath

MutatorMath

简单说,它是一个Python库,适用于多维度分段线形插值

尽管它是为字体数据的插值而开发的,但是它适用于任意 arithmetic object(支持四则运算的对象)。

  • objects/ 子包是一些通用的计算工具
  • ufo/ 子包是处理 UFO 数据的工具
  • MutatorMath 没有UI,只有 math

BSD-3 license。

MutatorMath支持UFO3数据格式,需要几个库的支持:

Library Author Branch URL Defcon TypeSupply.com master https://github.com/typesupply/defcon FontMath TypeSupply.com master https://github.com/typesupply/fontMath ufoLib UnifiedFontObject.org master https://github.com/unified-font-object/ufoLib

MutatorMath 术语

  • designspace: 任意维数的抽象欧氏空间。
  • axis: 一个维度。可以有描述性的维度名,譬如xywidthweightpopsnap
  • location: 一个坐标点。以字典参数给出命名维度,譬如Location(x=10)Location(snap=10)
  • split location(或 ambivalent location): 2-tuple 表示坐标,譬如Location(weight=(50, 60))
  • origin: 原点。
  • bias: 空间位移向量,用于移动所有 masters 和 instances。
  • arithmetic support:
    • 提供算术行为的对象
    • 支持+、-、*、/的对象
    • __add__, __sub__, __mul__, __rmul__, __div__ and __rdiv__方法的对象
  • master: 提供 input data 的算术对象
  • neutral: 在原点的master
  • instance: 特定位置计算出来的对象,和 master 具有相同的 class
0 0
原创粉丝点击