Reference documentation and code samples for the Google Cloud Document Ai V1 Client class StyleInfo.
Font and other text style attributes.
Generated from protobuf message google.cloud.documentai.v1.Document.Page.Token.StyleInfo
Namespace
Google \ Cloud \ DocumentAI \ V1 \ Document \ Page \ TokenMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ font_size
int
Font size in points ( 1
point is ¹⁄₇₂
inches).
↳ pixel_font_size
↳ letter_spacing
float
Letter spacing in points.
↳ font_type
string
Name or style of the font.
↳ bold
↳ italic
bool
Whether the text is italic.
↳ underlined
bool
Whether the text is underlined.
↳ strikeout
bool
Whether the text is strikethrough.
↳ subscript
bool
Whether the text is a subscript.
↳ superscript
bool
Whether the text is a superscript.
↳ smallcaps
bool
Whether the text is in small caps.
↳ font_weight
int
TrueType weight on a scale 100
(thin) to 1000
(ultra-heavy). Normal is 400
, bold is 700
.
↳ handwritten
bool
Whether the text is handwritten.
↳ text_color
↳ background_color
getFontSize
Font size in points ( 1
point is ¹⁄₇₂
inches).
int
setFontSize
Font size in points ( 1
point is ¹⁄₇₂
inches).
var
int
$this
getPixelFontSize
Font size in pixels, equal to unrounded font_size
- resolution
÷
72.0.
float
setPixelFontSize
Font size in pixels, equal to unrounded font_size
- resolution
÷
72.0.
var
float
$this
getLetterSpacing
Letter spacing in points.
float
setLetterSpacing
Letter spacing in points.
var
float
$this
getFontType
Name or style of the font.
string
setFontType
Name or style of the font.
var
string
$this
getBold
Whether the text is bold (equivalent to font_weight
is at least 700
).
bool
setBold
Whether the text is bold (equivalent to font_weight
is at least 700
).
var
bool
$this
getItalic
Whether the text is italic.
bool
setItalic
Whether the text is italic.
var
bool
$this
getUnderlined
Whether the text is underlined.
bool
setUnderlined
Whether the text is underlined.
var
bool
$this
getStrikeout
Whether the text is strikethrough.
bool
setStrikeout
Whether the text is strikethrough.
var
bool
$this
getSubscript
Whether the text is a subscript.
bool
setSubscript
Whether the text is a subscript.
var
bool
$this
getSuperscript
Whether the text is a superscript.
bool
setSuperscript
Whether the text is a superscript.
var
bool
$this
getSmallcaps
Whether the text is in small caps.
bool
setSmallcaps
Whether the text is in small caps.
var
bool
$this
getFontWeight
TrueType weight on a scale 100
(thin) to 1000
(ultra-heavy).
Normal is 400
, bold is 700
.
int
setFontWeight
TrueType weight on a scale 100
(thin) to 1000
(ultra-heavy).
Normal is 400
, bold is 700
.
var
int
$this
getHandwritten
Whether the text is handwritten.
bool
setHandwritten
Whether the text is handwritten.
var
bool
$this
getTextColor
Color of the text.
hasTextColor
clearTextColor
setTextColor
Color of the text.
$this
getBackgroundColor
Color of the background.
hasBackgroundColor
clearBackgroundColor
setBackgroundColor
Color of the background.
$this

