Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.htaccess for fonts #17

Open
funderburkjim opened this issue Jul 30, 2020 · 1 comment
Open

.htaccess for fonts #17

funderburkjim opened this issue Jul 30, 2020 · 1 comment

Comments

@funderburkjim
Copy link
Contributor

In working with some new codings of Sanskrit Dictionary displays, an experiment was made of running an html application
on local machine with a non-xampp server (namely python -m http.server 8085).
In displaying a dictionary entry with Devanagari output, the 'siddhanta.ttf' network font was specified via the css font-face:

@font-face { 
 src: url(http://localhost/cologne/csl-apidev/fonts/siddhanta.ttf),
      url(https://sanskrit-lexicon.uni-koeln.de/scans/csl-apidev/fonts/siddhanta.ttf );

This first resulted in a CORS error, which blocked loading of the application.

This stackoverflow article
showed a solution: put a .htaccess file in the fonts folder in csl-apidev, containing

<FilesMatch "\.(eot|ttf|otf|woff)$">
    Header set Access-Control-Allow-Origin "*"
</FilesMatch>

I did this, and the original problem went away and the siddhanta font was used as expected.

funderburkjim added a commit that referenced this issue Jul 30, 2020
@gasyoun
Copy link
Member

gasyoun commented Jul 31, 2020

Great, actually for Latin text not all dictionaries have a custom font as well but they sure better would.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants