View Single Post
Old 09-10-2019, 08:44 AM   #1
AliceWonder
Connoisseur
AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.AliceWonder ought to be getting tired of karma fortunes by now.
 
Posts: 97
Karma: 200000
Join Date: Aug 2019
Device: none
Possible bug but maybe not

To place text precisely over an image, I am using an svg node within xhtml.

A style node within that svg node doesn't let me specify fonts, but I can define the rules within a CSS file referenced in the xhtml head and it works.

For example:

Code:
text.title {
  font-family: 'Liberation Mono', monospace;
  font-weight: bold;
}
tspan.tblue {
  fill: red;
}
text.tagline {
  font-family: 'Liberation Sans', sans-serif;
  font-style: italic;
  font-weight: bold;
}
text.code {
  font-family: 'Liberation Mono', monospace;
  font-weight: bold;
  fill: lightgray;
}
text.aut {
  font-family: 'Liberation Mono', monospace;
  font-weight: bold;
  fill: red;
}
When I run the "run check" from the Calibre Editor it gives me warning because fill is not a CSS name that has any meaning to HTML but it does have meaning in SVG.

It works in readers (including Calibre) I have tried.

What I do not know is if the warning is a bug in Calibre (e.g. it should allow SVG names too) or if it is intentional because some readers may ignore SVG specific CSS names.

Just mentioning it in case it is considered a bug.
AliceWonder is offline   Reply With Quote