|
@@ -25,6 +25,19 @@ public:
|
|
RefPtr<Encoding> encoding() const { return m_encoding; }
|
|
RefPtr<Encoding> encoding() const { return m_encoding; }
|
|
|
|
|
|
protected:
|
|
protected:
|
|
|
|
+ struct AccentedCharacter {
|
|
|
|
+ AccentedCharacter(u8 base_char_code, u8 accent_char_code, float adx, float ady)
|
|
|
|
+ : base_character(Encoding::standard_encoding()->get_name(base_char_code))
|
|
|
|
+ , accent_character(Encoding::standard_encoding()->get_name(accent_char_code))
|
|
|
|
+ , accent_origin(adx, ady)
|
|
|
|
+ {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ DeprecatedFlyString base_character;
|
|
|
|
+ DeprecatedFlyString accent_character;
|
|
|
|
+ Gfx::FloatPoint accent_origin;
|
|
|
|
+ };
|
|
|
|
+
|
|
class Glyph {
|
|
class Glyph {
|
|
|
|
|
|
public:
|
|
public:
|
|
@@ -38,9 +51,17 @@ protected:
|
|
Gfx::Path& path() { return m_path; }
|
|
Gfx::Path& path() { return m_path; }
|
|
Gfx::Path const& path() const { return m_path; }
|
|
Gfx::Path const& path() const { return m_path; }
|
|
|
|
|
|
|
|
+ bool is_accented_character() const { return m_accented_character.has_value(); }
|
|
|
|
+ AccentedCharacter const& accented_character() const { return m_accented_character.value(); }
|
|
|
|
+ void set_accented_character(AccentedCharacter&& accented_character)
|
|
|
|
+ {
|
|
|
|
+ m_accented_character = move(accented_character);
|
|
|
|
+ }
|
|
|
|
+
|
|
private:
|
|
private:
|
|
Gfx::Path m_path;
|
|
Gfx::Path m_path;
|
|
Optional<float> m_width;
|
|
Optional<float> m_width;
|
|
|
|
+ Optional<AccentedCharacter> m_accented_character;
|
|
};
|
|
};
|
|
|
|
|
|
struct GlyphParserState {
|
|
struct GlyphParserState {
|
|
@@ -86,6 +107,8 @@ protected:
|
|
return {};
|
|
return {};
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ void consolidate_glyphs();
|
|
|
|
+
|
|
private:
|
|
private:
|
|
HashMap<DeprecatedFlyString, Glyph> m_glyph_map;
|
|
HashMap<DeprecatedFlyString, Glyph> m_glyph_map;
|
|
Gfx::AffineTransform m_font_matrix;
|
|
Gfx::AffineTransform m_font_matrix;
|