{
wxString sFaceName;
long flId = m_hFont;
+ long lRc;
+ short nIndex = 0;
+ PFONTMETRICS pFM = NULL;
if (!m_bNativeFontInfoOk)
{
m_bNativeFontInfoOk = TRUE;
}
- if(::GpiCreateLogFont( m_hPS
- ,NULL
- ,flId
- ,&m_vNativeFontInfo.fa
- ) != GPI_ERROR)
+ if((lRc = ::GpiCreateLogFont( m_hPS
+ ,NULL
+ ,flId
+ ,&m_vNativeFontInfo.fa
+ )) != GPI_ERROR)
+ {
m_hFont = (WXHFONT)flId;
m_nFontId = flId;
-
+ }
if (!m_hFont)
{
wxLogLastError("CreateFont");
}
- //
- // Query for the actual metrics of the current font being used
- //
+ ::GpiSetCharSet(m_hPS, flId); // sets font for presentation space
::GpiQueryFontMetrics(m_hPS, sizeof(FONTMETRICS), &m_vNativeFontInfo.fm);
//
m_nPointSize = m_vNativeFontInfo.fm.lEmHeight;
if (strcmp(m_vNativeFontInfo.fa.szFacename, "Times New Roman") == 0)
m_nFamily = wxROMAN;
+ else if (strcmp(m_vNativeFontInfo.fa.szFacename, "Tms Rmn") == 0)
+ m_nFamily = wxSWISS;
else if (strcmp(m_vNativeFontInfo.fa.szFacename, "WarpSans") == 0)
m_nFamily = wxSWISS;
+ else if (strcmp(m_vNativeFontInfo.fa.szFacename, "Helvitica") == 0)
+ m_nFamily = wxSWISS;
+ else if (strcmp(m_vNativeFontInfo.fa.szFacename, "Helv") == 0)
+ m_nFamily = wxSWISS;
else if (strcmp(m_vNativeFontInfo.fa.szFacename, "Script") == 0)
m_nFamily = wxSCRIPT;
else if (strcmp(m_vNativeFontInfo.fa.szFacename, "Courier New") == 0)
- m_nFamily = wxMODERN;
+ m_nFamily = wxTELETYPE;
else if (strcmp(m_vNativeFontInfo.fa.szFacename, "Courier") == 0)
+ m_nFamily = wxTELETYPE;
+ else if (strcmp(m_vNativeFontInfo.fa.szFacename, "System VIO") == 0)
m_nFamily = wxMODERN;
else
m_nFamily = wxSWISS;
wxString sVals;
+ //
+ // For debugging, delete later
+ //
for (int i = 0; i < lNumFonts; i++)
{
sVals << "Face: " << pFM[i].szFacename
int nPointSize;
int nDiff;
int nIs;
- int nIndex;
int nMinDiff;
int nMinDiff0;
int nApirc;
int anDiff[16];
int anMinDiff[16];
+ int nIndex = 0;
STR8 zFn;
char zFontFaceName[FACESIZE];
wxString sFaceName;
pFattrs->lMatch = pFM[nIndex].lMatch; // force match
pFattrs->idRegistry = pFM[nIndex].idRegistry; // uses default registry
pFattrs->usCodePage = pFM[nIndex].usCodePage; // code-page
- if(pFM[nIndex].lMatch)
- {
- pFattrs->lMaxBaselineExt = pFM[nIndex].lMaxBaselineExt; // requested font height
- pFattrs->lAveCharWidth = pFM[nIndex].lAveCharWidth ; // requested font width
- }
- else
- {
- pFattrs->lMaxBaselineExt = 0;
- pFattrs->lAveCharWidth = 0;
- }
+ pFattrs->lMaxBaselineExt = 0; // OUTLINE fonts need this set to 0 as they use other attributes to match
+ pFattrs->lAveCharWidth = 0; // OUTLINE fonts need this set to 0 as they use other attributes to match
pFattrs->fsType = 0;// pfm->fsType; /* uses default type */
pFattrs->fsFontUse = 0;
char zStyle[30];
if (hWnd == NULLHANDLE)
+ return;
//
// The fonts available for Presentation Params are just three
switch(rFont.GetFamily())
{
case wxSCRIPT:
+ strcpy(zFacename, "Script");
+ break;
+
case wxDECORATIVE:
case wxROMAN:
- strcpy(zFacename,"Times New Roman");
+ strcpy(zFacename,"Tms Rmn");
break;
case wxTELETYPE:
- case wxMODERN:
strcpy(zFacename, "Courier");
break;
+ case wxMODERN:
+ strcpy(zFacename, "System Vio");
+ break;
+
case wxSWISS:
+ strcpy(zFacename, "Helv");
+ break;
+
case wxDEFAULT:
default:
- strcpy(zFacename, "Helvetica");
+ strcpy(zFacename, "System Vio");
break;
}
CODE LOADONCALL
EXPORTS
-;From library: F:\DEV\WX2\WXWINDOWS\LIB\wx.lib
+;From library: H:\DEV\WX2\WXWINDOWS\LIB\wx.lib
;From object file: dummy.cpp
;PUBDEFs (Symbols available from object file):
wxDummyChar
wxEVT_NC_LEFT_DCLICK
wxEVT_INIT_DIALOG
wxEVT_COMMAND_SET_FOCUS
- ;From object file: F:\DEV\WX2\WXWINDOWS\src\common\extended.c
+ ;From object file: H:\DEV\WX2\WXWINDOWS\src\common\extended.c
;PUBDEFs (Symbols available from object file):
ConvertToIeeeExtended
ConvertFromIeeeExtended
Read32__17wxTextInputStreamFv
;wxTextInputStream::SkipIfEndOfLine(char)
SkipIfEndOfLine__17wxTextInputStreamFc
- ;From object file: F:\DEV\WX2\WXWINDOWS\src\common\unzip.c
+ ;From object file: H:\DEV\WX2\WXWINDOWS\src\common\unzip.c
;PUBDEFs (Symbols available from object file):
unzReadCurrentFile
unzGetCurrentFileInfo