make cv16-cv19, ss09-ss10 visible.

This commit is contained in:
be5invis 2015-12-23 06:56:45 +08:00
parent 00326e1b58
commit 15575a7b6e
2 changed files with 40 additions and 42 deletions

View File

@ -230,41 +230,6 @@ let : begin
suggestGC
symbol-block "Other Precomposites"
set font.features.cv {.}
foreach [name : items-of : Object.keys glyphs] : begin
if glyphs.(name).featureSelector : begin
local fs glyphs.(name).featureSelector
foreach [feature : items-of : Object.keys fs] : begin
if [not font.features.cv.(feature)] : set font.features.cv.(feature) {.}
set font.features.cv.(feature).(name) fs.(feature)
local MarkZoom : glyph-construction
apply-transform : Upright
apply-transform : Translate (-MIDDLE) (-XH - ACCENT)
apply-transform : Scale ((RIGHTSB - SB) / (markExtend * 3))
apply-transform : Translate (MIDDLE) (XH + ACCENT)
apply-transform : Italify
composite 'asciitilde' glyphs.space glyphs.tildeAbove MarkZoom [into-unicode '~']
composite 'asciigrave' glyphs.space glyphs.graveAbove MarkZoom [into-unicode '`']
composite 'asciicaret' glyphs.space glyphs.circumflexAbove MarkZoom [into-unicode '^']
composite 'latin1acute' glyphs.space glyphs.acuteAbove MarkZoom [into-unicode 0xB4]
composite 'degree' glyphs.space glyphs.ringAbove MarkZoom [into-unicode 0xB0]
if [not recursive] : begin
composite 'asciitilde.centered' glyphs.asciitilde [Upright] [Translate 0 (parenMid - XH - ACCENT)] [Italify]
set glyphs.asciitilde.featureSelector {
.cv16 'asciitilde'
.cv17 'asciitilde.centered'
}
composite 'asterisk.centered' glyphs.asterisk [Upright] [Translate 0 (parenMid - glyphs.asterisk.centery)] [Italify]
set glyphs.asterisk.featureSelector {
.cv18 'asterisk'
.cv19 'asterisk.centered'
}
suggestGC
define [suggestName name] : begin
if glyphs.(name) : begin
local j 2
@ -760,11 +725,18 @@ symbol-block 'CJK Double Width Characters'
### Generate Features and remove double-width glyphs when necessary
if [not recursive] : begin
if [not para.cjk] : begin
set font.glyf : font.glyf.filter [lambda [g] : g.advanceWidth <= WIDTH]
set glyphList font.glyf
set font.features.cv {.}
foreach [name : items-of : Object.keys glyphs] : begin
if glyphs.(name).featureSelector : begin
local fs glyphs.(name).featureSelector
foreach [feature : items-of : Object.keys fs] : begin
if [not font.features.cv.(feature)] : set font.features.cv.(feature) {.}
set font.features.cv.(feature).(name) fs.(feature)
set font.features.mark {.}
set font.features.mkmk {.marks {} .bases {}}
set font.features.markGlyphs {.}

View File

@ -354,12 +354,13 @@ symbol-block 'Typographic Symbols'
include s
include : FlipAround MIDDLE parenMid
include s
create-glyph 'asterisk' : glyph-construction
local asteriskCenterY : parenTop - LONGJUT * 1.5
create-glyph 'asterisk.top' : glyph-construction
set-width WIDTH
assign-unicode '*'
local radius : LONGJUT * 1.2
local centery : parenTop - LONGJUT * 1.5
local fine : STROKE * 0.4
local final : 0.5 * [Math.min STROKE (radius * Math.PI * 2 / 10)]
@ -367,10 +368,15 @@ symbol-block 'Typographic Symbols'
local s : Math.sin (j / 5 * Math.PI * 2)
local c : Math.cos (j / 5 * Math.PI * 2)
include : dispiro
flat MIDDLE centery [widths fine fine]
curl (MIDDLE + radius * s) (centery + radius * c) [widths final final]
flat MIDDLE asteriskCenterY [widths fine fine]
curl (MIDDLE + radius * s) (asteriskCenterY + radius * c) [widths final final]
set currentGlyph.centery centery
composite 'asterisk.centered' glyphs.'asterisk.top' [Upright] [Translate 0 (parenMid - asteriskCenterY)] [Italify]
select-variant 'asterisk' '*' 'top' {
.cv18 'asterisk.top'
.cv19 'asterisk.centered'
}
create-glyph 'numbersign' : glyph-construction
set-width WIDTH
assign-unicode '#'
@ -725,6 +731,26 @@ symbol-block 'Percentages'
include : VBar [mix [mix SB RIGHTSB 0.1] RIGHTSB 0.5] 0 [mix 0 CAP 0.3] dotfine
include : VBarLeft [mix SB RIGHTSB 0.1] 0 [mix 0 CAP 0.3] dotfine
symbol-block "ASCII Marks"
local MarkZoom : glyph-construction
apply-transform : Upright
apply-transform : Translate (-MIDDLE) (-XH - ACCENT)
apply-transform : Scale ((RIGHTSB - SB) / (markExtend * 3))
apply-transform : Translate (MIDDLE) (XH + ACCENT)
apply-transform : Italify
composite 'asciitilde.top' glyphs.space glyphs.tildeAbove MarkZoom
composite 'asciitilde.centered' glyphs.'asciitilde.top' [Upright] [Translate 0 (parenMid - XH - ACCENT)] [Italify]
select-variant 'asciitilde' '~' 'top' {
.cv16 'asciitilde'
.cv17 'asciitilde.centered'
}
composite 'asciigrave' glyphs.space glyphs.graveAbove MarkZoom [into-unicode '`']
composite 'asciicaret' glyphs.space glyphs.circumflexAbove MarkZoom [into-unicode '^']
composite 'latin1acute' glyphs.space glyphs.acuteAbove MarkZoom [into-unicode 0xB4]
composite 'degree' glyphs.space glyphs.ringAbove MarkZoom [into-unicode 0xB0]
### Aliased modifer letters
alias 'mdfPrime' 0x2B9 'prime'
alias 'mdfDoublePrime' 0x2BA 'doubleprime'
@ -742,4 +768,4 @@ symbol-block 'Double-width punctuations'
dwl nothing 0xFF0C 'comma'
dwl nothing 0xFF0E 'period'
dwr nothing 0xFF08 'parenLeft'
dwl nothing 0xFF09 'parenRight'
dwl nothing 0xFF09 'parenRight'