aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ViewStyle.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r--src/ViewStyle.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 30911d3f5..24272789c 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -89,14 +89,14 @@ void FontRealised::Realise(Surface &surface, int zoomLevel) {
sizeZoomed = 2;
int deviceHeight = surface.DeviceHeightFont(sizeZoomed);
- Create(fontName, characterSet, deviceHeight, bold, italic, extraFontFlag);
-
- ascent = surface.Ascent(*this);
- descent = surface.Descent(*this);
- externalLeading = surface.ExternalLeading(*this);
- lineHeight = surface.Height(*this);
- aveCharWidth = surface.AverageCharWidth(*this);
- spaceWidth = surface.WidthChar(*this, ' ');
+ font.Create(fontName, characterSet, deviceHeight, bold, italic, extraFontFlag);
+
+ ascent = surface.Ascent(font);
+ descent = surface.Descent(font);
+ externalLeading = surface.ExternalLeading(font);
+ lineHeight = surface.Height(font);
+ aveCharWidth = surface.AverageCharWidth(font);
+ spaceWidth = surface.WidthChar(font, ' ');
if (frNext) {
frNext->Realise(surface, zoomLevel);
}
@@ -372,15 +372,15 @@ void ViewStyle::Refresh(Surface &surface) {
}
CreateFont(styles[STYLE_DEFAULT]);
- for (unsigned int i=0; i<stylesSize; i++) {
- CreateFont(styles[i]);
+ for (unsigned int j=0; j<stylesSize; j++) {
+ CreateFont(styles[j]);
}
frFirst->Realise(surface, zoomLevel);
- for (unsigned int i=0; i<stylesSize; i++) {
- FontRealised *fr = frFirst->Find(styles[i]);
- styles[i].Copy(*fr, *fr);
+ for (unsigned int k=0; k<stylesSize; k++) {
+ FontRealised *fr = frFirst->Find(styles[k]);
+ styles[k].Copy(fr->font, *fr);
}
maxAscent = 1;
maxDescent = 1;
@@ -391,11 +391,11 @@ void ViewStyle::Refresh(Surface &surface) {
someStylesProtected = false;
someStylesForceCase = false;
- for (unsigned int i=0; i<stylesSize; i++) {
- if (styles[i].IsProtected()) {
+ for (unsigned int l=0; l<stylesSize; l++) {
+ if (styles[l].IsProtected()) {
someStylesProtected = true;
}
- if (styles[i].caseForce != Style::caseMixed) {
+ if (styles[l].caseForce != Style::caseMixed) {
someStylesForceCase = true;
}
}