[sword-devel] Font size specification inside <divinename></divinename>

Greg Hellings greg.hellings at gmail.com
Fri Jun 24 18:39:09 MST 2011

On Fri, Jun 24, 2011 at 5:46 PM, DM Smith <dmsmith at crosswire.org> wrote:
> On Jun 24, 2011, at 5:57 PM, Greg Hellings wrote:
>> On Fri, Jun 24, 2011 at 1:52 PM, DM Smith <dmsmith at crosswire.org> wrote:
>>> On 06/24/2011 01:03 PM, Troy A. Griffitts wrote:
>>> Yeah, for sure.  We also have this problem on swordweb. Any ideas?  I
>>> thought at one time we were supplying a + size on the first letter or
>>> something.  Any bright ideas welcome.
>>> Is there any reason not to use small caps? I.e.
>>> <divineName>Lord</divineName> becomes <span style="font-variant:
>>> small-caps">Lord</span>?
>>> For BibleDesktop we don't have span, so we use the equivalent of <font
>>> style="font-variant: small-caps">Lord</font>. It works quite well.
>> I think it would be more in line with what Troy has mentioned we would
>> like to move towards if we did <span class="divineName">Lord</span>
>> and then the application can display it as appropriate with CSS class
>> definitions (akin to how David mentions it).  If that's where we want
>> to go, why can't we just head that way now?
> I think it was because GnomeSword could not use CSS. I don't know if xiphos' use of xulrunner or it's replacement webkit has any problems with external stylesheets.
> One solution would be to deprecate the current render, leaving it as is and create a clone of it that uses span and class for elements.
> In Him,
>        DM

My understanding is that gtkhtml cannot handle _external_ stylesheets
and that it does not have advanced CSS support, but that it does
support CSS1 and some of CSS2, so the stylesheet could be placed in
the header of the HTML template.  Either way, gtkhtml and Xul are both
being deprecated in Xiphos as we speak in favor of Webkit, which
supports a very large host of CSS 1, 2 and even CSS 3.  By using a
class="divinename" instead of style="font-variant: small-caps" you can
allow the application to select whatever it wants to do for Divine
Name (or, heaven forbid it, allow the module to define an external
stylesheet that specifies how a divine name be rendered - if at all!)
rather than forcing it on them from the renderer.


More information about the sword-devel mailing list