CSS in reports
Phil Longstaff
plongstaff at rogers.com
Mon Jul 13 17:57:22 EDT 2009
On July 12, 2009 07:02:18 am Chris Dennis wrote:
> Phil Longstaff wrote:
> > You're right that any styling can be used. What I will probably do is
> > have 2 options pages, one for styling and one for fonts, and then
> > combine the results. For fonts, there is a font option type which uses
> > the font selector.
>
> I avoided using the font selector in my eguile reports because of the
> need to translate something like "URW Bookman L Bold Italic 12" into CSS
> syntax. But I suppose that's not really too hard.
Yes, this is what I do. The digits at the end of the string become the font
size, if "bold" is in the name, then font-weight becomes "bold", if "italic"
is in the name, then font-style becomes "italic". Whatever is left becomes
font-name.
In typography, that isn't really correct (bold and italic fonts are not really
just modifications of the base font), but it's good enough for now.
My routine is in stylesheet-css.scm, if you want to move it to some more
central place (report-utils?) so you can use it too.
Phil
More information about the gnucash-devel
mailing list