How to Use Local Font File In custom.css

Aha! I found it. The only true documentation is the source code LOL.

Check out this function:

(defn expand-relative-assets-path
  "Resolve all relative links in custom.css to assets:// URL"
  ;; ../assets/xxx -> {assets|file}://{current-graph-root-path}/xxx

Apparently if you have a ../assets/[something] path in your CSS file it will automatically replace that with the path to the assets dir.

So I was able to do something like this in my custom css:

@font-face {
    font-family: 'Yozai';
    src: url('../assets/../fonts/Yozai-Regular.ttf')
}

.ls-block[data-refs-self*="hanzi"] .block-content {
  font-family: 'Yozai', sans-serif !important;
  font-size: 2.2em !important;
  letter-spacing: 0.03em;
    
  a[data-ref="hanzi"] {
    font-size: 0.25em;
  }
}