diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2010-01-22 07:40:25 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2010-01-22 07:40:25 +0000 |
commit | 9f69106ac42dbcc5b75d58b00edfada7d291fc7c (patch) | |
tree | c85d75fc84b140ad3191f4d767813cfa3d4c3bd3 | |
parent | c9ce56727ee07b07adee8c37e2da6295e3006c17 (diff) | |
download | netsurf-9f69106ac42dbcc5b75d58b00edfada7d291fc7c.tar.gz netsurf-9f69106ac42dbcc5b75d58b00edfada7d291fc7c.tar.bz2 |
Construct font_family from core family name.
svn path=/trunk/netsurf/; revision=9863
-rw-r--r-- | beos/beos_font.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/beos/beos_font.cpp b/beos/beos_font.cpp index c4d5221ff..b3617d1ed 100644 --- a/beos/beos_font.cpp +++ b/beos/beos_font.cpp @@ -353,9 +353,15 @@ void nsbeos_style_to_font(BFont &font, const plot_font_style_t *fstyle) //fprintf(stderr, "nsbeos_style_to_font: %d, %d, %d -> '%s' %04x\n", style->font_family, style->font_style, style->font_weight, family, face); - if (family) - font.SetFamilyAndFace((const font_family)family, face); - else { + if (family) { + font_family beos_family; + + strncpy(beos_family, family, B_FONT_FAMILY_NAME_LENGTH); + // Ensure it's terminated + beos_family[B_FONT_FAMILY_NAME_LENGTH] = '\0'; + + font.SetFamilyAndFace(beos_family, face); + } else { //XXX not used font = be_plain_font; font.SetFace(face); |