When writing to the screen using the DCSAY ... GET or DCGET commands,
you cannot use CodePage as DCPRINT FONT CODEPAGE, especially since Windows 7 has been using scalable fonts.
The New scalables fonts versions make it easier to write in multiple languages from most fonts in use.
In the printing it is OK we can use them without difficulty, it suffices to specify CodePage.
Is there a possibility to do the same for the screen.
Note: If we use oFont instead of cFont to specify CodePage an error occurs (xBase 1.90.355)
CodePage in DCSAY or DCGET
-
- Posts: 42
- Joined: Mon Dec 23, 2013 2:10 pm
- Contact:
Re: CodePage in DCSAY or DCGET
Send me a sample program so I can see the error.
The eXpress train is coming - and it has more cars.
-
- Posts: 42
- Joined: Mon Dec 23, 2013 2:10 pm
- Contact:
Re: CodePage in DCSAY or DCGET
Thanks Roger,
I solved the error.
i modified the following line in _dcgetbx.prg
To
I solved the error.
i modified the following line in _dcgetbx.prg
Code: Select all
IF !Empty(aOptions[cGETOPT_FONT])
::drawingArea:setFontCompoundName(aOptions[cGETOPT_FONT])
ELSE
// ::drawingArea:setFontCompoundName( Dc_BaseFont(7) )
::drawingArea:setFontCompoundName( Dc_BaseFont() ) // Jack Duijf 17-07-2014
ENDIF
Code: Select all
IF !Empty(aOptions[cGETOPT_FONT]) .And. ValType(aOptions[cGETOPT_FONT])="C"
::drawingArea:setFontCompoundName(aOptions[cGETOPT_FONT])
ELSEIF !Empty(aOptions[cGETOPT_FONT]) .And. ValType(aOptions[cGETOPT_FONT])="O"
::drawingArea:setFont(aOptions[cGETOPT_FONT]) // Messaoud Mohamed Lazhar 19/05/2021
ELSE
// ::drawingArea:setFontCompoundName( Dc_BaseFont(7) )
::drawingArea:setFontCompoundName( Dc_BaseFont() ) // Jack Duijf 17-07-2014
ENDIF
Last edited by messaoudlazhar on Wed May 19, 2021 1:29 pm, edited 2 times in total.
-
- Posts: 42
- Joined: Mon Dec 23, 2013 2:10 pm
- Contact:
Re: CodePage in DCSAY or DCGET
But to display with the DCSAY ... GET command by Object Fonts (oFont),
the SAY part does not work. on the other hand it works with GET.
the SAY part does not work. on the other hand it works with GET.
Code: Select all
FontSayAr:=SelectFontAppl("Times New Roman",14,8,178)
@ 2,2 DCSAY "المالك........... :" GET nompra GETSIZE 50 SAYFONT FontSayAr
@ 3,2 DCSAY "الصفة............ :" GET nomraisa GETSIZE 50 SAYFONT FontSayAr
@ 4,2 DCSAY "النشاط........... :" get activpra1 GETSIZE 50 SAYFONT FontSayAr
@ 5,32 DCget activpra2 GETSIZE 50
DCREAD GUI MODAL FIT ADDBUTTONS SETAPPWINDOW OPTIONS MyGetOptions(200) TITLE "TEST" ENTEREXIT
RETURN
****
********---------------
Function SelectFontAppl
Local oApplFont
Parameters cNFont,nFSize,nFWidth,nCodePage
cCompoundName := StrTran(Ntrim(nFSize,3)+ '.' + cNFont,"..",".")
oApplFont:=XBPFont():New()
oApplFont:FamilyName:=cNFont
oApplFont:Height:=nFSize
oApplFont:Width:=nFWidth
oApplFont:vector := .T.
oApplFont:Create(cCompoundName)
oApplFont:CodePage:=nCodePage
oApplFont:configure(cCompoundName)
Return oApplFont
********---------------
Function MyGetOptions
Local GetOptions, cSayFontTmp
Parameters MaLargSay
DCGETOPTIONS FONT SelectFontAppl("Times New Roman",14,8,178); // 178 : Arabic
GETFONT SelectFontAppl("Times New Roman Bold",13,8,178);
ROWSPACE 25 SAYHEIGHT 25 GETHEIGHT 25 ROWPIXELS 25 TABSTOP
If ValType(MaLargSay)="N"
GetOptions[6]:=MaLargSay
Endif
DC_GetOptDefault( GetOptions )
Return GetOptions
- Attachments
-
- test.jpg (17.79 KiB) Viewed 10533 times
Last edited by messaoudlazhar on Wed May 19, 2021 1:25 pm, edited 1 time in total.
-
- Posts: 42
- Joined: Mon Dec 23, 2013 2:10 pm
- Contact:
Re: CodePage in DCSAY or DCGET
I solved the problem with copying a font from windows XP "Simplified Arabic"
and renamed it to "MML Simplified Arabic" to be able to use it for Windows 7 and Windows 10.
But if I can use the same font for SAY and GET is better
and renamed it to "MML Simplified Arabic" to be able to use it for Windows 7 and Windows 10.
But if I can use the same font for SAY and GET is better
Code: Select all
FontSayAr:=SelectFontAppl("MML Simplified Arabic",14,8,178)
*FontSayAr:=SelectFontAppl("Times New Roman",14,8,178)
@ 2,2 DCSAY "المالك........... :" GET nompra GETSIZE 50 SAYFONT FontSayAr
@ 3,2 DCSAY "الصفة............ :" GET nomraisa GETSIZE 50 SAYFONT FontSayAr
@ 4,2 DCSAY "النشاط........... :" get activpra1 GETSIZE 50 SAYFONT FontSayAr
@ 5,32 DCget activpra2 GETSIZE 50 GETFONT FontSayAr
DCREAD GUI MODAL FIT ADDBUTTONS SETAPPWINDOW;
OPTIONS MyGetOptions(200) TITLE "MISE A JOUR PARAMETRES PROPRIETAIRE"+siinst ENTEREXIT
RETURN
- Attachments
-
- test2.jpg (14.99 KiB) Viewed 10531 times
Re: CodePage in DCSAY or DCGET
hi
when Dbase III appear they use 8 Bit and ANSI where Sign > CHR(128) are different
using Cl*pper and NTX most DBF are OEM so Alaska use "automatic conversation" for DBF : OEM <-> ANSI
so for international Apps it is recommend to use "-ga" for "ANSI Apps"
---
i use Chinese Sign with DBCS and ARIAL UNICODE Font (from M$ Office).
his Way i can "show" Chinese Sign on German OS ... but i need Chinese OS to "enter" Chinese Sign
while Xbase++ does not full support UNICODE i have change App Compiler / LIBs
now i have re-wrote Apps with harbour where i can use Codepage with DBF und use UTF-8.
xBase was create as 7 Bit where you have Sign up to CHR(128)messaoudlazhar wrote: ↑Wed May 19, 2021 1:24 pm I solved the problem with copying a font from windows XP "Simplified Arabic"
when Dbase III appear they use 8 Bit and ANSI where Sign > CHR(128) are different
using Cl*pper and NTX most DBF are OEM so Alaska use "automatic conversation" for DBF : OEM <-> ANSI
so for international Apps it is recommend to use "-ga" for "ANSI Apps"
---
i use Chinese Sign with DBCS and ARIAL UNICODE Font (from M$ Office).
his Way i can "show" Chinese Sign on German OS ... but i need Chinese OS to "enter" Chinese Sign
while Xbase++ does not full support UNICODE i have change App Compiler / LIBs
now i have re-wrote Apps with harbour where i can use Codepage with DBF und use UTF-8.
greetings by OHR
Jimmy
Jimmy
Re: CodePage in DCSAY or DCGET
The GET system requires a fixed font whereas your font looks like a proportional font.But if I can use the same font for SAY and GET is better
Do you have a version of the font that is non-proportional?
The eXpress train is coming - and it has more cars.
-
- Posts: 42
- Joined: Mon Dec 23, 2013 2:10 pm
- Contact:
Re: CodePage in DCSAY or DCGET
hi Roger,
You will find attached 2 fonts of 2 different versions that you can compare
ArabicXP : Version 1.01
NewArabic : Version 6.98 (Multiples Codepage)
You will find attached 2 fonts of 2 different versions that you can compare
ArabicXP : Version 1.01
NewArabic : Version 6.98 (Multiples Codepage)
- Attachments
-
- NewArabic.rar
- (238.48 KiB) Downloaded 600 times
-
- ArabicXP.rar
- (83.06 KiB) Downloaded 635 times