From 5fbf0afd91ededff33ec4af76a4b175a4c0ddf79 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 4 Feb 2015 09:23:23 +0100 Subject: [PATCH] BTextView: add handling of B_FONT_FACE mask to SetFontAndColor The B_FONT_FACE mask would be ignored, making it impossible to change only the font face. Thanks to samgtr for finding the bug! --- src/kits/interface/textview_support/StyleBuffer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kits/interface/textview_support/StyleBuffer.cpp b/src/kits/interface/textview_support/StyleBuffer.cpp index d9f13250e4..1e4097645c 100644 --- a/src/kits/interface/textview_support/StyleBuffer.cpp +++ b/src/kits/interface/textview_support/StyleBuffer.cpp @@ -165,6 +165,9 @@ SetStyleFromMode(uint32 mode, const BFont *fromFont, BFont *toFont, if (mode & B_FONT_FAMILY_AND_STYLE) toFont->SetFamilyAndStyle(fromFont->FamilyAndStyle()); + if (mode & B_FONT_FACE) + toFont->SetFace(fromFont->Face()); + if (mode & B_FONT_SIZE) toFont->SetSize(fromFont->Size());