antijingoist / opendyslexic

OpenDyslexic, a typeface that uses typeface shapes & features to help offset some visual symptoms of Dyslexia. Now in SIL-OFL.
https://opendyslexic.org
Other
635 stars 39 forks source link

Unable to change color with CSS on webpage #66

Open Polarisation opened 3 years ago

Polarisation commented 3 years ago

Describe the bug Using the fonts from this repo, I am unable to change color via a color: CSS rule when using on a webpage. The font color is always black. This is the case whether I use the .woff or .woff2 files from this repo with @font-face, or the .otf installed locally.

To Reproduce

@font-face {
    font-family: "OpenDyslexic";
    src: url("/assets/fonts/OpenDyslexic-Regular.woff2") format("woff2"),
      url("/assets/fonts/OpenDyslexic-Regular.woff") format("woff");
}

* {
    font-family: "OpenDyslexic", sans-serif;
   color: #fff; /* should be white but is black */
}

Expected behavior Expected to be able to change font color.

On opendyslexic.org the font is shown in different colors. It uses a different font file, a .ttf which is not included in this repo.

Desktop (please complete the following information):

matiastucci commented 2 years ago

@Polarisation did you find a solution for this? I'm having the same issue.

FYI I found a hacky way:

color: transparent;
text-shadow: 0 0 0 red;
Polarisation commented 2 years ago

No but there's some older versions of OpenDyslexic floating around the internet which work. I found a .ttf which worked for me... maybe one of these: https://fontlibrary.org/en/font/opendyslexic