Ignore:
Timestamp:
2013-01-15T23:15:34+13:00 (11 years ago)
Author:
davidb
Message:

Now correctly accounts for bold, italic and bold-italic text.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/html-to-expeditee/trunk/src/src/js/html-to-expeditee.js

    r26728 r26729  
    66var font_color;
    77var font_weight;
     8var font_style;
    89
    910Element.prototype.getElementWidth = function() {
     
    161162           
    162163            var new_font_weight = getStyle(parent,"font-weight");
     164            var new_font_style = getStyle(parent,"font-style");
    163165           
    164166            if(new_font_family !== undefined && new_font_family !== null)
     
    173175            if(new_font_weight !== undefined && new_font_weight !== null)
    174176                font_weight = new_font_weight;
     177               
     178            if(new_font_style !== undefined && new_font_style !== null)
     179                font_style = new_font_style;
    175180           
    176181            var data = parent.attributes["data"];
     
    185190            style["color"]            = font_color;
    186191            style["font-weight"]      = font_weight;
     192            style["font-style"]       = font_style;
    187193           
    188194            //TODO: if parent node is a <b> element, then set style["font-weight"] to be "bold".
Note: See TracChangeset for help on using the changeset viewer.