The /j looks MUCH better.
This commit is contained in:
parent
e181b1ae2d
commit
8e8c5d4d3a
|
@ -30,7 +30,6 @@ ttfFont.glyf = [ttfFont.glyf[0]].concat(ttfFont.glyf.slice(1).sort(function(a, b
|
||||||
else return (a.name > b.name ? 1 : a.name === b.name ? 0 : -1)
|
else return (a.name > b.name ? 1 : a.name === b.name ? 0 : -1)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if(outputPath) fs.writeFileSync(outputPath, toBuffer(new TTFWriter(options).write(ttfFont)));
|
|
||||||
if(argv.dumpmap) {
|
if(argv.dumpmap) {
|
||||||
fs.writeFileSync(argv.dumpmap, JSON.stringify(ttfFont.glyf.map(function(glyph){ return [glyph.name, glyph.unicode, glyph.advanceWidth === 0 && glyph.anchors && Object.keys(glyph.anchors).length > 0]})), 'utf8')
|
fs.writeFileSync(argv.dumpmap, JSON.stringify(ttfFont.glyf.map(function(glyph){ return [glyph.name, glyph.unicode, glyph.advanceWidth === 0 && glyph.anchors && Object.keys(glyph.anchors).length > 0]})), 'utf8')
|
||||||
};
|
};
|
||||||
|
@ -58,4 +57,6 @@ if(argv.dumpfeature) {
|
||||||
featurefile += '@GDEF_Simple = [' + gdef.simple.join(' \n') + '];\n@GDEF_Ligature =[' + gdef.ligature.join(' \n') + '];\n@GDEF_Mark = [' + gdef.mark.join(' \n') + '];\ntable GDEF { GlyphClassDef @GDEF_Simple, @GDEF_Ligature, @GDEF_Mark, ;} GDEF;'
|
featurefile += '@GDEF_Simple = [' + gdef.simple.join(' \n') + '];\n@GDEF_Ligature =[' + gdef.ligature.join(' \n') + '];\n@GDEF_Mark = [' + gdef.mark.join(' \n') + '];\ntable GDEF { GlyphClassDef @GDEF_Simple, @GDEF_Ligature, @GDEF_Mark, ;} GDEF;'
|
||||||
|
|
||||||
fs.writeFileSync(argv.dumpfeature, featurefile, 'utf8');
|
fs.writeFileSync(argv.dumpfeature, featurefile, 'utf8');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(outputPath) fs.writeFileSync(outputPath, toBuffer(new TTFWriter(options).write(ttfFont)));
|
|
@ -331,10 +331,10 @@ create-glyph 'Q' : glyph-construction
|
||||||
include glyphs.O AS_BASE
|
include glyphs.O AS_BASE
|
||||||
|
|
||||||
start-from MIDDLE 0
|
start-from MIDDLE 0
|
||||||
line-to (MIDDLE + STROKE / 2) (-CAP * 0.2)
|
line-to (MIDDLE + STROKE / 2 * CORRECTION_HX) (-CAP * 0.2)
|
||||||
line-to (MIDDLE + STROKE / 2 + STROKE) (-CAP * 0.2)
|
line-to (MIDDLE + STROKE * 1.5 * CORRECTION_HX) (-CAP * 0.2)
|
||||||
line-to (MIDDLE + STROKE) 0
|
line-to (MIDDLE + STROKE * CORRECTION_HX) 0
|
||||||
line-to (MIDDLE + STROKE * (1 - 0.5 / 3)) (STROKE * 0.5)
|
line-to (MIDDLE + STROKE * (1 - 0.5 / 3) * CORRECTION_HX) (STROKE * 0.5)
|
||||||
reverse-last
|
reverse-last
|
||||||
|
|
||||||
define [UShape top bottom stroke] : glyph-construction
|
define [UShape top bottom stroke] : glyph-construction
|
||||||
|
|
|
@ -357,26 +357,24 @@ create-glyph 'i' : glyph-construction
|
||||||
create-glyph 'dotlessj.straight' : glyph-construction
|
create-glyph 'dotlessj.straight' : glyph-construction
|
||||||
dont-export
|
dont-export
|
||||||
include pMarks
|
include pMarks
|
||||||
set-anchor 'above' BASE (MIDDLE + JBALANCE - HALFSTROKE * CORRECTION_HX) XH
|
set-anchor 'above' BASE (MIDDLE + JBALANCE) XH
|
||||||
set-anchor 'overlay' BASE (MIDDLE + JBALANCE - HALFSTROKE * CORRECTION_HX) (XH / 2)
|
set-anchor 'overlay' BASE (MIDDLE + JBALANCE) (XH / 2)
|
||||||
local center : MIDDLE + JBALANCE
|
local center : MIDDLE + JBALANCE + HALFSTROKE * CORRECTION_HX
|
||||||
local hookx : center - (WIDTH * 0.7) + OXHOOK - TAILADJX * globalTransform.yx
|
local hookx : center - (WIDTH * 0.5) - STROKE * CORRECTION_HX + OXHOOK
|
||||||
local turn : [mix center hookx 0.5] + CORRECTION_OMIDS
|
local turn : [mix center hookx 0.5] + CORRECTION_OMIDS
|
||||||
local smb : (center - turn) * 1.2
|
local smb : (center - turn) * 1.2
|
||||||
include : spiro
|
include : spiro
|
||||||
widths.rhs
|
widths.rhs
|
||||||
flat center XH [heading DOWNWARD]
|
flat center XH [heading DOWNWARD]
|
||||||
curl center (DESCENDER + smb)
|
curl center (DESCENDER + smb)
|
||||||
arcvh 6
|
hookend (DESCENDER + O)
|
||||||
g4 turn (DESCENDER + O)
|
|
||||||
quadcontrols (KAPPA_HOOK + 0.75 * globalTransform.yx + 0.1) 0
|
|
||||||
g4 hookx (DESCENDER + JHOOK)
|
g4 hookx (DESCENDER + JHOOK)
|
||||||
|
|
||||||
create-glyph 'dotlessj.serifed' : glyph-construction
|
create-glyph 'dotlessj.serifed' : glyph-construction
|
||||||
dont-export
|
dont-export
|
||||||
include pMarks
|
include pMarks
|
||||||
include glyphs.'dotlessj.straight' AS_BASE
|
include glyphs.'dotlessj.straight' AS_BASE
|
||||||
include : leftwardTopSerif (MIDDLE + JBALANCE - HALFSTROKE * CORRECTION_HX) XH LONGJUT
|
include : leftwardTopSerif (MIDDLE + JBALANCE) XH LONGJUT
|
||||||
|
|
||||||
|
|
||||||
select-variant 'dotlessj' 0x237 'serifed'
|
select-variant 'dotlessj' 0x237 'serifed'
|
||||||
|
@ -650,6 +648,8 @@ define [fBar left right y] : glyph-construction
|
||||||
:.line-to [fallback right (MIDDLE + LONGJUT)] [fallback y XH]
|
:.line-to [fallback right (MIDDLE + LONGJUT)] [fallback y XH]
|
||||||
:.heads-to RIGHTWARD
|
:.heads-to RIGHTWARD
|
||||||
|
|
||||||
|
|
||||||
|
define fovershoot : O * 5
|
||||||
create-glyph 'longs.upright' : glyph-construction
|
create-glyph 'longs.upright' : glyph-construction
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
dont-export
|
dont-export
|
||||||
|
@ -658,12 +658,12 @@ create-glyph 'longs.upright' : glyph-construction
|
||||||
widths.center
|
widths.center
|
||||||
flat (MIDDLE - FBALANCE) 0 [heading UPWARD]
|
flat (MIDDLE - FBALANCE) 0 [heading UPWARD]
|
||||||
curl (MIDDLE - FBALANCE) (CAP - FHOOK)
|
curl (MIDDLE - FBALANCE) (CAP - FHOOK)
|
||||||
flat (MIDDLE - FBALANCE + HOOKX - 0.01) (CAP - HALFSTROKE - O * 6) [heading RIGHTWARD]
|
flat (MIDDLE - FBALANCE + HOOKX - 0.01) (CAP - HALFSTROKE - fovershoot) [heading RIGHTWARD]
|
||||||
curl (MIDDLE - FBALANCE + HOOKX) (CAP - HALFSTROKE - O * 6) [heading RIGHTWARD]
|
curl (MIDDLE - FBALANCE + HOOKX) (CAP - HALFSTROKE - fovershoot) [heading RIGHTWARD]
|
||||||
|
|
||||||
define [eshHook attach] : glyph-construction
|
define [eshHook attach] : glyph-construction
|
||||||
include : create-stroke
|
include : create-stroke
|
||||||
:.start-from (attach.x - SHOOK * 2) (attach.y + HALFSTROKE + O * 6 - SHOOK)
|
:.start-from (attach.x - SHOOK * 2) (attach.y + HALFSTROKE + fovershoot - SHOOK)
|
||||||
:.heads-to RIGHTWARD
|
:.heads-to RIGHTWARD
|
||||||
:.set-width HALFSTROKE HALFSTROKE
|
:.set-width HALFSTROKE HALFSTROKE
|
||||||
:.arc-hv-to attach.x attach.y
|
:.arc-hv-to attach.x attach.y
|
||||||
|
@ -673,12 +673,12 @@ define [LongSShape top bottom hookx hooky fine] : glyph-construction
|
||||||
local w [fallback fine STROKE]
|
local w [fallback fine STROKE]
|
||||||
include : spiro
|
include : spiro
|
||||||
widths.center w
|
widths.center w
|
||||||
flat (MIDDLE - hookx) (bottom + w + O * 6) [heading RIGHTWARD]
|
flat (MIDDLE - hookx) (bottom + w / 2 + fovershoot) [heading RIGHTWARD]
|
||||||
curl (MIDDLE - hookx + 0.01) (bottom + w + O * 6) [heading RIGHTWARD]
|
curl (MIDDLE - hookx + 0.01) (bottom + w / 2 + fovershoot) [heading RIGHTWARD]
|
||||||
flat MIDDLE (bottom + hooky)
|
flat MIDDLE (bottom + hooky)
|
||||||
curl MIDDLE (top - hooky)
|
curl MIDDLE (top - hooky)
|
||||||
flat (MIDDLE + hookx - 0.01) (top - w - O * 6) [heading RIGHTWARD]
|
flat (MIDDLE + hookx - 0.01) (top - w / 2 - fovershoot) [heading RIGHTWARD]
|
||||||
curl (MIDDLE + hookx) (top - w - O * 6) [heading RIGHTWARD]
|
curl (MIDDLE + hookx) (top - w / 2 - fovershoot) [heading RIGHTWARD]
|
||||||
|
|
||||||
create-glyph 'longs.italic' : glyph-construction
|
create-glyph 'longs.italic' : glyph-construction
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
|
|
9
makefile
9
makefile
|
@ -24,23 +24,32 @@ FILES = $(SUPPORT_FILES) buildglyphs.js
|
||||||
|
|
||||||
fonts : update $(TARGETS)
|
fonts : update $(TARGETS)
|
||||||
|
|
||||||
|
RMTARGETS = -@rm $@ $(subst $(OBJDIR)/.pass0-,$(OBJDIR)/,$(subst .ttf,.charmap,$@)) $(subst .ttf,.ab.fea,$@)
|
||||||
PASS0C = -o $@ --dumpmap $(subst $(OBJDIR)/.pass0-,$(OBJDIR)/,$(subst .ttf,.charmap,$@)) --dumpfeature $(subst .ttf,.ab.fea,$@)
|
PASS0C = -o $@ --dumpmap $(subst $(OBJDIR)/.pass0-,$(OBJDIR)/,$(subst .ttf,.charmap,$@)) --dumpfeature $(subst .ttf,.ab.fea,$@)
|
||||||
# Pass 0 : file construction
|
# Pass 0 : file construction
|
||||||
$(OBJDIR)/.pass0-iosevka-regular.ttf : $(FILES) | $(OBJDIR)
|
$(OBJDIR)/.pass0-iosevka-regular.ttf : $(FILES) | $(OBJDIR)
|
||||||
|
$(RMTARGETS)
|
||||||
node generate $(PASS0C) iosevka w-book s-upright x-regular
|
node generate $(PASS0C) iosevka w-book s-upright x-regular
|
||||||
$(OBJDIR)/.pass0-iosevka-bold.ttf : $(FILES) | $(OBJDIR)
|
$(OBJDIR)/.pass0-iosevka-bold.ttf : $(FILES) | $(OBJDIR)
|
||||||
|
$(RMTARGETS)
|
||||||
node generate $(PASS0C) iosevka w-bold s-upright x-bold
|
node generate $(PASS0C) iosevka w-bold s-upright x-bold
|
||||||
$(OBJDIR)/.pass0-iosevka-italic.ttf : $(FILES) | $(OBJDIR)
|
$(OBJDIR)/.pass0-iosevka-italic.ttf : $(FILES) | $(OBJDIR)
|
||||||
|
$(RMTARGETS)
|
||||||
node generate $(PASS0C) iosevka w-book s-italic x-italic
|
node generate $(PASS0C) iosevka w-book s-italic x-italic
|
||||||
$(OBJDIR)/.pass0-iosevka-bolditalic.ttf : $(FILES) | $(OBJDIR)
|
$(OBJDIR)/.pass0-iosevka-bolditalic.ttf : $(FILES) | $(OBJDIR)
|
||||||
|
$(RMTARGETS)
|
||||||
node generate $(PASS0C) iosevka w-bold s-italic x-bolditalic
|
node generate $(PASS0C) iosevka w-bold s-italic x-bolditalic
|
||||||
$(OBJDIR)/.pass0-iosevkacc-regular.ttf : $(FILES) | $(OBJDIR)
|
$(OBJDIR)/.pass0-iosevkacc-regular.ttf : $(FILES) | $(OBJDIR)
|
||||||
|
$(RMTARGETS)
|
||||||
node generate $(PASS0C) iosevka cc w-book s-upright x-regular
|
node generate $(PASS0C) iosevka cc w-book s-upright x-regular
|
||||||
$(OBJDIR)/.pass0-iosevkacc-bold.ttf : $(FILES) | $(OBJDIR)
|
$(OBJDIR)/.pass0-iosevkacc-bold.ttf : $(FILES) | $(OBJDIR)
|
||||||
|
$(RMTARGETS)
|
||||||
node generate $(PASS0C) iosevka cc w-bold s-upright x-bold
|
node generate $(PASS0C) iosevka cc w-bold s-upright x-bold
|
||||||
$(OBJDIR)/.pass0-iosevkacc-italic.ttf : $(FILES) | $(OBJDIR)
|
$(OBJDIR)/.pass0-iosevkacc-italic.ttf : $(FILES) | $(OBJDIR)
|
||||||
|
$(RMTARGETS)
|
||||||
node generate $(PASS0C) iosevka cc w-book s-italic x-italic
|
node generate $(PASS0C) iosevka cc w-book s-italic x-italic
|
||||||
$(OBJDIR)/.pass0-iosevkacc-bolditalic.ttf : $(FILES) | $(OBJDIR)
|
$(OBJDIR)/.pass0-iosevkacc-bolditalic.ttf : $(FILES) | $(OBJDIR)
|
||||||
|
$(RMTARGETS)
|
||||||
node generate $(PASS0C) iosevka cc w-bold s-italic x-bolditalic
|
node generate $(PASS0C) iosevka cc w-bold s-italic x-bolditalic
|
||||||
|
|
||||||
$(ABFEAT) : $(OBJDIR)/.pass0-%.ab.fea : $(OBJDIR)/.pass0-%.ttf
|
$(ABFEAT) : $(OBJDIR)/.pass0-%.ab.fea : $(OBJDIR)/.pass0-%.ttf
|
||||||
|
|
|
@ -47,7 +47,7 @@ tbalance2 = 30
|
||||||
rbalance = 30
|
rbalance = 30
|
||||||
sbalance = 0.51
|
sbalance = 0.51
|
||||||
kappa_hook = 0.7
|
kappa_hook = 0.7
|
||||||
jbalance = 120
|
jbalance = 50
|
||||||
fbalance = 6
|
fbalance = 6
|
||||||
onebalance = 30
|
onebalance = 30
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ sb = 50
|
||||||
stroke = 108
|
stroke = 108
|
||||||
dotsize = 160
|
dotsize = 160
|
||||||
periodsize = 180
|
periodsize = 180
|
||||||
essx = 1.12
|
essx = 1.14
|
||||||
|
|
||||||
barpos = 0.51
|
barpos = 0.51
|
||||||
ebarpos = 0.4
|
ebarpos = 0.4
|
||||||
|
@ -110,6 +110,7 @@ italicangle = 10
|
||||||
rhook = 80
|
rhook = 80
|
||||||
tbalance = 50
|
tbalance = 50
|
||||||
ebarpos = 0.41
|
ebarpos = 0.41
|
||||||
|
jhook = 90
|
||||||
|
|
||||||
# Combinations
|
# Combinations
|
||||||
[x-regular]
|
[x-regular]
|
||||||
|
|
|
@ -29,8 +29,8 @@ for i in font:
|
||||||
if len(sys.argv) <= 3:
|
if len(sys.argv) <= 3:
|
||||||
font.selection.all()
|
font.selection.all()
|
||||||
font.replaceWithReference(2)
|
font.replaceWithReference(2)
|
||||||
font.selection.select(("ranges", "unicode", None), 0x20, 0x7e)
|
#font.selection.select(("ranges", "unicode", None), 0x20, 0x7e)
|
||||||
font.unlinkReferences()
|
#font.unlinkReferences()
|
||||||
|
|
||||||
# Outline simplify
|
# Outline simplify
|
||||||
print "Simplify, pass 1: ", font.fontname
|
print "Simplify, pass 1: ", font.fontname
|
||||||
|
|
|
@ -159,6 +159,10 @@
|
||||||
border-top: 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);
|
border-bottom: 1px solid rgba(255, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
.show .smp {
|
||||||
|
font-size: 1rem;
|
||||||
|
margin: 1rem 0;
|
||||||
|
}
|
||||||
.show samp {
|
.show samp {
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
|
@ -227,7 +231,10 @@
|
||||||
{name: 'iosevkacc-italic', cls:'cc italic', display: 'CC-Italic'},
|
{name: 'iosevkacc-italic', cls:'cc italic', display: 'CC-Italic'},
|
||||||
{name: 'iosevkacc-bolditalic', cls:'cc bold italic', display: 'CC-Bolditalic'}
|
{name: 'iosevkacc-bolditalic', cls:'cc bold italic', display: 'CC-Bolditalic'}
|
||||||
];
|
];
|
||||||
|
var lipsum = ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur semper ipsum quam, at molestie libero euismod vitae. Etiam vehicula felis mi, et ultricies libero consequat at. Donec consequat, nunc id elementum tempor, lectus orci vulputate leo, eget lobortis lectus nulla sed orci. Donec in dolor non orci aliquet gravida. Nulla volutpat magna et nulla pretium, quis consequat nibh euismod. Suspendisse eget metus enim. Fusce vulputate scelerisque eros et consequat. Quisque dapibus accumsan augue, et semper lectus vehicula sit amet. Ut ornare venenatis tortor, non gravida tellus mattis interdum. In hac habitasse platea dictumst. Donec interdum commodo ex eu tincidunt. Curabitur non fermentum enim. Proin luctus orci ut commodo auctor. Pellentesque accumsan id sem eu semper. Sed non pharetra nibh. Vivamus mattis luctus arcu, a rutrum dui venenatis sit amet. aja ojo ojoined',
|
||||||
|
'Troh tper es sos, bo slisxil spôrtjư uzx, cxital posteluf hrvatzem ili bi. Tenis lubôvijm roksăfnâvơi da din. Bo cxtir dajte lubim onă, dev ti silăju môrkva vecxer. Din om leto glfădju problêm. Sâm slơzxju răzumim vnimanie na, vsê ăzia kưdrju prôgram nô. Slôzxju zavoduf nơ den, hcê licơ sxkol toplju so. Vi knigis sidili polozxij bil, ne polnfju ovơcxjư dla, es ônâ mamâ pisajut mălôstis.',
|
||||||
|
'Жят эним либриз аюдиам ад. Мыа ан одео нонумй опортэры, но дуо вэре эчжынт ыпикурэи. Ан вим алёквюам пыртенакж. Эжт но оратио факэтэ, дольорэ индоктум дыфинитеоным эжт ты.',
|
||||||
|
'Κυεμ ορατιο δολορες υσυ εα, θε φιξ βωνορυμ σωνσεπθαμ, αδχυς δεφινιθιονεμ ιν εσθ. Υθ εσε ινιμισυς περ, περ ποσθυλανθ ινστρυσθιορ εα. Ναμ μυνδι θαθιων φερθερεμ νο, εσε ινερμις περφεσθο ετ μεα. Θε νες θωτα ρεφορμιδανς, ινερμις φασιλισις ετ σεα. Μελ λυδυς ταντας δελενιτι υθ, φις λιβερ σονγυε ηομερω ατ. Σεδ θριθανι συαφιθαθε γυβεργρεν ευ, ινθελλεγαμ συσιπιαντυρ δεφινιθιονεμ εα υσυ, ει κυο θαλε φερι ινθελλεγαμ. Φερο ασεντιορ θε μει, μαιορυμ γυβεργρεν αδ φιξ.'];
|
||||||
var sampleSentences = [
|
var sampleSentences = [
|
||||||
{code: 'en', lang: 'English', sample: 'Shaw, those twelve beige hooks are joined if I patch a young, gooey mouth.'},
|
{code: 'en', 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: '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>'},
|
||||||
|
@ -256,56 +263,56 @@
|
||||||
{code: 'uk', lang: 'Ukranian', sample: 'Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів!'}
|
{code: 'uk', lang: 'Ukranian', sample: 'Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів!'}
|
||||||
]
|
]
|
||||||
|
|
||||||
var divs = [];
|
|
||||||
var links = [];
|
var links = [];
|
||||||
function Click(j){
|
function Click(j, c){
|
||||||
return function(){
|
return function(){
|
||||||
for(var k = 0; k < divs.length; k++) if(k === j) {
|
for(var k = 0; k < links.length; k++) if(k === j) {
|
||||||
divs[k].show()
|
|
||||||
links[k].addClass('active')
|
links[k].addClass('active')
|
||||||
} else {
|
} else {
|
||||||
divs[k].hide()
|
|
||||||
links[k].removeClass('active')
|
links[k].removeClass('active')
|
||||||
}
|
}
|
||||||
|
div[0].className = 'show ' + c;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fonts.forEach(function(font, fontindex){
|
var div = $('<div>').addClass('show');
|
||||||
var div = $('<div>').addClass('show ' + font.cls);
|
lipsum.forEach(function(s){
|
||||||
sampleSentences.forEach(function(record){
|
div.append($('<p>').addClass('smp').html(s))
|
||||||
var sample = $('<samp>').attr('lang', record.code || '').attr('xml:lang', record.code || '').append('<span class="langname">' + record.lang + '</span><span class="sentence">' + record.sample + '</span>');
|
});
|
||||||
div.append(sample);
|
sampleSentences.forEach(function(record){
|
||||||
});
|
var sample = $('<samp>').attr('lang', record.code || '').attr('xml:lang', record.code || '').append('<span class="langname">' + record.lang + '</span><span class="sentence">' + record.sample + '</span>');
|
||||||
$.getJSON(font.name + '.charmap', function(data){
|
div.append(sample);
|
||||||
var uhash = [];
|
});
|
||||||
var whash = [];
|
$.getJSON(fonts[0].name + '.charmap', function(data){
|
||||||
for(var j = 0; j < data.length; j++) {
|
var uhash = [];
|
||||||
var unicodes = data[j][1];
|
var whash = [];
|
||||||
if(unicodes && unicodes.length) for(var k = 0; k < unicodes.length; k++){
|
for(var j = 0; j < data.length; j++) {
|
||||||
uhash[unicodes[k]] = data[j][0].trim()
|
var unicodes = data[j][1];
|
||||||
whash[unicodes[k]] = data[j][2]
|
if(unicodes && unicodes.length) for(var k = 0; k < unicodes.length; k++){
|
||||||
}
|
uhash[unicodes[k]] = data[j][0].trim()
|
||||||
|
whash[unicodes[k]] = data[j][2]
|
||||||
}
|
}
|
||||||
for(var block = 0; block < (65536 / BLOCKSIZE); block++) {
|
}
|
||||||
var blockdiv = $('<div>').addClass('block');
|
for(var block = 0; block < (65536 / BLOCKSIZE); block++) {
|
||||||
var hasGlyphInThisBlock = false;
|
var blockdiv = $('<div>').addClass('block');
|
||||||
for(j = block * BLOCKSIZE; j < (block + 1) * BLOCKSIZE; j++) if(uhash[j]){
|
var hasGlyphInThisBlock = false;
|
||||||
hasGlyphInThisBlock = true;
|
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>' + (whash[j] ? '<d>\u25CC</d>\u25CC': '') + String.fromCharCode(j) + '</s></span>')
|
||||||
}
|
}
|
||||||
if(hasGlyphInThisBlock) {
|
div.append(blockdiv)
|
||||||
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>' + (whash[j] ? '<d>\u25CC</d>\u25CC': '') + String.fromCharCode(j) + '</s></span>')
|
});
|
||||||
}
|
|
||||||
div.append(blockdiv)
|
$('body').append(div);
|
||||||
}
|
fonts.forEach(function(font, fontindex){
|
||||||
};
|
|
||||||
});
|
|
||||||
divs.push(div);
|
|
||||||
$('body').append(div);
|
|
||||||
|
|
||||||
var a = $('<a>').attr('href', '#').append(font.display);
|
var a = $('<a>').attr('href', '#').append(font.display);
|
||||||
a.on('click', Click(fontindex));
|
a.on('click', Click(fontindex, font.cls));
|
||||||
links.push(a)
|
links.push(a)
|
||||||
$('#links').append(a);
|
$('#links').append(a);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user