LuteOrg / lute-v3

LUTE = Learning Using Texts: learn languages through reading.
https://luteorg.github.io/lute-manual/
MIT License
497 stars 46 forks source link

Add support for custom fonts #42

Open jzohrab opened 12 months ago

jzohrab commented 12 months ago

Discord discussion notes with user "Jiggle":

before I was editing the original css files (styles, styles-compact) and was storing the font files in the same folder as these css files but unfortunately the custom_styles is not a static file as I understand

css file edits:

@font-face {
font-family: "MYFONT";
src: url("Rubik-Regular.woff") format("woff");

font-style: normal;
font-weight: normal;
}

if the font is in the same folder as the css file, it works

Notes:

jzohrab commented 12 months ago

Rubik-Regular.woff.txt

remove the .txt extension to see the font file.

fanyingfx commented 11 months ago

In Windows , I find the font installed local works well in browser, the css just like below, not sure for other system, maybe don't need to touch the docker?

@font-face {
    font-style: normal;
    font-family: "IPAexGothic";
    src: local("IPAexGothic")
}
jzohrab commented 11 months ago

not sure for other system

Not sure, the original user said things weren't working. This was for a custom font. Needs investigation.

kekeqwq commented 6 months ago
body {
  font-family: "IBM Plex Serif", serif;
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/ibmplexserif/v19/jizAREVNn1dOx-zrZ2X3pZvkTi2k_iI5q1vxiQ.woff2) format('woff2');
}

work for me

lef-est commented 5 months ago

CSS works. But my problem with the current options is: I have 3 sets of colors saved as themes, if I also want to switch between 3 fonts I'd have to prepare 3x3=9 css files. That would still be acceptable, if in Lute I have the option to select any theme at will, but no, I can only cycle through all of them...

jzohrab commented 5 months ago

@lef-est - You can select a theme on the settings page, you don’t have cycle through all of them. 👋