From 88c834221bddf5400b65017d946e7d2beb798fbf Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Mon, 13 Feb 2017 12:49:30 +0100 Subject: [PATCH] CFbAccelCSHD2: Add scaleFont()function for font upscaling when fullhd is aktiv --- src/driver/fb_accel.h | 1 + src/driver/fb_accel_cs_hd2.cpp | 8 ++++++++ src/driver/fb_generic.h | 1 + 3 files changed, 10 insertions(+) diff --git a/src/driver/fb_accel.h b/src/driver/fb_accel.h index 54736d331..f13c08ef2 100644 --- a/src/driver/fb_accel.h +++ b/src/driver/fb_accel.h @@ -127,6 +127,7 @@ class CFbAccelCSHD2 void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff); void setBlendMode(uint8_t); void setBlendLevel(int); + int scaleFont(int size); }; class CFbAccelGLFB diff --git a/src/driver/fb_accel_cs_hd2.cpp b/src/driver/fb_accel_cs_hd2.cpp index 233254acc..61936135a 100644 --- a/src/driver/fb_accel_cs_hd2.cpp +++ b/src/driver/fb_accel_cs_hd2.cpp @@ -264,3 +264,11 @@ void CFbAccelCSHD2::setBlendLevel(int level) if (level == 100) // TODO: sucks. usleep(20000); } + +int CFbAccelCSHD2::scaleFont(int size) +{ + if (screeninfo.xres == 1920) + size += size/2; + + return size; +} diff --git a/src/driver/fb_generic.h b/src/driver/fb_generic.h index 5b2a24402..747424648 100644 --- a/src/driver/fb_generic.h +++ b/src/driver/fb_generic.h @@ -270,6 +270,7 @@ class CFrameBuffer : public sigc::trackable void blitBox2FB(const fb_pixel_t* boxBuf, uint32_t width, uint32_t height, uint32_t xoff, uint32_t yoff); virtual void mark(int x, int y, int dx, int dy); + virtual int scaleFont(int size) { return size; }; enum {