Skip to content

Commit

Permalink
Add Noto/Roboto script style matching demo #108
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Lewis committed Sep 17, 2019
1 parent 4e1007f commit 2a37352
Show file tree
Hide file tree
Showing 23 changed files with 146 additions and 2 deletions.
64 changes: 64 additions & 0 deletions _examples/scripts/multiscript-style-match-bold.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
breadcrumbs: ["Scripts", "Examples…"]
title: Multiscript style matching
description: Here, Roboto’s weight is adjusted to match Noto Bold as a fallback.
playground: true
comparison:
-
font: Roboto-Delta
size: fit
text: <span class='noto'>我的征途是星辰大海</span> MY CONQUEST
# label: Default
axes:
opsz: 12.1
wght: 700
-
font: Roboto-Delta
size: fit
text: <span class='noto'>我的征途是星辰大海</span> MY CONQUEST
# label: YTUC ≈ YTCH = XTCH
axes:
opsz: 12.1
wght: 700
wdth: 108.5
YTDE: -200
YTUC: 760
-
font: Roboto-Delta
size: fit
text: <span class='noto'>我的征途是星辰大海</span> My Conquest is
# label: Default
axes:
opsz: 12.1
wght: 700
-
font: Roboto-Delta
size: fit
text: <span class='noto'>我的征途是星辰大海</span> My Conquest is
# label: YTUC + YTDE ≈ YTCH = XTCH
axes:
opsz: 12.1
wght: 700
wdth: 108.5
YTDE: -125
YTAS: 835
YTUC: 760
YTLC: 570
---
<style>
@font-face {
font-family: "Noto CJK Simplified";
font-weight: normal;
src: url("{{site.baseurl}}/fonts/NotoSansCJKsc-hinted/conquest/NotoSansMonoCJKsc-Regular.woff2") format("woff2");
}

@font-face {
font-family: "Noto CJK Simplified";
font-weight: bold;
src: url("{{site.baseurl}}/fonts/NotoSansCJKsc-hinted/conquest/NotoSansMonoCJKsc-Bold.woff2") format("woff2");
}

.specimen .noto {
font-family: "Noto CJK Simplified", sans-serif;
}
</style>
66 changes: 66 additions & 0 deletions _examples/scripts/multiscript-style-match-regular.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
breadcrumbs: ["Scripts", "Examples…"]
title: Multiscript style matching
description: >
Line one shows the default, where Roboto uppercase is slightly heavier and shorter.
Line two is adjusted to a lighter weight and taller caps.
Line three shows the defaults with mixed case,
and line four shows the Latin lowercase descenders shortened to match the Chinese descent.
playground: true
comparison:
-
font: Roboto-Delta
size: fit
text: <span class='noto'>我的征途是星辰大海</span> MY CONQUEST
# label: Default
axes:
opsz: 12.1
-
font: Roboto-Delta
size: fit
text: <span class='noto'>我的征途是星辰大海</span> MY CONQUEST
# label: YTUC ≈ YTCH = XTCH
axes:
opsz: 12.1
wght: 341
wdth: 108.5
YTDE: -200
YTUC: 760
-
font: Roboto-Delta
size: fit
text: <span class='noto'>我的征途是星辰大海</span> My Conquest is
# label: Default
axes:
opsz: 12.1
-
font: Roboto-Delta
size: fit
text: <span class='noto'>我的征途是星辰大海</span> My Conquest is
# label: YTUC + YTDE ≈ YTCH = XTCH
axes:
opsz: 12.1
wght: 341
wdth: 108.5
YTDE: -125
YTAS: 835
YTUC: 760
YTLC: 570
---
<style>
@font-face {
font-family: "Noto CJK Simplified";
font-weight: normal;
src: url("{{site.baseurl}}/fonts/NotoSansCJKsc-hinted/conquest/NotoSansMonoCJKsc-Regular.woff2") format("woff2");
}

@font-face {
font-family: "Noto CJK Simplified";
font-weight: bold;
src: url("{{site.baseurl}}/fonts/NotoSansCJKsc-hinted/conquest/NotoSansMonoCJKsc-Bold.woff2") format("woff2");
}

.specimen .noto {
font-family: "Noto CJK Simplified", sans-serif;
}
</style>
5 changes: 3 additions & 2 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ <h3>Scripts</h3>
<ul>
<li><a href="/topics/scripts/">Scripts primer</a></li>
<li><a href="/topics/scripts/variations">Multiple scripts</a></li>
<li><label>Example:</label>
<li><label>Examples:</label>
<ul>
<li><a href="/topics/scripts/examples">Multiscript alignment</a></li>
<li><a href="/topics/scripts/examples/style-matching">Style matching</a></li>
<li><a href="/topics/scripts/examples/alignment">Multiscript alignment</a></li>
</ul>
</li>
</ul>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
13 changes: 13 additions & 0 deletions topics/scripts/examples/style-matching.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
layout: article
breadcrumbs: ["Scripts", "Examples…"]
sidebar: "Example"
title: "Multi-script style matching"
---
Making your Latin sans serif work with fallback fonts from other scripts is a common need in typography.
This is well demonstrated by [FauxFoundry](https://www.fauxfoundry.com/), for Greek.
Here we demonstrate Roboto matching Chinese in Noto, a common fallback for CJK.

{% include inline-example.html example="multiscript-style-match-regular" %}

{% include inline-example.html example="multiscript-style-match-bold" %}

0 comments on commit 2a37352

Please sign in to comment.