首页 / design / oaFont

oaFont

模块: oapy._oa._design 导入: from oapy._oa import _design

概览

oaFontoapy 中可用,可通过 _design 模块访问。

本页汇总 oaFont 当前在 oapy 中可用的 Python 接口。

详细说明

The oaFont class implements an enumerated font type。 This class also implements functions for calculating the bounding box of any text string in a specified font with a specified set of attributes。 enum oaFontEnum Enumeration values: oacEuroStyleFont "euroStyle" oacGothicFont "gothic" oacMathFont "math" oacRomanFont "roman" oacScriptFont "script" oacStickFont "stick" oacFixedFont "fixed" oacSwedishFont "swedish" oacMilSpecFont "milSpec"。

构造函数

_design.oaFont()

obj = _design.oaFont()

_design.oaFont(valueIn)

obj = _design.oaFont(valueIn)

_design.oaFont(name)

obj = _design.oaFont(name)

方法总览

状态 Python 调用
obj.calcBBox(origin, text, height, textAlign, orient, hasOverbar, bBox)
obj.calcBBox(origin, text, height, textAlign, orient, hasOverbar, bBox)
obj.getName()

方法说明

obj.calcBBox(origin, text, height, textAlign, orient, hasOverbar, bBox)

绑定状态: 已绑定

Python 调用: obj.calcBBox(origin, text, height, textAlign, orient, hasOverbar, bBox)

This function calculates the bounding box for the specified arguments in the current font。

参数

  • origin: The origin point of the bounding box。
  • text: The text for which to calculate the bounding box。
  • height: The height of the bounding box。
  • textAlign: The text alignment of the bounding box。
  • orient: The orientation of the bounding box。
  • hasOverbar: Determines if the text has a bar over it。
  • bBox: The bounding box specifications。

Python 示例

from oapy._oa import _design

# assume obj is a oaFont
obj.calcBBox(origin, text, height, textAlign, orient, hasOverbar, bBox)

obj.calcBBox(origin, text, height, textAlign, orient, hasOverbar, bBox)

绑定状态: 已绑定

Python 调用: obj.calcBBox(origin, text, height, textAlign, orient, hasOverbar, bBox)

This function calculates the bounding box for the specified arguments in the current font。

参数

  • origin: The origin point of the bounding box。
  • text: The text for which to calculate the bounding box。
  • height: The height of the bounding box。
  • textAlign: The text alignment of the bounding box。
  • orient: The orientation of the bounding box。
  • hasOverbar: Determines if the text has a bar over it。
  • bBox: The bounding box specifications。

Python 示例

from oapy._oa import _design

# assume obj is a oaFont
obj.calcBBox(origin, text, height, textAlign, orient, hasOverbar, bBox)

obj.getName()

绑定状态: 已绑定

Python 调用: obj.getName()

This function returns the name string associated with the encapsulated oaFontEnum object。

Python 示例

from oapy._oa import _design

# assume obj is a oaFont
obj.getName()