Skip to content

Commit

Permalink
Add missing font preview files
Browse files Browse the repository at this point in the history
Close #403
  • Loading branch information
melmothx committed Nov 14, 2022
1 parent 5025010 commit e28de2f
Show file tree
Hide file tree
Showing 27 changed files with 141 additions and 13 deletions.
16 changes: 16 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,10 @@ root/static/images/fontpreview/DejaVu-Sans.pdf
root/static/images/fontpreview/DejaVu-Sans.png
root/static/images/fontpreview/DejaVu-Serif.pdf
root/static/images/fontpreview/DejaVu-Serif.png
root/static/images/fontpreview/FandolHei.pdf
root/static/images/fontpreview/FandolHei.png
root/static/images/fontpreview/FandolSong.pdf
root/static/images/fontpreview/FandolSong.png
root/static/images/fontpreview/Fira-Sans.pdf
root/static/images/fontpreview/Fira-Sans.png
root/static/images/fontpreview/FreeSerif.pdf
Expand Down Expand Up @@ -1340,6 +1344,18 @@ root/static/images/fontpreview/Rubik.pdf
root/static/images/fontpreview/Rubik.png
root/static/images/fontpreview/Scheherazade.pdf
root/static/images/fontpreview/Scheherazade.png
root/static/images/fontpreview/Source-Han-Sans-K.pdf
root/static/images/fontpreview/Source-Han-Sans-K.png
root/static/images/fontpreview/Source-Han-Sans-SC.pdf
root/static/images/fontpreview/Source-Han-Sans-SC.png
root/static/images/fontpreview/Source-Han-Sans.pdf
root/static/images/fontpreview/Source-Han-Sans.png
root/static/images/fontpreview/Source-Han-Serif-K.pdf
root/static/images/fontpreview/Source-Han-Serif-K.png
root/static/images/fontpreview/Source-Han-Serif-SC.pdf
root/static/images/fontpreview/Source-Han-Serif-SC.png
root/static/images/fontpreview/Source-Han-Serif.pdf
root/static/images/fontpreview/Source-Han-Serif.png
root/static/images/fontpreview/Source-Sans-Pro.pdf
root/static/images/fontpreview/Source-Sans-Pro.png
root/static/images/fontpreview/Space-Mono.pdf
Expand Down
23 changes: 23 additions & 0 deletions font-preview/ar.muse
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#title test
#lang ar
جرم في النظام الشمسي يقع مداره حول الشمس خلف مدار كوكب نبتون. وتنقسم
هذه المنطقة من النظام الشمسي إلى ثلاثة أجزاء رئيسية: حزام كويبر
والقرص المبعثر وسحابة أورط.


أول جرم وراء نبتونيّ اكشتف هو بلوتو، والذي اكتشفه كلايد تومبو في عام
1930. وقد أخذ الأمر 60 عاماً لاكتشاف جرم آخر وراء نبتون، فقد اكتشف ثاني
هذه الأجرام في عام 1992 وهو "(15760) 1992 QB1" (بالرغم من أن قمر بلوتو
المسمى شارون اكتشف قبل هذا الجرم في عام 1978). لكن وبالرغم من هذه
المدة الطويلة بين اكتشاف الأجرام الثلاثة الأولى، فمنذ اكتشاف الثالث
عام 1992 وحتى اليوم ارتفع عدد المعروفة منها إلى ما يزيد على 1,000 جرم،
تملك أحجاماً ومدارات وخصائص مختلفة. ويُعتقد أنه يوجد في حزام كويبر وحده
أكثر من 70,000 من الأجرم التي يزيد قطرها عن 100 كم. وفي تشرين
الثاني/نوفمبر 2009، كانت مدارات 198 من الأجرام الوراء نبتونية المعروفة
محدّدة بشكل جيّد وصنّفت كنتيجة لذلك مع الكواكب الصغيرة.


أكبر جرم وراء نبتوني معروف هو إيريس (الذي اكتشف عام 2005)، ويليه بلوتو
ثم ميكميك ثم هاوميا.

5 changes: 0 additions & 5 deletions font-preview/font-preview.muse
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#title Font preview

Example file for testing fonts.

* * * * *

Dashes: em-dash: — en-dash –

