|
@@ -10,6 +10,7 @@
|
|
|
#include <LibGfx/Painter.h>
|
|
|
#include <LibPDF/CommonNames.h>
|
|
|
#include <LibPDF/Fonts/TrueTypeFont.h>
|
|
|
+#include <LibPDF/Renderer.h>
|
|
|
|
|
|
namespace PDF {
|
|
|
|
|
@@ -47,8 +48,10 @@ void TrueTypeFont::set_font_size(float font_size)
|
|
|
m_font = m_font->with_size((font_size * POINTS_PER_INCH) / DEFAULT_DPI);
|
|
|
}
|
|
|
|
|
|
-PDFErrorOr<void> TrueTypeFont::draw_glyph(Gfx::Painter& painter, Gfx::FloatPoint point, float, u8 char_code, Color color)
|
|
|
+PDFErrorOr<void> TrueTypeFont::draw_glyph(Gfx::Painter& painter, Gfx::FloatPoint point, float, u8 char_code, Renderer const& renderer)
|
|
|
{
|
|
|
+ auto color = renderer.state().paint_color;
|
|
|
+
|
|
|
// Account for the reversed font baseline
|
|
|
auto position = point.translated(0, -m_font->baseline());
|
|
|
painter.draw_glyph(position, char_code, *m_font, color);
|