From db848c219c63e0f24412e160782cddb86f5d950c Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 18 Jan 2023 21:45:29 -0500 Subject: Add JetBrains Mono --- docs/JetBrainsMono_sub.woff2 | Bin 0 -> 173400 bytes docs/fonts.html | 41 +++++++++++++++++++++++++++++++++++++++++ docs/repl.js | 4 ++-- docs/style.css | 7 ++++++- 4 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 docs/JetBrainsMono_sub.woff2 (limited to 'docs') diff --git a/docs/JetBrainsMono_sub.woff2 b/docs/JetBrainsMono_sub.woff2 new file mode 100644 index 00000000..e3fd214d Binary files /dev/null and b/docs/JetBrainsMono_sub.woff2 differ diff --git a/docs/fonts.html b/docs/fonts.html index 1e44081a..a2bc9c96 100644 --- a/docs/fonts.html +++ b/docs/fonts.html @@ -39,6 +39,7 @@
  • 3270, based on the IBM 3270 terminal family
  • Iosevka family: Extended Term shown here; many options available
  • Julia Mono
  • +
  • JetBrains Mono
  • Other than DejaVu and BQN386, the versions embedded on this page are small subsets, and you should get your copy from the links above (unless perhaps you want to use them for embedding as well). In addition to these, Pragmata Pro and Everson Mono have full support, but each charges a significant fee for usage and I can't freely embed them here.

    @@ -146,6 +147,25 @@ Iosevka Term Extended β‰π•€β†•π•—π•˜βŠΈβˆ˜β—‹βŸœβ‹„β†© β†–π•Š 𝔽𝔾« βŒΎΒ»Β·Λ™ β₯Šπ•©β†“βˆ¨βŒŠ β‰‘βˆΎβ‰β‰  β€Ώ β‹ˆπ• β’βŒˆ ≒≀β‰₯⇐ +⍬⍺⍡⍴⍳⍸⌷⍨⍀β₯β£βŠ–βŠ‚βŠƒβŠ†βŠ‡βˆ©βˆͺβŠ₯βŠ€ββ€βŒΏβͺ +βŽ•βŒΊβŒΉβŒΈβžβ βŒΆβ±β²β«βˆ‡βˆ†β’β™β€¦ + + + + + + +
    JetBrains Mono
    +
    `1234567890-= ~!@#$%^&*()_+
    + qwertyuiop[]  QWERTYUIOP{}
    + asdfghjkl;'\  ASDFGHJKL:"|
    + zxcvbnm,./    ZXCVBNM<>?
    +
    +˜˘¨⁼⌜´˝ βˆžΒ―β€’Γ·Γ— Β¬βŽ‰βš‡βŸβ—ΆβŠ˜βŽŠβŽβ•βŸ¨βŸ©βˆšβ‹†
    + βŒ½π•¨βˆŠβ†‘βˆ§ βŠ”βŠβŠΟ€β†β†’  β†™π•Žβ·π•£β‹  βŠ‘βŠ’β³βŠ£βŠ’
    + β‰π•€β†•π•—π•˜βŠΈβˆ˜β—‹βŸœβ‹„β†©   β†–π•Š 𝔽𝔾« βŒΎΒ»Β·Λ™
    + β₯Šπ•©β†“βˆ¨βŒŠ β‰‘βˆΎβ‰β‰  β€Ώ  β‹ˆπ• β’βŒˆ ≒≀β‰₯⇐
    +
     ⍬⍺⍡⍴⍳⍸⌷⍨⍀β₯β£βŠ–βŠ‚βŠƒβŠ†βŠ‡βˆ©βˆͺβŠ₯βŠ€ββ€βŒΏβͺ
     βŽ•βŒΊβŒΉβŒΈβžβ βŒΆβ±β²β«βˆ‡βˆ†β’β™β€¦
     
    @@ -269,6 +289,25 @@ Iosevka Term Extended } +
    JetBrains Mono
    +
    +  c←𝕩='#'β‹„s←/0β€Ώ0⊸«⊸∧sm←𝕩='''β‹„d←/dm←𝕩='"'
    +  g←⍋qβ†βˆΎβŸ¨  sβ‹„Β―1↓dβ‹„/c⟩ β‹„q↩g⊏q                # Open indices
    +  e← g⊏∾⟨2+sβ‹„ 1↓dβ‹„-⟜»∘⊏⟜(0∾+`c)⊸//(𝕩=lf)∾1⟩ # Matching close indices
    +  Se←{(βŠΛœπ•¨)Se 1¨⌾((𝕩/𝕨)⊸⊏)𝕩}⍟(0=Β―1βŠ‘βŠ’)       # Mark reachable openings
    +
    +PrecedesGroup ← {
    +  # We prepend a 0 to 𝕨, so that 0 is the "before start" index, with a
    +  # false value, and normal indices are increased by 1.
    +  𝕨 βˆΎΛœβ†© 0
    +  inds ← 1 + ↕≠𝕩
    +  # Zero out indices where 𝕩 was true, and find the greatest index so
    +  # far at each position.
    +  last ← ⌈` inds Γ— ¬𝕩
    +  last ⊏ 𝕨
    +}
    +
    +

    Finally, a REPL where you can enter any code you like (but remember, not all characters from these fonts are embeddedβ€”just those likely to be used in BQN).

    @@ -284,6 +323,8 @@ Iosevka Term Extended + +
    diff --git a/docs/repl.js b/docs/repl.js index 46fc5b5c..cff7d1ac 100644 --- a/docs/repl.js +++ b/docs/repl.js @@ -190,8 +190,8 @@ appendHTML(doc.kb, '
    '); doc.kbext = doc.kb.querySelector('.kbext'); if (doc.demo) { - let fonts=[["BQN386"],["DejaVu","Mod"],["Fairfax","HD"],["3270","font"],["Iosevka","Term"],["Julia","Mono"]]; - let fclass = f => f==="3270"?"f"+f:f + let fonts=[["BQN386"],["DejaVu","Mod"],["Fairfax","HD"],["3270","font"],["Iosevka","Term"],["Julia","Mono"],["JetBrains","Mono"]]; + let fclass = f => f==="3270"?"f"+f:f==="JetBrains"?"JetBr":f; let fontsel = '