git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3807
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
const wxWX2MBbuf strbuf = string.mb_str();
const wxWX2MBbuf strbuf = string.mb_str();
-#if !USE_AFM_FOR_POSTSCRIPT
+#if !wxUSE_AFM_FOR_POSTSCRIPT
/* Provide a VERY rough estimate (avoid using it).
* Produces accurate results for mono-spaced font
* such as Courier (aka wxMODERN) */
/* Provide a VERY rough estimate (avoid using it).
* Produces accurate results for mono-spaced font
* such as Courier (aka wxMODERN) */
static int lastWeight= INT_MIN;
static int lastDescender = INT_MIN;
static int lastWidths[256]; /* widths of the characters */
static int lastWeight= INT_MIN;
static int lastDescender = INT_MIN;
static int lastWidths[256]; /* widths of the characters */
+
+ static float UnderlinePosition = 0.0;
+ static float UnderlineThickness = 0.0;
/* get actual parameters */
const int Family = fontToUse->GetFamily();
/* get actual parameters */
const int Family = fontToUse->GetFamily();
if ((Style == wxITALIC) && (Weight == wxBOLD)) name = "TimesBoO";
else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = "TimesBo";
else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = "TimesO";
if ((Style == wxITALIC) && (Weight == wxBOLD)) name = "TimesBoO";
else if ((Style != wxITALIC) && (Weight == wxBOLD)) name = "TimesBo";
else if ((Style == wxITALIC) && (Weight != wxBOLD)) name = "TimesO";
- else if name = "TimesRo"; /* no typo */
+// else if name = "TimesRo"; /* no typo */
+ else name = "TimesRo"; /* VS maybe no typo, but it did not compile */
if (!m_printData.GetFontMetricPath().IsEmpty())
{
if (!m_printData.GetFontMetricPath().IsEmpty())
{
- strcpy( afmName, m_printData.GetFontMetricPath().fn_str() )
+ strcpy( afmName, m_printData.GetFontMetricPath().fn_str() );
}
/* 2. open and process the file
}
/* 2. open and process the file
}
/* JC: calculate UnderlineThickness/UnderlinePosition */
}
/* JC: calculate UnderlineThickness/UnderlinePosition */
- m_underlinePosition = m_underlinePosition * fontToUse->GetPointSize() / 1000.0f;
- m_underlineThickness = m_underlineThickness * fontToUse->GetPointSize() / 1000.0f * m_scaleFactor;
+// m_underlinePosition = m_underlinePosition * fontToUse->GetPointSize() / 1000.0f;
+// m_underlineThickness = m_underlineThickness * fontToUse->GetPointSize() / 1000.0f * m_scaleFactor;
+// VS: can't do this - we're in const method. m_underline* seems to be never used!
/* 3. now the font metrics are read in, calc size this
/ is done by adding the widths of the characters in the
/* 3. now the font metrics are read in, calc size this
/ is done by adding the widths of the characters in the