Appearance: Reinstate changes to allow full-and-half-fixed fonts as fixed.
This reverts commit 033f3450e3766e566e7e881b6cfe98d8024f4518. The discussion on the mailing list has tended towards changing the BFont API so that these kind of fonts return true for IsFixed() as well as IsFullAndHalfFixed if only to avoid the API ugliness of be_fixed_font->IsFixed() returning false. But since that change should not really affect applications, as BeOS ones will probably not support CJK characters at all and Haiku ones should work properly, and the present state of affairs has been pretty annoying to CJK users, we can at least allow users to select full-and-half-fixed fonts as their default fixed font, and begin dealing with whatever bugs that may cause now.
This commit is contained in:
parent
fd25b902be
commit
06b10d86af
@ -15,14 +15,16 @@
|
||||
|
||||
#include <Box.h>
|
||||
#include <Catalog.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
#include <LayoutItem.h>
|
||||
#include <Locale.h>
|
||||
#include <MenuField.h>
|
||||
#include <MenuItem.h>
|
||||
#include <PopUpMenu.h>
|
||||
#include <String.h>
|
||||
#include <StringView.h>
|
||||
#include <LayoutItem.h>
|
||||
#include <GroupLayoutBuilder.h>
|
||||
|
||||
#include <FontPrivate.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@ -449,9 +451,13 @@ FontSelectionView::UpdateFontsMenu()
|
||||
if (get_font_family(i, &family, &flags) != B_OK)
|
||||
continue;
|
||||
|
||||
// if we're setting the fixed font, we only want to show fixed fonts
|
||||
if (!strcmp(Name(), "fixed") && (flags & B_IS_FIXED) == 0)
|
||||
// if we're setting the fixed font, we only want to show fixed and
|
||||
// full-and-half-fixed fonts
|
||||
if (strcmp(Name(), "fixed") == 0
|
||||
&& (flags
|
||||
& (B_IS_FIXED | B_PRIVATE_FONT_IS_FULL_AND_HALF_FIXED)) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
float width = font.StringWidth(family);
|
||||
if (width > fMaxFontNameWidth)
|
||||
|
Loading…
x
Reference in New Issue
Block a user