View Single Post
Old 09-28-2016, 09:33 AM   #9
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,741
Karma: 24031403
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Turtle91 View Post
Speaking of little wizards, has anyone thought of an "embed font" button that allows the user to select an external font file/family, imports those files into Sigil, and creates the proper @font-face reference in the CSS?? Seems like that would be a fairly simple combination of existing functionality (add existing files, paste clips) that would smooth the path for all users from novice to expert. It's a fairly common question for noobs, and would save several minutes for the rest.
Former MR member Rubeus uploaded such a plugin. When he left, I uploaded my own version of a plugin that should pretty much meet your requirements:

CSSFromFonts

Quote:
Originally Posted by Turtle91 View Post
The only difficulty I could see in creating the code would be determining if the file was normal/bold/italic/bolditalic and applying the proper css. Is there some easy way of determining which properties a font file includes?
The plugin uses "low level heuristics" to guesstimate the font weight and should be able to properly identify it, if the font designer followed the usual naming conventions.
Doitsu is offline   Reply With Quote