add Numbers Only. Export either main+alt, or numbers - not both.
This commit is contained in:
@@ -172,6 +172,7 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "Double Resolution", ID_OPTIONS_DOUBLERES
|
MENUITEM "Double Resolution", ID_OPTIONS_DOUBLERES
|
||||||
MENUITEM "Export Stroke Templates", ID_OPTIONS_EXPORTSTROKETEMPLATES
|
MENUITEM "Export Stroke Templates", ID_OPTIONS_EXPORTSTROKETEMPLATES
|
||||||
|
MENUITEM "Numbers Only", ID_OPTIONS_NUMBERSONLY
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ BEGIN_MESSAGE_MAP(CTextureFontGeneratorDlg, CDialog)
|
|||||||
ON_COMMAND(ID_ACCELERATOR_BOLD, OnStyleBold)
|
ON_COMMAND(ID_ACCELERATOR_BOLD, OnStyleBold)
|
||||||
ON_COMMAND(ID_OPTIONS_DOUBLERES, &CTextureFontGeneratorDlg::OnOptionsDoubleres)
|
ON_COMMAND(ID_OPTIONS_DOUBLERES, &CTextureFontGeneratorDlg::OnOptionsDoubleres)
|
||||||
ON_COMMAND(ID_OPTIONS_EXPORTSTROKETEMPLATES, &CTextureFontGeneratorDlg::OnOptionsExportstroketemplates)
|
ON_COMMAND(ID_OPTIONS_EXPORTSTROKETEMPLATES, &CTextureFontGeneratorDlg::OnOptionsExportstroketemplates)
|
||||||
|
ON_COMMAND(ID_OPTIONS_NUMBERSONLY, &CTextureFontGeneratorDlg::OnOptionsNumbersonly)
|
||||||
END_MESSAGE_MAP()
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
|
|
||||||
@@ -142,35 +143,42 @@ void CTextureFontGeneratorDlg::UpdateFont( bool bSavingDoubleRes )
|
|||||||
|
|
||||||
g_pTextureFont->m_PagesToGenerate.clear();
|
g_pTextureFont->m_PagesToGenerate.clear();
|
||||||
FontPageDescription desc;
|
FontPageDescription desc;
|
||||||
desc.name = "main";
|
|
||||||
for( int i = 0; map_cp1252[i]; ++i )
|
|
||||||
{
|
|
||||||
wchar_t wc = map_cp1252[i];
|
|
||||||
if( wc != 0xFFFF )
|
|
||||||
desc.chars.push_back(wc);
|
|
||||||
}
|
|
||||||
g_pTextureFont->m_PagesToGenerate.push_back( desc );
|
|
||||||
|
|
||||||
desc.name = "alt";
|
bool bNumbersOnly = !!( pMenu->GetMenuState(ID_OPTIONS_NUMBERSONLY, 0) & MF_CHECKED );
|
||||||
desc.chars.clear();
|
|
||||||
for( int i = 0; map_iso_8859_2[i]; ++i )
|
|
||||||
{
|
|
||||||
wchar_t wc = map_iso_8859_2[i];
|
|
||||||
if( wc != 0xFFFF )
|
|
||||||
desc.chars.push_back(wc);
|
|
||||||
}
|
|
||||||
g_pTextureFont->m_PagesToGenerate.push_back( desc );
|
|
||||||
|
|
||||||
desc.name = "numbers";
|
if( !bNumbersOnly )
|
||||||
desc.chars.clear();
|
|
||||||
for( int i = 0; map_numbers[i]; ++i )
|
|
||||||
{
|
{
|
||||||
wchar_t wc = map_numbers[i];
|
desc.name = "main";
|
||||||
if( wc != 0xFFFF )
|
for( int i = 0; map_cp1252[i]; ++i )
|
||||||
desc.chars.push_back(wc);
|
{
|
||||||
}
|
wchar_t wc = map_cp1252[i];
|
||||||
g_pTextureFont->m_PagesToGenerate.push_back( desc );
|
if( wc != 0xFFFF )
|
||||||
|
desc.chars.push_back(wc);
|
||||||
|
}
|
||||||
|
g_pTextureFont->m_PagesToGenerate.push_back( desc );
|
||||||
|
|
||||||
|
desc.name = "alt";
|
||||||
|
desc.chars.clear();
|
||||||
|
for( int i = 0; map_iso_8859_2[i]; ++i )
|
||||||
|
{
|
||||||
|
wchar_t wc = map_iso_8859_2[i];
|
||||||
|
if( wc != 0xFFFF )
|
||||||
|
desc.chars.push_back(wc);
|
||||||
|
}
|
||||||
|
g_pTextureFont->m_PagesToGenerate.push_back( desc );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
desc.name = "numbers";
|
||||||
|
desc.chars.clear();
|
||||||
|
for( int i = 0; map_numbers[i]; ++i )
|
||||||
|
{
|
||||||
|
wchar_t wc = map_numbers[i];
|
||||||
|
if( wc != 0xFFFF )
|
||||||
|
desc.chars.push_back(wc);
|
||||||
|
}
|
||||||
|
g_pTextureFont->m_PagesToGenerate.push_back( desc );
|
||||||
|
}
|
||||||
|
|
||||||
/* Go: */
|
/* Go: */
|
||||||
g_pTextureFont->FormatFontPages();
|
g_pTextureFont->FormatFontPages();
|
||||||
@@ -520,6 +528,16 @@ void CTextureFontGeneratorDlg::OnOptionsExportstroketemplates()
|
|||||||
pMenu->CheckMenuItem( ID_OPTIONS_EXPORTSTROKETEMPLATES, Checked );
|
pMenu->CheckMenuItem( ID_OPTIONS_EXPORTSTROKETEMPLATES, Checked );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CTextureFontGeneratorDlg::OnOptionsNumbersonly()
|
||||||
|
{
|
||||||
|
CMenu *pMenu = GetMenu();
|
||||||
|
int Checked = pMenu->GetMenuState(ID_OPTIONS_NUMBERSONLY, 0) & MF_CHECKED;
|
||||||
|
Checked ^= MF_CHECKED;
|
||||||
|
pMenu->CheckMenuItem( ID_OPTIONS_NUMBERSONLY, Checked );
|
||||||
|
m_bUpdateFontNeeded = true;
|
||||||
|
Invalidate( FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
void CTextureFontGeneratorDlg::OnDeltaposSpinTop(NMHDR *pNMHDR, LRESULT *pResult)
|
void CTextureFontGeneratorDlg::OnDeltaposSpinTop(NMHDR *pNMHDR, LRESULT *pResult)
|
||||||
{
|
{
|
||||||
LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR);
|
LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR);
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ public:
|
|||||||
CStatic m_FontType;
|
CStatic m_FontType;
|
||||||
afx_msg void OnOptionsDoubleres();
|
afx_msg void OnOptionsDoubleres();
|
||||||
afx_msg void OnOptionsExportstroketemplates();
|
afx_msg void OnOptionsExportstroketemplates();
|
||||||
|
afx_msg void OnOptionsNumbersonly();
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -28,16 +28,18 @@
|
|||||||
#define IDC_CHECK1 1026
|
#define IDC_CHECK1 1026
|
||||||
#define ID_ACCELERATOR_ITALIC 32773
|
#define ID_ACCELERATOR_ITALIC 32773
|
||||||
#define ID_ACCELERATOR_BOLD 32774
|
#define ID_ACCELERATOR_BOLD 32774
|
||||||
|
#define ID_OPTIONS_DOUBLERESOLUTION 32779
|
||||||
#define ID_OPTIONS_DOUBLERES 32780
|
#define ID_OPTIONS_DOUBLERES 32780
|
||||||
#define IDC_OPTIONS_DOUBLERES 32781
|
#define IDC_OPTIONS_DOUBLERES 32781
|
||||||
#define ID_OPTIONS_EXPORTSTROKETEMPLATES 32782
|
#define ID_OPTIONS_EXPORTSTROKETEMPLATES 32782
|
||||||
|
#define ID_OPTIONS_NUMBERSONLY 32783
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 145
|
#define _APS_NEXT_RESOURCE_VALUE 145
|
||||||
#define _APS_NEXT_COMMAND_VALUE 32783
|
#define _APS_NEXT_COMMAND_VALUE 32784
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1028
|
#define _APS_NEXT_CONTROL_VALUE 1028
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user