I was hoping to use existing code from
calibre.ebooks.oeb.polish.subset, specifically
subset_all_fonts, to build some extra functionality into one of my personal plugins.
The problem I'm seeing is that text which will be displayed by a CSS rule such as:
Code:
.tx1::first-line {font-family: MySmallcapsFont;}
doesn't seem to be taken into account when the existing subsetting code is deciding which characters need to be retained in the
MySmallcapsFont font. In the worst-case scenario, if the above CSS rule was the only one referencing
MySmallcapsFont then currently this font would be completely removed from the container.
I do understand that calibre has no idea which/how many characters will appear on the first-line but I wonder if it's possible to have some sort of compromise, i.e. keep all characters used by
class="tx1", i.e. the main part of the selector. Just a personal opinion but I'd rather keep too many than too few.
If this is a non-starter then I'll just have to live with it, but if it's something you'd consider fixing/improving I'm happy to open a bug report with a sample epub.