After lots struggling, searching and researching, I finally found a working 
solution, which I am posting it here just for future reference to help out 
anyone who might want to do the same.

I have seen several posts here about using custom fonts under TiddlyWiki 5 
most focus on external third party font services like Google Fonts 
<https://groups.google.com/d/msg/tiddlywiki/HynvAJZ21_8/-jyW5yzDfZAJ> or Font 
Awesome 
<http://blog.jeffreykishner.com/2014/01/23/how-to-incorporate-font-awesome-icons-into-tiddlywiki-5.html>,
 
some try embedding custom 
<https://groups.google.com/d/msg/tiddlywiki/utsLmgHZAhM/B8tHIRTjJYMJ> font 
files using base64 encodind 
<https://www.fontsquirrel.com/tools/webfont-generator> inside the 
tiddlywiki file.
All I wanted was a simple way to use a locally installed external font 
file, preferably using a basic relative path.

Just create a new tiddler with whatever name you want, tag it with 
$:/tags/Stylesheet 
and add the following content to it, customizing where necessary


@font-face {
    font-family: myFontFamily;
    src: url(Font_File.ttf);
}


.tc-title{
  color: red;
  font-family: "myFontFamily" , sans-serif;
}


Adjust the src: url() part to a path pointing to your ttf otf or woff file, 
and adjust .tc-title to style whatever part of the wiki you wish.

Hope this helps anywome in the future

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/be846fa4-208e-45c5-96e1-26f2c7b75ddd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to