summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2012-01-24 20:23:10 (GMT)
committer John Mark Bell <jmb@netsurf-browser.org>2012-01-24 20:23:10 (GMT)
commit734cf791efe792c42dca1c000c7fae633197312b (patch)
tree52bc1095b1e218229e5e123e635fd4d14236bb21
parentd5a183e14d42560632a6aa270aede226215bb3d3 (diff)
downloadlibcss-734cf791efe792c42dca1c000c7fae633197312b.tar.gz
libcss-734cf791efe792c42dca1c000c7fae633197312b.tar.bz2
Fix font-face defaults (credit: James Montgomerie)
svn path=/trunk/libcss/; revision=13406
-rw-r--r--src/select/font_face.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/select/font_face.c b/src/select/font_face.c
index ae24827..cd6556a 100644
--- a/src/select/font_face.c
+++ b/src/select/font_face.c
@@ -25,6 +25,15 @@ static void font_faces_srcs_destroy(css_font_face *font_face)
font_face->srcs = NULL;
}
+static const css_font_face default_font_face = {
+ NULL,
+ NULL,
+ 0,
+ { (CSS_FONT_WEIGHT_NORMAL << 2) | CSS_FONT_STYLE_NORMAL },
+ NULL,
+ NULL
+};
+
/**
* Create a font-face
*
@@ -47,7 +56,7 @@ css_error css__font_face_create(css_allocator_fn alloc, void *pw,
if (f == NULL)
return CSS_NOMEM;
- memset(f, 0, sizeof(css_font_face));
+ memcpy(f, &default_font_face, sizeof(css_font_face));
f->alloc = alloc;
f->pw = pw;