Wide Studio Object Reference

| Wide Studio Object Reference |
Wide Studio Home
Up to
  ## Class Name WSDfont ## Specification of methods ### getFontName Function Description Form char* getFontName() Function Obtain a font name Description Parameters None. Return value Font name Notice Samples
        //Obtain a font name
        WSDfont* font = WSGIappFontSet()->getDefaultFont();
        char* fname = font->getFontName();
  ### getFontHeight Function Description Form long getFontHeight() Function Obtain font height Description Parameters None Return value Font height Notice Samples
        //Obtain font height
        WSDfont* font = WSGIappFontSet()->getDefaultFont();
        long fheight = font->getFontHeight();
  ### getStringWidth Function Description Form long getStringWidth(WSCstring* str) Function Obtain width of specified strings Description Parameters
  (out)WSCstring* str | Strings

Return value
  String width
Notice
Samples

        //Obtain strings width
        WSDfont* font = WSGIappFontSet()->getDefaultFont();
        WSCstring str;
        str = "abcde";
        long swidth = font->getStringWidth(&str);

  ### getStringHeight Function Description

  Form
    long getStringHeight(WSCstring* str)
  Function
    Obtain height of specified strings
  Description
  Parameters

    (out)WSCstring* str | Strings

  Return value
    String height
  Notice
  Samples

          //Obtain strings height
          WSDfont* font = WSGIappFontSet()->getDefaultFont();
          WSCstring str;
          str = "abcde";
          long sheight = font->getStringHeight(&str);

  ### getStringWidthUCS2 Function Description

  Form
    long getStringWidthUCS2(WSCushort* str)
  Function
    Obtain width of specified strings
  Description
  Parameters

    (out)WSCushort* str | UCS2 strings

  Return value
    String width
  Notice
  Samples

          //Obtain width of UCS2 character strings
          WSDfont* font = WSGIappFontSet()->getDefaultFont();
          WSCushort* str = WSGFgetUCS2("abcde",WS_EN_DEFAULT);
          long swidth = font->getStringWidthUCS2(str);
          delete str;

  ### getStringHeightUCS2 Function Description

  Form
    long getStringHeightUCS2(WSCushort* str)
  Function
    Obtain height of specified strings
  Description
  Parameters

    (out)WSCushort* str | UCS2 strings

  Return value
    String height
  Notice
  Samples

          //Obtain height of UCS2 character strings
          WSDfont* font = WSGIappFontSet()->getDefaultFont();
          WSCushort* str = WSGFgetUCS2("abcde",WS_EN_DEFAULT);
          long sheight = font->getStringHeightUCS2(str);
          delete str;

  Document Release 3.20
  For use with Wide Studio Release 3.20, Spring 2003

  Wide Studio Home | Up to

  Copyright(C) T. Hirabayashi, 1999-2003 |  | Last modified: February 3, 2003