aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-08-10 23:56:59 +1000
committernyamatongwe <devnull@localhost>2011-08-10 23:56:59 +1000
commit6860b289d19541ccb8d5be31c81c0f1aa992e9d7 (patch)
treea956b90c8d42a4f6041dce7251007f0b7e8e12d7 /src/ViewStyle.cxx
parent4b3344ecf4e02df4ad1530e4b46d477457d73f95 (diff)
downloadscintilla-mirror-6860b289d19541ccb8d5be31c81c0f1aa992e9d7.tar.gz
Implement 'technology' concept which will allow GDI and Direct2D/DirectWrite
to run at the same time for different windows and operations.
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r--src/ViewStyle.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index b722f8d02..08164f648 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -86,14 +86,15 @@ FontRealised::~FontRealised() {
frNext = 0;
}
-void FontRealised::Realise(Surface &surface, int zoomLevel) {
+void FontRealised::Realise(Surface &surface, int zoomLevel, int technology) {
PLATFORM_ASSERT(fontName);
sizeZoomed = size + zoomLevel * SC_FONT_SIZE_MULTIPLIER;
if (sizeZoomed <= 2 * SC_FONT_SIZE_MULTIPLIER) // Hangs if sizeZoomed <= 1
sizeZoomed = 2 * SC_FONT_SIZE_MULTIPLIER;
float deviceHeight = surface.DeviceHeightFont(sizeZoomed);
- font.Create(fontName, characterSet, deviceHeight / SC_FONT_SIZE_MULTIPLIER, weight, italic, extraFontFlag);
+ FontParameters fp(fontName, deviceHeight / SC_FONT_SIZE_MULTIPLIER, weight, italic, extraFontFlag, technology, characterSet);
+ font.Create(fp);
ascent = surface.Ascent(font);
descent = surface.Descent(font);
@@ -102,7 +103,7 @@ void FontRealised::Realise(Surface &surface, int zoomLevel) {
aveCharWidth = surface.AverageCharWidth(font);
spaceWidth = surface.WidthChar(font, ' ');
if (frNext) {
- frNext->Realise(surface, zoomLevel);
+ frNext->Realise(surface, zoomLevel, technology);
}
}
@@ -239,6 +240,7 @@ void ViewStyle::Init(size_t stylesSize_) {
indicators[2].under = false;
indicators[2].fore = ColourDesired(0xff, 0, 0);
+ technology = SC_TECHNOLOGY_DEFAULT;
lineHeight = 1;
maxAscent = 1;
maxDescent = 1;
@@ -388,7 +390,7 @@ void ViewStyle::Refresh(Surface &surface) {
CreateFont(styles[j]);
}
- frFirst->Realise(surface, zoomLevel);
+ frFirst->Realise(surface, zoomLevel, technology);
for (unsigned int k=0; k<stylesSize; k++) {
FontRealised *fr = frFirst->Find(styles[k]);