int pref;
};
-#define VGA8x8_IDX 0
-#define VGA8x16_IDX 1
-#define PEARL8x8_IDX 2
-#define VGA6x11_IDX 3
-#define FONT7x14_IDX 4
-#define FONT10x18_IDX 5
-#define SUN8x16_IDX 6
-#define SUN12x22_IDX 7
-#define ACORN8x8_IDX 8
-#define MINI4x6_IDX 9
-#define FONT6x10_IDX 10
-#define TER16x32_IDX 11
-#define FONT6x8_IDX 12
-#define TER10x18_IDX 13
-
-extern const struct font_desc font_vga_8x8,
- font_vga_8x16,
- font_pearl_8x8,
- font_vga_6x11,
- font_7x14,
- font_10x18,
- font_sun_8x16,
- font_sun_12x22,
- font_acorn_8x8,
- font_mini_4x6,
- font_6x10,
- font_ter_16x32,
- font_6x8,
- font_ter_10x18;
-
/* Find a font with a specific name */
extern const struct font_desc *find_font(const char *name);
/* Max. length for the name of a predefined font */
#define MAX_FONT_NAME 32
-/* Extra word getters */
-#define REFCOUNT(fd) (((int *)(fd))[-1])
-#define FNTSIZE(fd) (((int *)(fd))[-2])
-#define FNTSUM(fd) (((int *)(fd))[-4])
-
-#define FONT_EXTRA_WORDS 4
+/*
+ * Built-in fonts
+ */
-struct font_data {
- unsigned int extra[FONT_EXTRA_WORDS];
- unsigned char data[];
-} __packed;
+extern const struct font_desc font_10x18;
+extern const struct font_desc font_6x10;
+extern const struct font_desc font_6x8;
+extern const struct font_desc font_7x14;
+extern const struct font_desc font_acorn_8x8;
+extern const struct font_desc font_mini_4x6;
+extern const struct font_desc font_pearl_8x8;
+extern const struct font_desc font_sun_12x22;
+extern const struct font_desc font_sun_8x16;
+extern const struct font_desc font_ter_10x18;
+extern const struct font_desc font_ter_16x32;
+extern const struct font_desc font_vga_6x11;
+extern const struct font_desc font_vga_8x16;
+extern const struct font_desc font_vga_8x8;
#endif /* _VIDEO_FONT_H */
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef _LIB_FONTS_FONT_H
+#define _LIB_FONTS_FONT_H
+
+#include <linux/font.h>
+
+/*
+ * Font data
+ */
+
+#define FONT_EXTRA_WORDS 4
+
+struct font_data {
+ unsigned int extra[FONT_EXTRA_WORDS];
+ unsigned char data[];
+} __packed;
+
+/*
+ * Built-in fonts
+ */
+
+#define VGA8x8_IDX 0
+#define VGA8x16_IDX 1
+#define PEARL8x8_IDX 2
+#define VGA6x11_IDX 3
+#define FONT7x14_IDX 4
+#define FONT10x18_IDX 5
+#define SUN8x16_IDX 6
+#define SUN12x22_IDX 7
+#define ACORN8x8_IDX 8
+#define MINI4x6_IDX 9
+#define FONT6x10_IDX 10
+#define TER16x32_IDX 11
+#define FONT6x8_IDX 12
+#define TER10x18_IDX 13
+
+#endif
* by Jurriaan Kalkman 06-2005 *
********************************/
-#include <linux/font.h>
+#include "font.h"
#define FONTDATAMAX 9216
// SPDX-License-Identifier: GPL-2.0
-#include <linux/font.h>
+
+#include "font.h"
#define FONTDATAMAX 2560
/* */
/**********************************************/
-#include <linux/font.h>
+#include "font.h"
#define FONTDATAMAX (11*256)
// SPDX-License-Identifier: GPL-2.0
-#include <linux/font.h>
+
+#include "font.h"
#define FONTDATAMAX 2048
/* by Jurriaan Kalkman 05-2005 */
/**************************************/
-#include <linux/font.h>
+#include "font.h"
#define FONTDATAMAX 3584
/* */
/**********************************************/
-#include <linux/font.h>
#include <linux/module.h>
+#include "font.h"
+
#define FONTDATAMAX 4096
static const struct font_data fontdata_8x16 = {
/* */
/**********************************************/
-#include <linux/font.h>
+#include "font.h"
#define FONTDATAMAX 2048
// SPDX-License-Identifier: GPL-2.0
/* Acorn-like font definition, with PC graphics characters */
-#include <linux/font.h>
+#include "font.h"
#define FONTDATAMAX 2048
MSBit to LSBit = left to right.
*/
-#include <linux/font.h>
+#include "font.h"
#define FONTDATAMAX 1536
/* */
/**********************************************/
-#include <linux/font.h>
+#include "font.h"
#define FONTDATAMAX 2048
// SPDX-License-Identifier: GPL-2.0
-#include <linux/font.h>
+
+#include "font.h"
#define FONTDATAMAX 11264
// SPDX-License-Identifier: GPL-2.0
-#include <linux/font.h>
+
+#include "font.h"
#define FONTDATAMAX 4096
// SPDX-License-Identifier: GPL-2.0
-#include <linux/font.h>
+
#include <linux/module.h>
+#include "font.h"
+
#define FONTDATAMAX 9216
static const struct font_data fontdata_ter10x18 = {
// SPDX-License-Identifier: GPL-2.0
-#include <linux/font.h>
+
#include <linux/module.h>
+#include "font.h"
+
#define FONTDATAMAX 16384
static const struct font_data fontdata_ter16x32 = {
*/
#include <linux/container_of.h>
-#include <linux/font.h>
#include <linux/kd.h>
#include <linux/module.h>
#include <linux/overflow.h>
#include <asm/setup.h>
#endif
+#include "font.h"
+
#define console_font_pitch(font) DIV_ROUND_UP((font)->width, 8)
/*
* Helpers for font_data_t
*/
+/* Extra word getters */
+#define REFCOUNT(fd) (((int *)(fd))[-1])
+#define FNTSIZE(fd) (((int *)(fd))[-2])
+#define FNTSUM(fd) (((int *)(fd))[-4])
+
static struct font_data *to_font_data_struct(font_data_t *fd)
{
return container_of(fd, struct font_data, data[0]);