•  Back 
  •  Inquire functions 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File7.6.63  vqt_width                                                  TOS

 Name:         »Inquire character cell width« - Obtain the width of a 
               character cell.

 Opcode:       117

 Syntax:       int16_t vqt_width ( int16_t handle, int8_t character, 
               int16_t *cell_width, int16_t *left_delta, int16_t 
               *right_delta );

 Description:  The call vqt_width obtains the horizontal extent of a 
               specified character in the current font as well as of 
               the character cell, in pixels. The following apply:

                Parameter    Meaning

                handle       Workstation identifier
                character    Index of specified character
                cell_width   Cell width of the character
                left_delta   Left character alignment delta
                right_delta  Right character alignment delta

               Note: Special effects and rotation do not apply.

               If one applies this function to a vector font, one only 
               obtains the rounded-off step-size for the specified 
               character as remainders are not taken into account. 
               This step-size can be used only in connection with 
               v_gtext. If one tries to apply these step-sizes to 
               v_ftext, then wrong character positions will be 
               calculated. It is recommended you use vqt_advance 
               instead when inquiring about outline fonts.


index=2993
To check whether a font is monospaced or proportional, you should use vqt_ext_name which returns extended font information (under NVDI only). The values in left_delta and right_delta correspond exactly to the positions in the Horizontal offset table. If this specification is missing in the font header (which is the case for most bitmap fonts), then the return will be 0. Return value: The function returns the index of character, or -1 if an error has occurred. Availability: Supported by all drivers. Group: Inquire functions See Also: Binding vst_effects