Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wsfont add WSFONT_PREFER_ALPHA - for drivers that wo...
details: https://anonhg.NetBSD.org/src/rev/4b314dd8564b
branches: trunk
changeset: 349016:4b314dd8564b
user: macallan <macallan%NetBSD.org@localhost>
date: Sun Nov 20 15:44:40 2016 +0000
description:
add WSFONT_PREFER_ALPHA - for drivers that would rather render anti-aliased
fonts
diffstat:
sys/dev/wsfont/wsfont.c | 6 ++++--
sys/dev/wsfont/wsfont.h | 4 +++-
2 files changed, 7 insertions(+), 3 deletions(-)
diffs (45 lines):
diff -r 1213095dbbdf -r 4b314dd8564b sys/dev/wsfont/wsfont.c
--- a/sys/dev/wsfont/wsfont.c Sun Nov 20 15:37:19 2016 +0000
+++ b/sys/dev/wsfont/wsfont.c Sun Nov 20 15:44:40 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsfont.c,v 1.59 2015/05/09 16:40:37 mlelstv Exp $ */
+/* $NetBSD: wsfont.c,v 1.60 2016/11/20 15:44:40 macallan Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.59 2015/05/09 16:40:37 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.60 2016/11/20 15:44:40 macallan Exp $");
#include "opt_wsfont.h"
@@ -574,6 +574,8 @@
/* first weed out fonts the caller doesn't claim support for */
if (FONT_IS_ALPHA(font)) {
+ if (flags & WSFONT_PREFER_ALPHA)
+ score++;
if ((flags & WSFONT_FIND_ALPHA) == 0)
return 0;
} else {
diff -r 1213095dbbdf -r 4b314dd8564b sys/dev/wsfont/wsfont.h
--- a/sys/dev/wsfont/wsfont.h Sun Nov 20 15:37:19 2016 +0000
+++ b/sys/dev/wsfont/wsfont.h Sun Nov 20 15:44:40 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsfont.h,v 1.25 2015/04/18 11:23:58 mlelstv Exp $ */
+/* $NetBSD: wsfont.h,v 1.26 2016/11/20 15:44:40 macallan Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -66,6 +66,8 @@
#define WSFONT_FIND_ALPHA 0x02
#define WSFONT_FIND_ALL 0xff
#define WSFONT_FIND_BESTWIDTH 0x1000
+#define WSFONT_PREFER_ALPHA 0x2000
+
void wsfont_walk(void (*)(struct wsdisplay_font *, void *, int), void *);
int wsfont_add(struct wsdisplay_font *, int);
Home |
Main Index |
Thread Index |
Old Index