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. This feature is not supported yet.
↳ subscript
bool
Whether the text is a subscript. This feature is not supported yet.
↳ superscript
bool
Whether the text is a superscript. This feature is not supported yet.
↳ smallcaps
bool
Whether the text is in small caps. This feature is not supported yet.
↳ 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. This feature is not supported yet.
bool
setStrikeout
Whether the text is strikethrough. This feature is not supported yet.
var
bool
$this
getSubscript
Whether the text is a subscript. This feature is not supported yet.
bool
setSubscript
Whether the text is a subscript. This feature is not supported yet.
var
bool
$this
getSuperscript
Whether the text is a superscript. This feature is not supported yet.
bool
setSuperscript
Whether the text is a superscript. This feature is not supported yet.
var
bool
$this
getSmallcaps
Whether the text is in small caps. This feature is not supported yet.
bool
setSmallcaps
Whether the text is in small caps. This feature is not supported yet.
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

