1 /**************************************************************************
2 ** (c) Copyright 1998, Andromeda Technology & Automation
3 ***************************************************************************
4 ** MODULE INFORMATION *
5 ***********************
6 ** FILE NAME : font.cpp
7 ** SYSTEM NAME : AXE - Andromeda X-windows Encapsulation
8 ** VERSION NUMBER : $Revision: 1.2 $
10 ** DESCRIPTION : Implementation of font class
12 ** EXPORTED OBJECTS : font::TextWidth()
15 ***************************************************************************
16 ** ADMINISTRATIVE INFORMATION *
17 ********************************
18 ** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
19 ** CREATION DATE : Feb 13, 1998
20 ** LAST UPDATE : Feb 13, 1998
22 **************************************************************************/
24 /*****************************
26 Revision 1.2 2002-11-04 07:24:31 arjen
27 Use proper namespace for iostream classes
29 Revision 1.1 2002/07/25 08:01:26 arjen
30 First checkin, AXE release 0.2
32 *****************************/
34 static const char *RCSID = "$Id: font.cpp,v 1.2 2002-11-04 07:24:31 arjen Exp $";
39 int font::TextWidth(char *string, int length)
43 length = strlen(string);
46 return XTextWidth(fs, string, length);
49 int font::TextWidth(const String & string)
51 return XTextWidth(fs, string, ~string);