2012-05-17 23:08 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/include/hbgtinfo.ch
+ added new HB_GTI_FONTATTRIBUTE value: HB_GTI_FONTA_CTRLCHARS
When used it forces using CTRL characters (from chr(0) to chr(31))
directly without translation to CP437 unicode values.
In windows some fonts need it to correctly display them.
* harbour/src/rtl/gtwvt/gtwvt.h
* harbour/src/rtl/gtwvt/gtwvt.c
+ added support for
hb_gtInfo( HB_GTI_FONTATTRIBUTE, HB_GTI_FONTA_CTRLCHARS )
* harbour/src/rtl/hbgtcore.c
! do not replace CTRL chars with '?' in HB_GTSELF_GETUC() method
This commit is contained in:
@@ -16,6 +16,21 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-05-17 23:08 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* harbour/include/hbgtinfo.ch
|
||||
+ added new HB_GTI_FONTATTRIBUTE value: HB_GTI_FONTA_CTRLCHARS
|
||||
When used it forces using CTRL characters (from chr(0) to chr(31))
|
||||
directly without translation to CP437 unicode values.
|
||||
In windows some fonts need it to correctly display them.
|
||||
|
||||
* harbour/src/rtl/gtwvt/gtwvt.h
|
||||
* harbour/src/rtl/gtwvt/gtwvt.c
|
||||
+ added support for
|
||||
hb_gtInfo( HB_GTI_FONTATTRIBUTE, HB_GTI_FONTA_CTRLCHARS )
|
||||
|
||||
* harbour/src/rtl/hbgtcore.c
|
||||
! do not replace CTRL chars with '?' in HB_GTSELF_GETUC() method
|
||||
|
||||
2012-05-17 22:54 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* include/harbour.hbx
|
||||
! minor
|
||||
|
||||
@@ -165,6 +165,7 @@
|
||||
#define HB_GTI_FONTA_FIXMETRIC 1
|
||||
#define HB_GTI_FONTA_CLRBKG 2
|
||||
#define HB_GTI_FONTA_DRAWBOX 4
|
||||
#define HB_GTI_FONTA_CTRLCHARS 8
|
||||
|
||||
/* Keyboard shifts states */
|
||||
#define HB_GTI_KBD_SHIFT 0x000001
|
||||
|
||||
@@ -323,6 +323,7 @@ static PHB_GTWVT hb_gt_wvt_New( PHB_GT pGT, HINSTANCE hInstance, int iCmdShow )
|
||||
pWVT->fontHeight = WVT_DEFAULT_FONT_HEIGHT;
|
||||
pWVT->fontWeight = FW_NORMAL;
|
||||
pWVT->fontQuality = DEFAULT_QUALITY;
|
||||
pWVT->fontAttribute = WVT_DEFAULT_FONT_ATTR;
|
||||
HB_STRNCPY( pWVT->fontFace, WVT_DEFAULT_FONT_NAME, HB_SIZEOFARRAY( pWVT->fontFace ) - 1 );
|
||||
|
||||
pWVT->CaretExist = HB_FALSE;
|
||||
@@ -1712,7 +1713,8 @@ static void hb_gt_wvt_PaintText( PHB_GTWVT pWVT )
|
||||
HB_USHORT usChar;
|
||||
if( !HB_GTSELF_GETSCRCHAR( pWVT->pGT, iRow, iCol, &iColor, &bAttr, &usChar ) )
|
||||
break;
|
||||
usChar = hb_cdpGetU16Ctrl( usChar );
|
||||
if( ( pWVT->fontAttribute & HB_GTI_FONTA_CTRLCHARS ) == 0 )
|
||||
usChar = hb_cdpGetU16Ctrl( usChar );
|
||||
|
||||
/* as long as GTWVT uses only 16 colors we can ignore other bits
|
||||
* and not divide output when it does not change anythings
|
||||
@@ -2498,6 +2500,12 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
|
||||
}
|
||||
break;
|
||||
|
||||
case HB_GTI_FONTATTRIBUTE:
|
||||
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->fontAttribute );
|
||||
if( hb_itemType( pInfo->pNewVal ) & HB_IT_NUMERIC )
|
||||
pWVT->fontAttribute = hb_itemGetNI( pInfo->pNewVal ) & HB_GTI_FONTA_CTRLCHARS;
|
||||
break;
|
||||
|
||||
case HB_GTI_SCREENHEIGHT:
|
||||
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->PTEXTSIZE.y * pWVT->ROWS );
|
||||
iVal = hb_itemGetNI( pInfo->pNewVal );
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
# define WVT_DEFAULT_FONT_HEIGHT 20
|
||||
# define WVT_DEFAULT_FONT_WIDTH 10
|
||||
#endif
|
||||
#define WVT_DEFAULT_FONT_ATTR 0
|
||||
#define WVT_DEFAULT_FONT_NAME TEXT( "Courier New" )
|
||||
|
||||
#define BLACK RGB( 0x00, 0x00, 0x00 )
|
||||
@@ -143,6 +144,7 @@ typedef struct
|
||||
int fontWidth; /* requested font width */
|
||||
int fontWeight; /* Bold level */
|
||||
int fontQuality; /* requested font quality */
|
||||
int fontAttribute; /* font attribute: HB_GTI_FONTA_* */
|
||||
TCHAR fontFace[ LF_FACESIZE ]; /* requested font face name LF_FACESIZE #defined in wingdi.h */
|
||||
HFONT hFont; /* current font handle */
|
||||
#if ! defined( UNICODE )
|
||||
|
||||
@@ -799,7 +799,7 @@ static HB_BOOL hb_gt_def_GetUC( PHB_GT pGT, int iRow, int iCol,
|
||||
if( pGT->cdpHost && pGT->cdpTerm != pGT->cdpHost )
|
||||
uc = hb_cdpGetUC( pGT->cdpHost, wc, 0 );
|
||||
if( uc == 0 )
|
||||
uc = hb_cdpGetUC( hb_vmCDP(), wc, '?' );
|
||||
uc = hb_cdpGetUC( hb_vmCDP(), wc, wc < 32 ? ( HB_UCHAR ) wc : '?' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user