RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Font_StringWidth

Programmer's Reference Manuals
» Part 8 - Non-kernel input/output
» The Font Manager
» SWI Calls
» Font_StringWidth

Font_StringWidth

(SWI &40085)
Entry
R1 Pointer to string
R2 Max width in millipoints
R3 Max height in millpoints
R4 Split character, or -1 for none
R5 Max string length
Exit
R1 Pointer to where scan ended
R2 Width of scanned string
R3 Height of scanned string
R4 Number of split characters found
R5 Length of scanned string

Use

The purpose of this call is to calculate how wide a string would in the current font under the given limits.

Notes

This call is deprecated. Font_ScanString should be used instead.

The call can be used to calculate any of the following:

  • Finding the caret position in a string if the co-ordinates are known
  • Finding the caret co-ordinates if you know the position
  • Finding the length of a string when using justification
  • Calculating where to split lines when formatting (set R4=32)
  • Calculating the required data for justification

See also

  • Font_ScanString
Created on October 24, 2009 22:45:38 by Alan Robertson (52)? (127.0.0.1)
Edit | Views: Print | Source | Linked from: The Font Manager SWI Calls, Font_FutureFont, Font_CurrentFont, Font_FutureRGB

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys