diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-11-19 19:18:00 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-11-19 19:18:00 +0100 |
commit | ec2cc09a2ce6d924ffa11b15c5bc49abf25c92fc (patch) | |
tree | 67d370344ca2916a5fd103ac6ec4f97204f65a9b /src/html.cc | |
parent | 1b304002e49e51f342da29aa4dc2c709ed398694 (diff) |
enable font face setting via <font> element
Diffstat (limited to 'src/html.cc')
-rw-r--r-- | src/html.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/html.cc b/src/html.cc index 447a4a3c..cf3e54d8 100644 --- a/src/html.cc +++ b/src/html.cc @@ -1886,8 +1886,8 @@ static void Html_tag_open_br(DilloHtml *html, const char *tag, int tagsize) */ static void Html_tag_open_font(DilloHtml *html, const char *tag, int tagsize) { - /*Font font;*/ const char *attrbuf; + char *fontFamily = NULL; int32_t color; CssPropertyList props; @@ -1902,11 +1902,13 @@ static void Html_tag_open_font(DilloHtml *html, const char *tag, int tagsize) props.set (CSS_PROPERTY_COLOR, CSS_TYPE_COLOR, color); } -// \todo reenable font face handling when font selection is implemented -// if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "face"))) -// props.set (CSS_PROPERTY_FONT_FAMILY, CSS_TYPE_SYMBOL, attrbuf); + if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "face"))) { + fontFamily = dStrdup(attrbuf); + props.set (CSS_PROPERTY_FONT_FAMILY, CSS_TYPE_SYMBOL, fontFamily); + } html->styleEngine->setNonCssHints (&props); + dFree(fontFamily); } /* |