WebPositive: allow to select "full and half fixed" monospace fonts

The same fix was done some time ago in Appearance preferences, but the
version in WebPositive had not been updated.

Allows to select the current version of Noto Sans Mono as the monospace font.

Change-Id: I829f80cab3ea224c9963147cc333877edafdeebe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7576
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
PulkoMandy 2024-03-31 10:43:56 +02:00 committed by Adrien Destugues
parent bc6674c89e
commit c98ea724b9
1 changed files with 7 additions and 2 deletions

View File

@ -12,6 +12,8 @@
#include "FontSelectionView.h"
#include "private/interface/FontPrivate.h"
#include <Box.h>
#include <Catalog.h>
#include <Locale.h>
@ -323,9 +325,12 @@ 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;
}
font.SetFamilyAndFace(family, B_REGULAR_FACE);