Kernel: Fix PC Screen font parsing
I had misread the format and the parsing code was incorrect. I also changed fonts to store unicode codepoints as 32 bit integers, so every character can be represented
This commit is contained in:
@@ -17,15 +17,15 @@ namespace Kernel
|
||||
uint32_t height() const { return m_height; }
|
||||
uint32_t pitch() const { return m_pitch; }
|
||||
|
||||
bool has_glyph(uint16_t) const;
|
||||
const uint8_t* glyph(uint16_t) const;
|
||||
bool has_glyph(uint32_t) const;
|
||||
const uint8_t* glyph(uint32_t) const;
|
||||
|
||||
private:
|
||||
static BAN::ErrorOr<Font> parse_psf1(const BAN::Span<uint8_t>);
|
||||
static BAN::ErrorOr<Font> parse_psf2(const BAN::Span<uint8_t>);
|
||||
|
||||
private:
|
||||
BAN::HashMap<uint16_t, uint32_t> m_glyph_offsets;
|
||||
BAN::HashMap<uint32_t, uint32_t> m_glyph_offsets;
|
||||
BAN::Vector<uint8_t> m_glyph_data;
|
||||
uint32_t m_width = 0;
|
||||
uint32_t m_height = 0;
|
||||
|
||||
Reference in New Issue
Block a user