| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /* Copyright (C) 2021 Rain */
- /* This file is part of XNIX. */
- /*
- XNIX is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) and later version.
- */
- /*
- XNIX is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- */
- /*
- You should have received a copy of the GNU General Public License
- along with XNIX. If not, see <https://www.gnu.org/licenses/>.
- */
- #include <kernel/init.h>
- #include <kernel/errno.h>
- #include <kernel/types.h>
- #include <modules/tty.h>
- #include <arch/io.h>
- #include <arch/sys.h>
- #include <arch/x86/int.h>
- /*
- * we supports PSF format in XNIX.
- * in linux, PSF fonts are in /usr/share/kbd/consolefonts, and they are always compressed.
- * */
- #define PSF_MAGIC 0x864ab572
- struct psf_header {
- __uint32_t magic;
- /* zero */
- __uint32_t version;
- __uint32_t header_size;
- /* zero if there's no unicode table */
- __uint32_t flags;
- /* in psf, a font calls glyph */
- __uint32_t glyphs_count;
- /* size of a glyph */
- __uint32_t glyph_size;
- __uint32_t height;
- __uint32_t width;
- };
|