Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ps_string_geometry(3) [php man page]

PS_STRING_GEOMETRY(3)							 1						     PS_STRING_GEOMETRY(3)

ps_string_geometry - Gets geometry of a string

SYNOPSIS
array ps_string_geometry (resource $psdoc, string $text, [int $fontid], [float $size = 0.0]) DESCRIPTION
This function is similar to ps_stringwidth(3) but returns an array of dimensions containing the width, ascender, and descender of the text. PARAMETERS
o $psdoc - Resource identifier of the postscript file as returned by ps_new(3). o $text - The text for which the geometry is to be calculated. o $fontid - The identifier of the font to be used. If not font is specified the current font will be used. o $size - The size of the font. If no size is specified the current size is used. RETURN VALUES
An array of the dimensions of a string. The element 'width' contains the width of the string as returned by ps_stringwidth(3). The element 'descender' contains the maximum descender and 'ascender' the maximum ascender of the string. SEE ALSO
ps_continue_text(3), ps_stringwidth(3). PHP Documentation Group PS_STRING_GEOMETRY(3)

Check Out this Related Man Page

PDF::API2::Resource::BaseFont(3pm)			User Contributed Perl Documentation			PDF::API2::Resource::BaseFont(3pm)

NAME
PDF::API2::Resource::BaseFont - base font class METHODS
$font = PDF::API2::Resource::BaseFont->new $pdf, $name Returns a font resource object. $font = PDF::API2::Resource::BaseFont->new_api $api, $name Returns a font resource object. This method is different from 'new' that it needs an PDF::API2-object rather than a Text::PDF::File-object. $descriptor = $font->descrByData() Returns the fonts FontDescriptor key-structure based on the fonts data. FONT-MANAGEMENT RELATED METHODS $name = $font->fontname() Returns the fonts name (aka. display-name). $name = $font->altname() Returns the fonts alternative-name (aka. windows-name for a postscript font). $name = $font->subname() Returns the fonts subname (aka. font-variant, schriftschnitt). $name = $font->apiname() Returns the fonts name to be used internally (should be equal to $font->name). $issymbol = $font->issymbol() Returns the fonts symbol flag. $iscff = $font->iscff() Returns the fonts compact-font-format flag. TYPOGRAPHY RELATED METHODS
($llx, $lly, $urx, $ury) = $font->fontbbox() Returns the fonts bounding-box. $capheight = $font->capheight() Returns the fonts capheight value. $xheight = $font->xheight() Returns the fonts xheight value. $missingwidth = $font->missingwidth() Returns the fonts missingwidth value. $maxwidth = $font->maxwidth() Returns the fonts maxwidth value. $avgwidth = $font->avgwidth() Returns the fonts avgwidth value. $flags = $font->flags() Returns the fonts flags value. $stemv = $font->stemv() Returns the fonts stemv value. $stemh = $font->stemh() Returns the fonts stemh value. $italicangle = $font->italicangle() Returns the fonts italicangle value. $isfixedpitch = $font->isfixedpitch() Returns the fonts isfixedpitch flag. $underlineposition = $font->underlineposition() Returns the fonts underlineposition value. $underlinethickness = $font->underlinethickness() Returns the fonts underlinethickness value. $ascender = $font->ascender() Returns the fonts ascender value. $descender = $font->descender() Returns the fonts descender value. GLYPH RELATED METHODS
@names = $font->glyphNames() Returns the defined glyph-names of the font. $glNum = $font->glyphNum() Returns the number of defined glyph-names of the font. $uni = $font->uniByGlyph $char Returns the unicode by glyph-name. $uni = $font->uniByEnc $char Returns the unicode by the fonts encoding map. $uni = $font->uniByMap $char Returns the unicode by the fonts default map. $char = $font->encByGlyph $glyph Returns the character by the given glyph-name of the fonts encoding map. $char = $font->encByUni $uni Returns the character by the given unicode of the fonts encoding map. $char = $font->mapByGlyph $glyph Returns the character by the given glyph-name of the fonts default map. $char = $font->mapByUni $uni Returns the character by the given unicode of the fonts default map. $name = $font->glyphByUni $unicode Returns the glyphs name by the fonts unicode map. BEWARE: non-standard glyph-names are mapped onto the ms-symbol area(0xF000). $name = $font->glyphByEnc $char Returns the glyphs name by the fonts encoding map. $name = $font->glyphByMap $char Returns the glyphs name by the fonts default map. $width = $font->wxByGlyph $glyph Returns the glyphs width. $width = $font->wxByUni $uni Returns the unicodes width. $width = $font->wxByEnc $char Returns the characters width based on the current encoding. $width = $font->wxByMap $char Returns the characters width based on the fonts default encoding. $wd = $font->width $text Returns the width of $text as if it were at size 1. BEWARE: works only correctly if a proper perl-string is used either in native or utf8 format (check utf8-flag). @widths = $font->width_array $text Returns the widths of the words in $text as if they were at size 1. STRING METHODS
$utf8string = $font->utfByStr $string Returns the utf8-string from string based on the fonts encoding map. $string = $font->strByUtf $utf8string Returns the encoded string from utf8-string based on the fonts encoding map. $pdfstring = $font->textByStr $text Returns a properly formatted representation of $text for use in the PDF. AUTHOR
Alfred Reibenschuh. perl v5.14.2 2014-03-09 PDF::API2::Resource::BaseFont(3pm)
Man Page