summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-11-19 19:18:00 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-11-19 19:18:00 +0100
commitec2cc09a2ce6d924ffa11b15c5bc49abf25c92fc (patch)
tree67d370344ca2916a5fd103ac6ec4f97204f65a9b
parent1b304002e49e51f342da29aa4dc2c709ed398694 (diff)
enable font face setting via <font> element
-rw-r--r--ChangeLog1
-rw-r--r--src/html.cc10
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 95596edf..c63398c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@ dillo-2.2 [??]
+- Add support for multiple class names in CSS.
- Fix X11 coordinate overflows with huge borders.
- Improve CSS font parsing.
+ - Enable font face setting via <font> element.
Patch: Johannes Hofmann
+- Cleaned up system includes in dpid directory.
- Fixed CustProgressBox() for systems without weak symbols.
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);
}
/*