The Quick Brown Fox Jumps Over The Sleazy Dog 01234567989.
Expand Down
31 changes: 23 additions & 8 deletions font-preview/generate.pl
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,31 @@
die "Missing input file.json" unless ($file && -f $file);
die "Missing destination directory" unless ($dest && -d $dest);

my @fonts = sort map { $_->name } Text::Amuse::Compile::Fonts->new($file)->all_fonts;
print Dumper(\@fonts);
my @fonts = Text::Amuse::Compile::Fonts->new($file)->all_fonts;

foreach my $font (@fonts) {
foreach my $ff (@fonts) {
my $font = $ff->name;
my $pdf = $font;
$pdf =~ s/ /-/g;
$pdf .= '.pdf';
my $fdest = path($dest, $pdf);
next if $fdest->exists;

my $muse = 'font-preview.muse';
if ($ff->has_languages) {
foreach my $lang (@{ $ff->languages }) {
if (-f "$lang.muse") {
$muse = "$lang.muse";
last;
}
}
}
my $muse_pdf = $muse;
$muse_pdf =~ s/\.muse$/\.pdf/;

my $c = Text::Amuse::Compile->new(
pdf => 1,
luatex => 1,
fontspec => $file,
cleanup => 1,
extra => {
Expand All @@ -34,16 +48,17 @@
nocoverpage => 1,
fontsize => 11,
mainfont => $font,
body_only => 1,
},
);
$c->purge('font-preview.muse');
$c->compile('font-preview.muse');
$c->purge($muse);
$c->compile($muse);
my $png = "$fdest";
$png =~ s/\.pdf$/.png/;
system(qw/convert -density 150 -trim -quality 100 -sharpen 0x1.0/, 'font-preview.pdf[1]', $png) == 0
system(qw/convert -density 150 -trim -quality 100 -sharpen 0x1.0/, $muse_pdf . '[0]', $png) == 0
or die "Couldn't convert $pdf to $png $!";
path('font-preview.pdf')->move("$fdest");
$c->purge('font-preview.muse');
path($muse_pdf)->move("$fdest");
$c->purge($muse);
print "Generated $fdest\n";
}

Expand Down
27 changes: 27 additions & 0 deletions font-preview/ja.muse
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#title Test
#lang ja
一般に落葉樹のものが有名であり、秋に一斉に紅葉する様は観光の対象ともさ
れる。カエデ科の数種を特にモミジと呼ぶことが多いが、実際に紅葉が鮮やか
な木の代表種である。また、秋になると草や低木の葉も紅葉し、それらを総称
して「草紅葉(くさもみじ)」ということがある。

狭義には、赤色に変わるのを「紅葉(こうよう)」、黄色に変わるのを「黄葉
(こうよう、おうよう)」、褐色に変わるのを「褐葉(かつよう)」と呼ぶが、
これらを厳密に区別するのが困難な場合も多く、いずれも「紅葉」として扱わ
れることが多い。また、同じ種類の木でも、生育条件や個体差によって、赤く
なったり黄色くなったりすることがある。葉が何のために色づくのかについて
は、植物学的には葉の老化反応の一部と考えられている。

なお、常緑樹も紅葉するものがあるが、緑の葉と一緒の時期であったり、時期
がそろわなかったりするため、目立たない。ホルトノキは、常に少数の葉が赤
く色づくのが見分けの目安になっている。常緑針葉樹だるスギやコノテガシワ
は冬には茶色に変色する。

日本における紅葉は、9月頃から北海道の大雪山を手始めに始まり、徐々に南
下する。紅葉の見頃の推移を桜前線と対比して「紅葉前線」と呼ぶ。紅葉が始
まってから完了するまでは約1か月かかる。見頃は開始後20〜25日程度で、時
期は北海道と東北地方が10月、関東から九州では11月から12月初め頃まで。

ただし、山間部や内陸では朝晩の冷え込みが起こりやすいために、通常これよ
り早い。
22 changes: 22 additions & 0 deletions font-preview/ko.muse
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#title test
#lang ko


프랑크푸르트 국민의회

프랑크푸르트 국민의회(독일어: Frankfurter Nationalversammlung)는
1848년 독일 혁명으로 설치된 입헌 기관으로서, 1848년 5월 18일부터
1849년 5월 31일까지 프랑크푸르트의 파울 교회에서 열렸다. 빈 체제로
성립된 독일 연방은 자유주의와 민족주의가 추구하던 민족국가와는 거리가
멀었고, 3월 혁명이 일어나 통일 국가 형성 운동이 힘을 얻게 된다. 독일
연방의 연방의회는 1848년 3월 말과 4월 초 사이에 연방투표법을 결의하여
독일 주민들이 국민의회를 선출할 수 있도록 하였고, 독일 최초로 자유
선거를 통해 의회가 구성된다.

국민의회는 프랑크푸르트 헌법을 1849년 3월 28일 가결했다. 이 헌법은
1848년 3월 혁명 전야기에 1815년 이후의 반동적인 메테르니히 체제에
반대하여 일어난 자유주의와 국민국가주의 운동의 본질적 요구를 반영한
것이었다. 프랑크푸르트 국민의회와 그 결과물인 프랑크푸르트 헌법은
프로이센 왕 프리드리히 빌헬름 4세가 그에게 추대된 독일 황제의 자리를
거부하면서 좌절되었다.
30 changes: 30 additions & 0 deletions font-preview/zh.muse
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#title Test
#lang zh
我们对于社会运动的传统想象总是以夺取主权作为终极目标,而从墨西哥萨帕
塔人的海螺社区到叙利亚罗贾瓦的社会革命等迸发于二十一世纪的很多运动,
则带给了我们不同的对解放的想象——一种并非通过挑战既定权力,而是通过实
现自治而运作的政治。它们以传染性的方式开枝散叶,以日常实践作为抵抗。
在权力无孔不入、传统社会运动难以开展的当下,这种政治想象和实践本身无
疑是极具启发性的。

在那些为人熟知的明星社区外,墨西哥的“潘乔斯”(Panchos)则是又一个边缘
地带的平民实践。阿卡帕心歌社区(Acapatzingo)位于墨西哥城边缘,这里的
居民大多是无力承担大都市生活成本的贫民,为了满足基本的住房需求搬来这里,
成为革命共产主义组织“潘乔斯”的一员。阿卡帕心歌的特殊之处在于自治的确立,
本文着重讨论的社区农业委员会体现了自治的两个方面:一方面,它以实现自给
自足的自治为目标,通过集体劳动满足居民的生活需要,争取摆脱对资本的依赖;
另一方面,集体实践中的讨论与知识共享,也是正在运作的自治本身。

社区中,激进政治与生存并不是截然分开的两方面,而是不可拆分的。集体劳动
的自治实践可以满足人的生存所需,对社区自治活动的参与也让每个人的特殊技
能有机会得到他人的赏识,从而建立起不同于异化关系的另一种人际关系。参与
社区生活不仅满足了人的生存需求,更是为“有尊严的生活”创造了条件。

因此,这些“使人得以在破碎的现实中生存下来”的自治实践与关系,也是用于
“组装出其他形式的生活、产生诸多新世界的原材料。”而这种不再以国家为政治
斗争的中心地带、不再以对抗和建立新主权为导向,而是在日常生活实践中集体
地创造新的生活方式与新世界的力量,正是阿甘本等人所说的“废宪权力”。在他
们看来,新的“社会主人翁”不再把权力看做是位于国家系统中的东西,而是立足
于直接的日常生活实践。集体的日常实践,可以把人们生存的必需性转化为解放
的可能性的物质基础。比起传统的“社会运动”,它更像是一个“运动中的社会”。
Binary file modified root/static/images/fontpreview/Amiri.pdf
Binary file not shown.
Binary file modified root/static/images/fontpreview/Amiri.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added root/static/images/fontpreview/FandolHei.pdf
Binary file not shown.
Binary file added root/static/images/fontpreview/FandolHei.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added root/static/images/fontpreview/FandolSong.pdf
Binary file not shown.
Binary file added root/static/images/fontpreview/FandolSong.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified root/static/images/fontpreview/Scheherazade.pdf
Binary file not shown.
Binary file modified root/static/images/fontpreview/Scheherazade.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e28de2f

Please sign in to comment.