FontForge Expand Stroke 裡 Line Join 的差異比較

Posted in :

在透過 FontForge 調整字重時,發現 Line Join 使用 Miter(0) 的效果會比較好。使用 Round(1) 的效果如下:

圖片說明:

  • 第2行為 line join=miter(0),第1行為 line join=round(1)。
  • 清楚的可以看到「米」、「木」、「土」或「日」使用 miter(0) 處理的情況下,在轉角的處理上,明顯讓字變粗,有書法渲染的感覺。

改用 miter 處理後,文字就清爽和銳利許多:

當然, 還是有些筆畫較細的字,在變更細時會變的「怪怪的」,像是:

重新設計,並透過程式調整字重後,線條都沒有出問題:


miter 的容錯力似乎比 round 好,在幫清松手寫體3變細時,使用 round 容易出現奇怪的肉瘤,改用 miter 就沒有這個問題:

說明:左圖是用 round 來 expand stroke, 右圖是用 miter。第一行是expand 的結果,第二行是原字型。


FontForge官方說明:
https://fontforge.org/scripting-alpha.html

ExpandStroke(width)
ExpandStroke(width,line cap, line join)
ExpandStroke(width,line cap, line join,0,removeinternal /external flag)
ExpandStroke(width,calligraphic-angle,height-numerator,height-denom)
ExpandStroke(width,calligraphic-angle,height-numerator,height-denom, 0, remove internal/external flag)In the first format a line cap of “butt” and line join of “round” are implied.
A value of 1 for remove internal/external will remove the internal contour, a value of 2 will remove the external contour.
The first three calls simulate the PostScript “stroke” command, the two final simulate a caligraphic pen.WidthIn the PostScript “stroke” command the width is the distance between the two generated curves. To be more precise, at ever point on the original curve, a point will be added to each of the new curves at width/2 units as measured on a vector normal to the direction of the original curve at that point.
In a caligraphic pen, the width is the width of the pen used to draw the curve.Line-capCan have one of three values: 0=> butt, 1=>round, 2=>squareLine-joinCan have one of three values: 0=>miter, 1=>round, 2=>bevelcaligraphic-anglethe (fixed) angle at which the pen is held.height-numerator/denominatorThese two values specify a ratio between the height and the width
height = numerator * width / denominator
(the scripting language only deals in integers, so when fractions are needed this kludge is used)remove internal/external contour flags1 => remove internal contour
2=> remove external contour
(you may not remove both contours)
4 => run remove overlap on result (buggy)

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *