Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 30 JUN 1999 02:32:35PM Deb Spencer wrote:

I've been searching through the Discussions & Knowledge Base but haven't found anything regarding this so far (although I could have missed something).

When I print out samples of font sizes direct from Windows 98, Lotus WordPro, WordPad, and Revelation Reporter, all the Times New Roman, Regular, 12pt fonts are identical. HOWEVER, when I print out the same font sample using the below code the 12pt that I selected prints out as 16pt.

WIN_HANDLE=GET_PROPERTY(@WINDOW,'HANDLE')

status=PRINT_INIT(0,'Testing Print_Init',WIN_HANDLE)

FONT_STRUCTURE=UTILITY( 'CHOOSEFONT', '@MDIFRAME', '')

PRINT_STRUCTURE=FONT_STRUCTURE

SWAP @SVM WITH ',' IN PRINT_STRUCTURE

status=PRINT_SETFONT(FONT_STRUCTURE)

status=PRINT_TEXT('————————')

status=PRINT_TEXT(PRINT_STRUCTURE)

status=PRINT_TEXT('The quick brown fox jumps over the lazy dog.')

status=PRINT_END()

I'm doing this testing on a Dell Inspiron Notebook and receive the same results whether I print to a networked HP 4 Laser Printer or a local HP OfficeJet LX Printer.

The actual font structure that I'm receiving from the Utility CHOOSEFONT is 'Times New Roman,-16,400,0,0,0,0,18,0,3,2,1,0,0,0,0'.

Shouldn't CHOOSEFONT be returning '-12' instead of the above '-16'?

FYI: the above code is in an event script on a menu item on my MDI Frame.


At 30 JUN 1999 03:27PM Oystein Reigem wrote:

Deb,

Shouldn't CHOOSEFONT be returning '-12' instead of the above '-16'?

A difference is quite normal.

But it's a long time since I tried to investigate this, and either I didn't take sufficient notes of what I found out, or I didn't reach a definite conclusion about what difference to expect.

But for now I would assume your CHOOSEFONT is correct.

- Oystein -


At 30 JUN 1999 07:05PM Deb Spencer wrote:

The difference may be the norm for OI, but my Users would get confused if they need to select 8pt to get something that looks similar to 12pt in all their other apps. So…I wrote my own function which gets the FontStructure from CHOOSEFONT and then alters the Height value before returning it to me. The following may not the most efficient or technically correct way to deal with it, but I now get results consistent with my other Windows apps:

FONT_STRUCTURE=UTILITY( 'CHOOSEFONT', OWNER_WINDOW, DFLT_STRUCTURE)

THE.SIZE=FONT_STRUCTURE

BEGIN CASE

 CASE THE.SIZE ] '-15'   ; THE.SIZE += 3	;* 8,9,10 pt
 CASE THE.SIZE ] '-19'   ; THE.SIZE += 4	;* 11,12 pt
 CASE THE.SIZE ] '-24'   ; THE.SIZE += 5	;* 14,16 pt
 CASE THE.SIZE ] '-27'   ; THE.SIZE += 6	;* 18 pt
 CASE THE.SIZE ] '-32'   ; THE.SIZE += 7	;* 20,22 pt
 CASE THE.SIZE ] '-35'   ; THE.SIZE += 8	;* 24 pt
 CASE THE.SIZE ] '-48'   ; THE.SIZE += 9	;* 26,28 pt
 CASE THE.SIZE ] '-64'   ; THE.SIZE += 12	;* 36 pt
 CASE THE.SIZE ] '-96'   ; THE.SIZE += 16	;* 48 pt
 CASE TRUE$		   ; THE.SIZE += 24	;* 72 pt

END CASE

FONT_STRUCTURE=THE.SIZE

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/17d5a7e1f9adfae0852567a00065dc7f.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1