GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MDRAW_TEXT (3)

NAME

mdraw_text - Draw an M-text on a window.

CONTENTS

Synopsis
Description
Return Value
Errors
Copyright

SYNOPSIS

int mdraw_text (MFrame * frame, MDrawWindow win, int x, int y, MText * mt, int from, int to)

DESCRIPTION

Draw an M-text on a window.

The mdraw_text() function draws the text between from and to of M-text mt on window win of frame frame at coordinate (x, y).

The appearance of the text (size, style, color, etc) is specified by the value of the text property whose key is Mface. If the M-text or a part of the M-text does not have such a text property, the default face of frame is used.

The font used to draw a character in the M-text is selected from the value of the fontset property of a face by the following algorithm:

1. Search the text properties given to the character for the one whose key is Mcharset; its value should be either a symbol specifying a charset or Mnil. If the value is Mnil, proceed to the next step.
Otherwise, search the mapping table of the fontset for the charset. If no entry is found proceed to the next step.

If an entry is found, use one of the fonts in the entry that has a glyph for the character and that matches best with the face properties. If no such font exists, proceed to the next step.

2. Get the character property ’script’ of the character. If it is inherited, get the script property from the previous characters. If there is no previous character, or none of them has the script property other than inherited, proceed to the next step.
Search the text properties given to the character for the one whose key is Mlanguage; its value should be either a symbol specifying a language or Mnil.

Search the mapping table of the fontset for the combination of the script and language. If no entry is found, proceed to the next step.

If an entry is found, use one of the fonts in the entry that has a glyph for the character and that matches best with the face properties. If no such font exists, proceed to the next step.

3. Search the fall-back table of the fontset for a font that has a glyph of the character. If such a font is found, use that font.

If no font is found by the algorithm above, this function draws an empty box for the character.

This function draws only the glyph foreground. To specify the background color, use mdraw_image_text() or mdraw_text_with_control().

This function is the counterpart of XDrawString(), XmbDrawString(), and XwcDrawString() functions in the X Window System.

RETURN VALUE

If the operation was successful, mdraw_text() returns 0. If an error is detected, it returns -1 and assigns an error code to the external variable merror_code.

ERRORS

MERROR_RANGE

SEE ALSO

mdraw_image_text()

COPYRIGHT

Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2009 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.
Search for    or go to Top of page |  Section 3 |  Main Index


MDRAW_TEXT (3m17n) 15 Oct 2009

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.