summaryrefslogtreecommitdiff
path: root/docs/index.html
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@figma.com>2019-05-27 03:19:55 +0300
committerRasmus Andersson <rasmus@figma.com>2019-05-27 03:19:55 +0300
commit2a6051f020cce3cbc0b6228fed46c3634938cfce (patch)
treee65c3fa8680291b12a833b394f92cc1db8d759fc /docs/index.html
parent3b82d38170ee373901828c1651b9b30f96368489 (diff)
downloadinter-2a6051f020cce3cbc0b6228fed46c3634938cfce.tar.xz
v3.6v3.6
Diffstat (limited to 'docs/index.html')
-rw-r--r--docs/index.html67
1 files changed, 62 insertions, 5 deletions
diff --git a/docs/index.html b/docs/index.html
index 4615a0564..30d1a1b02 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -296,6 +296,54 @@ html { font-family: 'Inter', sans-serif; }
</p>
</div></div>
+
+<div class="row white charset-title" id="charset">
+ <h2><a href="#charset">Character set</a></h2>
+</div>
+<script>
+
+function csc(node) {
+ copyToClipboard(node.innerText + " " + node.title)
+
+ // flash the glyph
+ clearTimeout(node._flashTimer)
+ if (node.classList.contains('flash')) {
+ node.classList.remove('flash')
+ if (typeof requestAnimationFrame != 'undefined') {
+ requestAnimationFrame(function(){ node.classList.add('flash') })
+ } else {
+ setTimeout(function(){ node.classList.add('flash') }, 1)
+ }
+ } else {
+ node.classList.add('flash')
+ }
+ node._flashTimer = setTimeout(function(){
+ node.classList.remove('flash')
+ }, 300)
+}
+
+</script>
+<div class="row white charset">
+ <div class="charset-table">
+ {% for g in site.data.glyphinfo.glyphs %}
+ {% comment %}
+
+ Ignore empty glyphs and glyphs without unicode mapping.
+
+ {% endcomment %}
+ {% if g[1] == 0 and g[2] %}
+ {% if g[3] %}
+ <c title="/{{g[0]}} U+{{g[2]}} ({{g[3]}})" onclick="csc(this)">&#x{{g[2]}}</c>
+ {% else %}
+ <c title="/{{g[0]}} U+{{g[2]}}" onclick="csc(this)">&#x{{g[2]}}</c>
+ {% endif %}
+ {% endif %}
+ {% endfor %}
+ </div>
+
+</div>
+
+
<div class="row white"><div>
<h2><a id="story" href="#story">The story behind Inter</a></h2>
<div flow-cols=2 flow-cols-s=1>
@@ -461,10 +509,22 @@ for (i = 0; i < av.length; ++i) {
})();
+// clipboard copy
+var copyToClipboard = (function(){
+ var hiddenTextInput = $('#hidden-text-input')
+ return function(text) {
+ hiddenTextInput.value = text
+ hiddenTextInput.select()
+ document.execCommand("copy")
+ hiddenTextInput.value = ""
+ HUDNotification.show('Copied to clipboard')
+ }
+})();
+
+
// dynamic metrics calculator
(function(){
-var hiddenTextInput = $('#hidden-text-input')
var fontSizeEl = $('#dynmet-font-size')
var trackingEl = $('#dynmet-tracking')
var unitEl = $('#dynmet-unit')
@@ -529,11 +589,8 @@ function onPointerdownTracking(ev) {
ev.preventDefault()
ev.stopPropagation()
}
- hiddenTextInput.value = trackingEl.value + unitEl.innerText
- hiddenTextInput.select()
- document.execCommand("copy")
+ copyToClipboard(trackingEl.value + unitEl.innerText)
trackingEl.select()
- HUDNotification.show('Copied to clipboard')
}
var passiveListener = { passive: true, capture: false }