Balances.
This commit is contained in:
parent
ea83169de0
commit
efa768e836
12 changed files with 350 additions and 33 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -43,4 +43,6 @@ previewer/
|
|||
buildglyphs.js
|
||||
parameters.js
|
||||
support/glyph.js
|
||||
support/stroke.js
|
||||
support/stroke.js
|
||||
testdrive/*.ttf
|
||||
testdrive/*.charmap
|
|
@ -140,9 +140,15 @@ createSuperscripts : list {
|
|||
list 0x2077 'seven'
|
||||
list 0x2078 'eight'
|
||||
list 0x2079 'nine'
|
||||
list 0x207A 'plus'
|
||||
list 0x207B 'minus'
|
||||
list 0x207C 'equal'
|
||||
list 0x207D 'parenLeft'
|
||||
list 0x207E 'parenRight'
|
||||
list 0x02B0 'h'
|
||||
list 0x02B2 'j'
|
||||
list 0x02B3 'r'
|
||||
list 0x02B4 'turnr'
|
||||
list 0x02B7 'w'
|
||||
list 0x02B8 'y'
|
||||
list 0x02E1 'l'
|
||||
|
@ -151,19 +157,39 @@ createSuperscripts : list {
|
|||
list 0x2071 'i'
|
||||
list 0x207F 'n'
|
||||
list 0x1D43 'a'
|
||||
list 0x1D44 'turna'
|
||||
list 0x1D45 'scripta'
|
||||
list 0x1D47 'b'
|
||||
list 0x1D48 'd'
|
||||
list 0x1D49 'e'
|
||||
list 0x1D4A 'turne'
|
||||
list 0x1D4B 'epsilon'
|
||||
list 0x1D4C 'cyrze'
|
||||
list 0x1D4D 'g'
|
||||
list 0x1D4F 'k'
|
||||
list 0x1D50 'm'
|
||||
list 0x1D51 'eng'
|
||||
list 0x1D52 'o'
|
||||
list 0x1D53 'turnc'
|
||||
list 0x1D56 'p'
|
||||
list 0x1D57 't'
|
||||
list 0x1D58 'u'
|
||||
list 0x1D5A 'turnm'
|
||||
list 0x1D5B 'v'
|
||||
list 0x1D5D 'beta'
|
||||
list 0x1D5E 'gamma'
|
||||
list 0x1D5F 'delta'
|
||||
list 0x1D60 'phi'
|
||||
list 0x1D61 'chi'
|
||||
list 0x1D9B 'turnscripta'
|
||||
list 0x1D9C 'c'
|
||||
list 0x1DA0 'f'
|
||||
list 0x1DA3 'turnh'
|
||||
list 0x1DB2 'varphi'
|
||||
list 0x1DB4 'esh'
|
||||
list 0x1DBA 'turnv'
|
||||
list 0x1DBE 'ezh'
|
||||
list 0x1DBF 'theta'
|
||||
list 0x1DBB 'z'
|
||||
list 0x1D2C 'A'
|
||||
list 0x1D2E 'B'
|
||||
|
@ -197,11 +223,16 @@ createSubscripts : list {
|
|||
list 0x2087 'seven'
|
||||
list 0x2088 'eight'
|
||||
list 0x2089 'nine'
|
||||
list 0x208A 'plus'
|
||||
list 0x208B 'minus'
|
||||
list 0x208C 'equal'
|
||||
list 0x208D 'parenLeft'
|
||||
list 0x208E 'parenRight'
|
||||
list 0x2090 'a'
|
||||
list 0x2091 'e'
|
||||
list 0x2092 'o'
|
||||
list 0x2093 'x'
|
||||
# list 0x2094 'reve'
|
||||
list 0x2094 'turne'
|
||||
list 0x2095 'h'
|
||||
list 0x2096 'k'
|
||||
list 0x2097 'l'
|
||||
|
@ -214,6 +245,11 @@ createSubscripts : list {
|
|||
list 0x1D63 'r'
|
||||
list 0x1D64 'u'
|
||||
list 0x1D65 'v'
|
||||
list 0x1D66 'beta'
|
||||
list 0x1D67 'gamma'
|
||||
list 0x1D68 'rho'
|
||||
list 0x1D69 'phi'
|
||||
list 0x1D6A 'chi'
|
||||
}
|
||||
|
||||
createFractions : list {
|
||||
|
|
|
@ -25,7 +25,7 @@ alias 'cyrte.upright' null 'tau'
|
|||
alias 'cyrte.italic' null 'm'
|
||||
italic-variant 'cyrte' 0x442
|
||||
alias 'Ef' 0x424 'Phi'
|
||||
alias 'cyref' 0x444 'phi'
|
||||
alias 'cyref' 0x444 'varphi'
|
||||
alias 'cyrHa' 0x425 'X'
|
||||
alias 'cyrha' 0x445 'x'
|
||||
alias 'cyru' 0x443 'y'
|
||||
|
@ -197,7 +197,7 @@ create-glyph 'cyrde.italic' : glyph-construction {
|
|||
}
|
||||
italic-variant 'cyrde' 0x434
|
||||
define [CyrZheShape top] : glyph-construction {
|
||||
local fine : adviceBlackness 3.75
|
||||
local fine : adviceBlackness 3.5
|
||||
local midx : mix SB MIDDLE 0.3
|
||||
define [CyrAngleShape] : glyph-construction {
|
||||
local cor 1
|
||||
|
@ -227,16 +227,18 @@ create-glyph 'cyrzhe' : glyph-construction {
|
|||
}
|
||||
define [CyrZeShape top] : glyph-construction {
|
||||
local mid : mix RIGHTSB SB 0.65
|
||||
include : twoHookUpper top [SMOOTHB * 0.87 / [XH / top]] SHOOK
|
||||
include : sHookLower 0 [SMOOTHA * 0.87 / [XH / top]] SHOOK
|
||||
local smb : SMOOTHB * 0.815
|
||||
local sma : SMOOTHA * 0.815
|
||||
include : twoHookUpper top [smb / [XH / top]] SHOOK
|
||||
include : sHookLower 0 [sma / [XH / top]] SHOOK
|
||||
include : create-stroke
|
||||
:.start-from RIGHTSB [top - SMOOTHB * 0.87 / [XH / top]]
|
||||
:.start-from RIGHTSB [top - smb / [XH / top]]
|
||||
:.set-width 0 STROKE
|
||||
:.arc-vh-to MIDDLE [top / 2 - HALFSTROKE] KAPPA
|
||||
:.line-to mid [top / 2 - HALFSTROKE]
|
||||
:.heads-to LEFTWARD
|
||||
include : create-stroke
|
||||
:.start-from RIGHTSB [SMOOTHA * 0.87 / [XH / top]]
|
||||
:.start-from RIGHTSB [sma / [XH / top]]
|
||||
:.set-width STROKE 0
|
||||
:.arc-vh-to MIDDLE [top / 2 + HALFSTROKE] KAPPA
|
||||
:.line-to mid [top / 2 + HALFSTROKE]
|
||||
|
@ -397,7 +399,7 @@ create-glyph 'cyre' : glyph-construction {
|
|||
define [CyrYuShape top sma smb] : glyph-construction {
|
||||
local fine : adviceBlackness 3.5
|
||||
include : VBarLeft [SB + O] 0 top fine
|
||||
include : smallo top 0 [mix [SB + fine * ITALICCOR] RIGHTSB 0.15] RIGHTSB fine [sma * 0.8] [smb * 0.8]
|
||||
include : smallo top 0 [mix [SB + fine * ITALICCOR] RIGHTSB 0.15] [RIGHTSB - O] fine [sma * 0.8] [smb * 0.8]
|
||||
include : HBar [SB + fine * 0.1] [mix [SB + fine * ITALICCOR] RIGHTSB 0.15] [top / 2]
|
||||
}
|
||||
create-glyph 'cyrYu' : glyph-construction {
|
||||
|
|
|
@ -31,8 +31,8 @@ create-glyph 'cyrdzhe' : glyph-construction {
|
|||
define [CyrLjeShape top] : glyph-construction {
|
||||
local fine : adviceBlackness 3.5
|
||||
local xlefttop : mix SB RIGHTSB 0.075
|
||||
include : LegShape xlefttop [mix SB RIGHTSB 0.025] [mix SB 0 0.25] top 0 fine
|
||||
include : CyrYeriShape top [MIDDLE - fine / 2 * ITALICCOR] RIGHTSB fine
|
||||
include : LegShape xlefttop [mix SB RIGHTSB 0.025] [mix SB 0 0.5] top 0 fine
|
||||
include : CyrYeriShape top [MIDDLE - fine / 2 * ITALICCOR] [RIGHTSB - O] fine
|
||||
include : HBarTop xlefttop MIDDLE top
|
||||
}
|
||||
create-glyph 'cyrLje' : glyph-construction {
|
||||
|
@ -49,7 +49,7 @@ define [CyrNjeShape top] : glyph-construction {
|
|||
local fine : adviceBlackness 3.5
|
||||
local xlefttop : mix SB RIGHTSB 0.075
|
||||
include : VBarLeft SB 0 top fine
|
||||
include : CyrYeriShape top [MIDDLE - fine / 2 * ITALICCOR] RIGHTSB fine
|
||||
include : CyrYeriShape top [MIDDLE - fine / 2 * ITALICCOR] [RIGHTSB - O] fine
|
||||
include : HBar [SB + fine * 0.1] MIDDLE [top / 2]
|
||||
}
|
||||
create-glyph 'cyrNje' : glyph-construction {
|
||||
|
@ -107,4 +107,6 @@ create-glyph 'cyrge' : glyph-construction {
|
|||
assign-unicode 0x491
|
||||
include eMarks
|
||||
include : CyrGeShape XH
|
||||
}
|
||||
}
|
||||
alias 'Palochka' 0x4C0 'I'
|
||||
alias 'palochka' 0x4CF 'l'
|
|
@ -334,16 +334,18 @@ create-glyph 'epsilon' : glyph-construction {
|
|||
include eMarks
|
||||
|
||||
local mid : mix SB RIGHTSB 0.65
|
||||
include : sHookUpper XH [SMOOTHA * 0.87] SHOOK
|
||||
include : XSHookLower 0 [RIGHTSB - OXHOOK + TAILADJX * globalTransform.yx] MIDDLE SB [SMOOTHB * 0.87] [SHOOK - TAILADJY * globalTransform.yx]
|
||||
local sma : SMOOTHA * 0.815
|
||||
local smb : SMOOTHB * 0.815
|
||||
include : sHookUpper XH sma SHOOK
|
||||
include : XSHookLower 0 [RIGHTSB - OXHOOK + TAILADJX * globalTransform.yx] MIDDLE SB smb [SHOOK - TAILADJY * globalTransform.yx]
|
||||
include : create-stroke
|
||||
:.start-from SB [XH - SMOOTHA * 0.87]
|
||||
:.start-from SB [XH - sma]
|
||||
:.set-width STROKE 0
|
||||
:.arc-vh-to MIDDLE [XH / 2 - HALFSTROKE] KAPPA
|
||||
:.line-to mid [XH / 2 - HALFSTROKE]
|
||||
:.heads-to RIGHTWARD
|
||||
include : create-stroke
|
||||
:.start-from SB [SMOOTHB * 0.87]
|
||||
:.start-from SB smb
|
||||
:.set-width 0 STROKE
|
||||
:.arc-vh-to MIDDLE [XH / 2 + HALFSTROKE] KAPPA
|
||||
:.line-to mid [XH / 2 + HALFSTROKE]
|
||||
|
@ -499,7 +501,7 @@ create-glyph 'omega' : glyph-construction {
|
|||
:.heads-to UPWARD
|
||||
}
|
||||
|
||||
create-glyph 'phi' : glyph-construction {
|
||||
create-glyph 'varphi' : glyph-construction {
|
||||
assign-unicode 0x3D5
|
||||
include ifMarks
|
||||
local fine : adviceBlackness 3.5
|
||||
|
@ -510,14 +512,14 @@ create-glyph 'phi' : glyph-construction {
|
|||
include : VBar MIDDLE y1 y2 fine
|
||||
include : VBar MIDDLE [y2 - HALFSTROKE] CAP
|
||||
}
|
||||
create-glyph 'varphi' : glyph-construction {
|
||||
create-glyph 'phi' : glyph-construction {
|
||||
assign-unicode 0x3C6
|
||||
include pMarks
|
||||
local fine : adviceBlackness 3.5
|
||||
local fine : adviceBlackness 3.25
|
||||
local x0 : [mix SB RIGHTSB 0.1] + fine
|
||||
local y0 : XH - STROKE * 0.2
|
||||
local y1 : mix 0 XH 0.75
|
||||
local x1 : SB + fine * ITALICCOR + O
|
||||
local x1 : SB + fine * ITALICCOR + O * 2
|
||||
local y3 : XH / 2
|
||||
local y4 : XH * 0.65
|
||||
|
||||
|
@ -529,8 +531,8 @@ create-glyph 'varphi' : glyph-construction {
|
|||
:.arc-hv-to [WIDTH - x1] [XH / 2]
|
||||
:.arc-vh-to [mix [WIDTH - x1] [MIDDLE + fine / 2] 0.5] [XH - fine - O]
|
||||
:.arc-hv-to [MIDDLE + fine / 2] y3
|
||||
:.line-to [MIDDLE + fine / 2] DESCENDER
|
||||
:.heads-to DOWNWARD
|
||||
:.line-to [MIDDLE + fine / 2] 0
|
||||
include : VBar MIDDLE DESCENDER 0
|
||||
}
|
||||
|
||||
create-glyph 'psi' : glyph-construction {
|
||||
|
|
|
@ -417,7 +417,7 @@ create-glyph 'E' : glyph-construction {
|
|||
define [HShape top] : glyph-construction {
|
||||
include : VBarLeft SB 0 top
|
||||
include : VBarRight RIGHTSB 0 top
|
||||
include : HBar SB RIGHTSB [top / 2]
|
||||
include : HBar [SB - O] [RIGHTSB + O] [top / 2]
|
||||
}
|
||||
create-glyph 'H' : glyph-construction {
|
||||
set-width WIDTH
|
||||
|
|
|
@ -546,7 +546,7 @@ create-glyph 'v' : glyph-construction {
|
|||
#bottom cap
|
||||
start-from [MIDDLE + STROKE / 2] 0
|
||||
line-to [MIDDLE - STROKE / 2] 0
|
||||
line-to MIDDLE STROKE
|
||||
line-to MIDDLE [STROKE * 0.8]
|
||||
}
|
||||
create-glyph 'w' : glyph-construction {
|
||||
set-width WIDTH
|
||||
|
@ -658,7 +658,7 @@ define [SmallKShape] : glyph-construction {
|
|||
:.start-from [right - HALFSTROKE] 0
|
||||
:.heads-to UPWARD
|
||||
:.set-width HALFSTROKE HALFSTROKE
|
||||
:.curve-to [right - HALFSTROKE] [rturn + 0.05 * [XH - rturn]] attach2 [XH * 0.5 + HALFSTROKE]
|
||||
:.curve-to [right - HALFSTROKE] [rturn + 0.05 * [XH - rturn]] attach2 [XH * 0.52 + HALFSTROKE]
|
||||
:.set-width [fine / 2] [fine / 2]
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ create-glyph 'OE' : glyph-construction {
|
|||
|
||||
create-glyph 'ae-epart' : glyph-construction {
|
||||
dont-export
|
||||
local sw : adviceBlackness 3.5
|
||||
local sw : adviceBlackness 3.25
|
||||
local eLeft : MIDDLE - sw / 2 * ITALICCOR
|
||||
local eMiddle : [mix eLeft [RIGHTSB - O] 0.5] - sw * globalTransform.yx
|
||||
local barbottom [XH * EBARPOS]
|
||||
|
@ -104,7 +104,7 @@ create-glyph 'ae-epart' : glyph-construction {
|
|||
}
|
||||
create-glyph 'ae-apart' : glyph-construction {
|
||||
dont-export
|
||||
local sw : adviceBlackness 3.5
|
||||
local sw : adviceBlackness 3.25
|
||||
|
||||
local bartop [XH * BARPOS + sw]
|
||||
local abarRight : MIDDLE + sw / 2 * ITALICCOR
|
||||
|
@ -131,7 +131,7 @@ create-glyph 'ae-apart' : glyph-construction {
|
|||
}
|
||||
create-glyph 'oe-opart' : glyph-construction {
|
||||
dont-export
|
||||
local sw : adviceBlackness 3.5
|
||||
local sw : adviceBlackness 3.25
|
||||
|
||||
local abarRight : MIDDLE + sw / 2 * ITALICCOR
|
||||
local m1 : mix [SB + O] abarRight 0.5
|
||||
|
@ -487,7 +487,7 @@ create-glyph 'scripta' : glyph-construction {
|
|||
}
|
||||
turned nothing 0x252 'scripta' MIDDLE [XH / 2]
|
||||
turned nothing 0x254 'c' MIDDLE [XH / 2]
|
||||
turned nothing 0x08E 'E' MIDDLE [CAP / 2]
|
||||
turned nothing 0x18E 'E' MIDDLE [CAP / 2]
|
||||
turned nothing 0x1DD 'e' MIDDLE [XH / 2]
|
||||
alias 'schwa' 0x259 'turne'
|
||||
turned nothing 0x265 'h' MIDDLE [XH / 2]
|
||||
|
|
|
@ -191,8 +191,8 @@ create-glyph 'nine' : glyph-construction {
|
|||
set-width WIDTH
|
||||
assign-unicode '9'
|
||||
|
||||
include : smallo CAP [CAP * 0.4] SB [RIGHTSB + O]
|
||||
local ymiddlea : [CAP - SMALLSMOOTHB + CAP * 0.4 + SMALLSMOOTHA] / 2
|
||||
include : smallo CAP [CAP * 0.425 - HALFSTROKE] SB [RIGHTSB + O]
|
||||
local ymiddlea : mix CAP [CAP * 0.425 - HALFSTROKE] 0.5
|
||||
include : create-stroke
|
||||
:.start-from RIGHTSB ymiddlea
|
||||
:.set-width 0 STROKE
|
||||
|
|
|
@ -253,6 +253,7 @@ create-glyph 'ellipsis' : glyph-construction {
|
|||
}
|
||||
alias 'bullet' 0x2022 'interpunct'
|
||||
alias 'hyphenpoint' 0x2027 'interpunct'
|
||||
alias 'greekbullet' 0x387 'interpunct'
|
||||
create-glyph 'permille' : glyph-construction {
|
||||
assign-unicode 0x2030
|
||||
local dotwidth [[adviceBlackness 4] * 1.5]
|
||||
|
|
|
@ -54,7 +54,7 @@ bold.dotsize = 160
|
|||
bold.periodsize = 180
|
||||
bold.ebarpos = 0.4
|
||||
bold.barpos = 0.42
|
||||
bold.hook = 150
|
||||
bold.hook = 135
|
||||
bold.ahook = 100
|
||||
bold.smooth = 200
|
||||
bold.oxhook = [-8]
|
||||
|
|
272
testdrive/index.html
Normal file
272
testdrive/index.html
Normal file
|
@ -0,0 +1,272 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<title>Iosevka</title>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: IosevkaWEB;
|
||||
src: url(iosevka-regular.woff) format(woff), url(iosevka-regular.ttf) format(truetype);
|
||||
}
|
||||
@font-face {
|
||||
font-family: IosevkaWEB;
|
||||
font-style: italic;
|
||||
src: url(iosevka-italic.woff) format(woff), url(iosevka-italic.ttf) format(truetype);
|
||||
}
|
||||
@font-face {
|
||||
font-family: IosevkaWEB;
|
||||
font-weight: bold;
|
||||
src: url(iosevka-bold.woff) format(woff), url(iosevka-bold.ttf) format(truetype);
|
||||
}
|
||||
@font-face {
|
||||
font-family: IosevkaWEB;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
src: url(iosevka-bolditalic.woff) format(woff), url(iosevka-bolditalic.ttf) format(truetype);
|
||||
}
|
||||
a {
|
||||
color: black;
|
||||
background-image: linear-gradient(white 50%, #888 50%);
|
||||
background-position: 0px 1.075em;
|
||||
background-repeat: repeat-x;
|
||||
background-size: 2px 2px;
|
||||
text-decoration: none;
|
||||
text-shadow: white -1px 0px 0px, white 1px 0px 0px;
|
||||
}
|
||||
a:hover {
|
||||
background-image: linear-gradient(white 50%, black 50%);
|
||||
}
|
||||
body {
|
||||
width: 68rem;
|
||||
margin: 0 auto;
|
||||
padding: 4rem 0;
|
||||
}
|
||||
p, pre, .show, .show samp, #links {
|
||||
font-family: "IosevkaWEB", monospace;
|
||||
line-height: 1.5;
|
||||
}
|
||||
p {
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
div.show {
|
||||
font-size: 2rem;
|
||||
width: 68rem;
|
||||
}
|
||||
div.show.bold { font-weight: bold }
|
||||
div.show.italic { font-style: italic }
|
||||
div.block {
|
||||
display: flex;
|
||||
width: 68rem;
|
||||
flex-wrap: wrap;
|
||||
border-top: 1px dotted #ccc;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
.show div.block span {
|
||||
display: block;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
line-height: 2rem;
|
||||
padding: 1rem;
|
||||
flex: none;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
cursor: default;
|
||||
}
|
||||
.show div.block span.indicator {
|
||||
font-size: 1rem;
|
||||
}
|
||||
.show div.block span.missing {
|
||||
opacity: 0.1
|
||||
}
|
||||
.show div.block span.present:before {
|
||||
display: none;
|
||||
content: attr(alt);
|
||||
position: absolute;
|
||||
font-size: 0.33em;
|
||||
top: -2em;
|
||||
left: -5em;
|
||||
right: -5em;
|
||||
text-align: center;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
text-shadow: white 0 0 0.4em;
|
||||
}
|
||||
.show div.block span.present:hover {
|
||||
background: #eee;
|
||||
}
|
||||
.show div.block span.present:hover:before {
|
||||
display: block;
|
||||
}
|
||||
.show div.block span > s {
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
}
|
||||
.show div.block span.present:hover s:before {
|
||||
display: block;
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 100%;
|
||||
width: 0.2em;
|
||||
border-right: 1px solid rgba(255, 0, 0, 0.1);
|
||||
border-top: 1px solid rgba(255, 0, 0, 0.1);
|
||||
border-bottom: 1px solid rgba(255, 0, 0, 0.1);
|
||||
}
|
||||
.show div.block span.present:hover s:after {
|
||||
display: block;
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 100%;
|
||||
width: 0.2em;
|
||||
border-left: 1px solid rgba(255, 0, 0, 0.1);
|
||||
border-top: 1px solid rgba(255, 0, 0, 0.1);
|
||||
border-bottom: 1px solid rgba(255, 0, 0, 0.1);
|
||||
}
|
||||
.show samp {
|
||||
display: flex;
|
||||
font-size: 1rem;
|
||||
white-space: pre;
|
||||
}
|
||||
.show samp > span.langname {
|
||||
display: inline-block;
|
||||
background: #eee;
|
||||
padding: 0.5em;
|
||||
flex: none;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
min-width: 12em;
|
||||
text-align: right;
|
||||
}
|
||||
.show samp > span.sentence {
|
||||
flex: 1;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
#links {
|
||||
position: fixed;
|
||||
z-index: 99;
|
||||
top: 0;
|
||||
width: 68rem;
|
||||
display: flex;
|
||||
border-bottom: 2px solid black;
|
||||
background: white;
|
||||
}
|
||||
#links a {
|
||||
display: block;
|
||||
flex: 1;
|
||||
padding: 1rem 0;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
background: none;
|
||||
text-shadow: none;
|
||||
}
|
||||
#links a.active {
|
||||
background: black;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
<script src="https://cdn.bootcss.com/zepto/1.1.6/zepto.min.js"></script>
|
||||
<script>
|
||||
if (!window.Zepto) document.write('<script src="zepto.min.js">\x3C/script>')
|
||||
</script>
|
||||
|
||||
</html>
|
||||
<body>
|
||||
<div id="links"></div>
|
||||
<script>
|
||||
function padzero(s, n){
|
||||
while(s.length < n) s = '0' + s;
|
||||
return s;
|
||||
}
|
||||
var BLOCKSIZE = 16 * 4;
|
||||
var fonts = [
|
||||
{name: 'iosevka-regular', cls: ''},
|
||||
{name: 'iosevka-bold', cls: 'bold'},
|
||||
{name: 'iosevka-italic', cls:'italic'},
|
||||
{name: 'iosevka-bolditalic', cls:'bold italic'}
|
||||
];
|
||||
|
||||
var sampleSentences = [
|
||||
{lang: 'English', sample: 'Shaw, those twelve beige hooks are joined if I patch a young, gooey mouth.'},
|
||||
{lang: 'Powerline', sample: '<span style="background:black;color:white"> NORMAL </span><span style="background:#ccc;color:black;font-style:normal">\uE0B0</span><span style="background:#ccc;color:black"> <span style="font-style:normal">\uE0A0</span> master <span style="font-style:normal">\uE0B1</span> glyphs/powerline.patel </span><span style="background:#eee;color:#ccc;font-style:normal">\uE0B0</span><span style="background:#eee;color:#555"> dos <span style="font-style:normal">\uE0B3</span> utf-8 <span style="font-style:normal">\uE0B3</span> PatEL </span><span style="background:#eee;color:#ccc;font-style:normal">\uE0B2</span><span style="background:#ccc"> 2% </span><span style="background:#ccc;color:black;font-style:normal">\uE0B2</span><span style="color:white;background:black"> \uE0A1 1:1 </span>'},
|
||||
{lang: 'Bulgarian', sample: 'Я, пазачът Вальо уж бди, а скришом хапва кюфтенца зад щайгите.'},
|
||||
{lang: 'Czech', sample: 'Nechť již hříšné saxofony ďáblů rozezvučí síň úděsnými tóny waltzu, tanga a quickstepu.'},
|
||||
{lang: 'Finnish', sample: 'Charles Darwin jammaili Åken hevixylofonilla Qatarin yöpub Zeligissä.'},
|
||||
{lang: 'French', sample: 'Voix ambiguë d\'un cœur qui au zéphyr préfère les jattes de kiwi.'},
|
||||
{lang: 'German', sample: 'Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich.'},
|
||||
{lang: 'Greek (monotonic)', sample: 'Ταχίστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός.'},
|
||||
{lang: 'Greek (polytonic)', sample: 'Ἄδμηθ\', ὁρᾷς γὰρ τἀμὰ πράγμαθ\' ὡς ἔχει, λέξαι θέλω σοι πρὶν θανεῖν ἃ βούλομαι. '},
|
||||
{lang: 'Hungarian', sample: 'Jó foxim és don Quijote húszwattos lámpánál ülve egy pár bűvös cipőt készít.'},
|
||||
{lang: 'Icelandic', sample: 'Kæmi ný öxi hér, ykist þjófum nú bæði víl og ádrepa.'},
|
||||
{lang: 'Irish', sample: 'Ċuaiġ bé ṁórṡáċ le dlúṫspád fíorḟinn trí hata mo ḋea-ṗorcáin ḃig.'},
|
||||
{lang: 'Latvian', sample: 'Muļķa hipiji mēģina brīvi nogaršot celofāna žņaudzējčūsku.'},
|
||||
{lang: 'Macedonian', sample: 'Ѕидарски пејзаж: шугав билмез со чудење џвака ќофте и кељ на туѓ цех.'},
|
||||
{lang: 'Norwegian', sample: 'Jeg begynte å fortære en sandwich mens jeg kjørte taxi på vei til quiz'},
|
||||
{lang: 'Lithuanian', sample: 'Įlinkdama fechtuotojo špaga sublykčiojusi pragręžė apvalų arbūzą.'},
|
||||
{lang: 'Polish', sample: 'Pchnąć w tę łódź jeża lub ośm skrzyń fig.'},
|
||||
{lang: 'Portuguese', sample: 'Luís argüia à Júlia que «brações, fé, chá, óxido, pôr, zângão» eram palavras do português.'},
|
||||
{lang: 'Romanian', sample: 'Înjurând pițigăiat, zoofobul comandă vexat whisky și tequila.'},
|
||||
{lang: 'Russian', sample: 'Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства.'},
|
||||
{lang: 'Spainish', sample: 'Benjamín pidió una bebida de kiwi y fresa; Noé, sin vergüenza, la más exquisita champaña del menú.'},
|
||||
{lang: 'Turkish', sample: 'Pijamalı hasta yağız şoföre çabucak güvendi.'},
|
||||
{lang: 'Ukranian', sample: 'Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів!'}
|
||||
]
|
||||
|
||||
var divs = [];
|
||||
var links = [];
|
||||
function Click(j){
|
||||
return function(){
|
||||
for(var k = 0; k < divs.length; k++) if(k === j) {
|
||||
divs[k].show()
|
||||
links[k].addClass('active')
|
||||
} else {
|
||||
divs[k].hide()
|
||||
links[k].removeClass('active')
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
fonts.forEach(function(font, fontindex){
|
||||
var div = $('<div>').addClass('show ' + font.cls);
|
||||
sampleSentences.forEach(function(record){
|
||||
var sample = $('<samp>').append('<span class="langname">' + record.lang + '</span><span class="sentence">' + record.sample + '</span>');
|
||||
div.append(sample);
|
||||
});
|
||||
$.get(font.name + '.charmap', function(data){
|
||||
data = JSON.parse(data);
|
||||
var uhash = [];
|
||||
for(var j = 0; j < data.length; j++) {
|
||||
var unicodes = data[j][1];
|
||||
if(unicodes && unicodes.length) for(var k = 0; k < unicodes.length; k++){
|
||||
uhash[unicodes[k]] = data[j][0].trim()
|
||||
}
|
||||
}
|
||||
for(var block = 0; block < (65536 / BLOCKSIZE); block++) {
|
||||
var blockdiv = $('<div>').addClass('block');
|
||||
var hasGlyphInThisBlock = false;
|
||||
for(j = block * BLOCKSIZE; j < (block + 1) * BLOCKSIZE; j++) if(uhash[j]){
|
||||
hasGlyphInThisBlock = true;
|
||||
}
|
||||
if(hasGlyphInThisBlock) {
|
||||
for(j = block * BLOCKSIZE; j < (block + 1) * BLOCKSIZE; j++) {
|
||||
if(j % 16 === 0) blockdiv.append('<span class="indicator">' + padzero(j.toString(16).toUpperCase(), 4) + '</span>')
|
||||
blockdiv.append('<span class="' + (uhash[j] ? 'present' : 'missing') + '" alt="' + (uhash[j] || '') + '"><s>' + String.fromCharCode(j) + '</s></span>')
|
||||
}
|
||||
div.append(blockdiv)
|
||||
}
|
||||
};
|
||||
});
|
||||
divs.push(div);
|
||||
$('body').append(div);
|
||||
|
||||
var a = $('<a>').attr('href', '#').append(font.name);
|
||||
a.on('click', Click(fontindex));
|
||||
links.push(a)
|
||||
$('#links').append(a);
|
||||
});
|
||||
Click(0)();
|
||||
</script>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue