This class represents the set of geometric character descriptions associated with a single font. We read the geometric description data from a predefined font file. In general a user does not create a font file. We can, however, adjust certain characteristics of a font such as its size and line spacing.
Inheritance Hierarchy
System MarshalByRefObject
Cognex.VisionPro.Implementation CogObjectBase
Cognex.VisionPro.Implementation CogSerializableObjectBase
Cognex.VisionPro.Implementation CogSerializableChangedEventBase
Cognex.VisionPro.OCVMax CogOCVMaxFont
Namespace: Cognex.VisionPro.OCVMax
Assembly: Cognex.VisionPro.OCVMax (in Cognex.VisionPro.OCVMax.dll) Version: 69.0.0.0
Syntax
The CogOCVMaxFont type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| CogOCVMaxFont | ||
| CogOCVMaxFont(CogOCVMaxFont) | ||
| CogOCVMaxFont(SerializationInfo, StreamingContext) |
Methods
| Name | Description | |
|---|---|---|
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| Dispose | ||
| Dispose(Boolean) | ||
| Equals | (Inherited from Object.) | |
| Finalize | (Overrides Object Finalize .) | |
| GetAttributes |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetAvailableCharacterKeys | Provide a list of each character key available in this font. | |
| GetAvailableCharacterKeys(Boolean) | Provide a list of each character key available in this font. | |
| GetAvailableCharacters | Provide a list of each character available in this font. | |
| GetAvailableFontNames | List the names of every font available within the specified font file. | |
| GetCharacterFullBounds( Int32 , CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create a System::Array of CogRectangleAffine that correspond to the individual selected space bounds of each character in the supplied text. These full bounds are determined using this font and the supplied parameters. | |
| GetCharacterFullBounds(String, CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create a System::Array of CogRectangleAffine that correspond to the individual selected space bounds of each character in the supplied text. These full bounds are determined using this font and the supplied parameters. | |
| GetCharacterFullBounds( String , CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create a System::Array of CogRectangleAffine that correspond to the individual selected space bounds of each character in the supplied text. These full bounds are determined using this font and the supplied parameters. | |
| GetCharacterMarkBounds( Int32 , CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create a System::Array of CogRectangleAffine that correspond to the individual selected space bounds of each character mark in the supplied text. These mark bounds are determined using this font and the supplied parameters. | |
| GetCharacterMarkBounds(String, CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create a System::Array of CogRectangleAffine that correspond to the individual selected space bounds of each character mark in the supplied text. These mark bounds are determined using this font and the supplied parameters. | |
| GetCharacterMarkBounds( String , CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create a System::Array of CogRectangleAffine that correspond to the individual selected space bounds of each character mark in the supplied text. These mark bounds are determined using this font and the supplied parameters. | |
| GetCharacterPoses( Int32 , CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create a System::Array of CogTransform2DLinear that correspond to the individual selected space poses of each character in the supplied text. These poses are determined using this font and the supplied parameters. | |
| GetCharacterPoses(String, CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create a System::Array of CogTransform2DLinear that correspond to the individual selected space poses of each character in the supplied text. These poses are determined using this font and the supplied parameters. | |
| GetCharacterPoses( String , CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create a System::Array of CogTransform2DLinear that correspond to the individual selected space poses of each character in the supplied text. These poses are determined using this font and the supplied parameters. | |
| GetClassName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetComponentName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetConverter |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultBlankCharacter | Provide the default blank character for this font. Since many fonts have multiple blank characters, this method identifies the one to be used as the default blank. | |
| GetDefaultBlankCharacterKey | Provide the key of the default blank character for this font. Since many fonts have multiple blank characters, this method identifies the one to be used as the default blank. | |
| GetDefaultEvent |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultProperty |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEditor |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetLineSpacingX | This is the (horizontal) spacing between adjacent line origins in this font, as interpreted using the supplied CogOCVMaxFontRenderParams object. Generally this will be the same as the value returned by the LineSpacingX property getter. If, however, SpotSpacingUsed is true for this font, then the value returned by this method will be the value returned by the LineSpacingX getter multiplied by the supplied render params object's SpotSpacingScaleX property. | |
| GetLineSpacingY | This is the (vertical) spacing between adjacent line origins in this font, as interpreted using the supplied CogOCVMaxFontRenderParams object. Generally this will be the same as the value returned by the LineSpacingY property getter. If, however, SpotSpacingUsed is true for this font, then the value returned by this method will be the value returned by the LineSpacingY getter multiplied by the supplied render params object's SpotSpacingScaleY property. | |
| GetObjectData | (Overrides CogSerializableObjectBase GetObjectData(SerializationInfo, StreamingContext).) | |
| GetProperties |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetProperties( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetPropertyOwner |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| Import(String) | Read in the first font description in the specified file. This font description will replace any previously imported font description. If you have modified SpotSize and/or LineSpacing in the currently loaded font, those settings will be lost. | |
| Import(String, String) | Read in a new font description with the specified name from the specified file. This font description will replace any previously imported font description. If you have modified SpotSize and/or LineSpacing in the currently loaded font, those settings will be lost. | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| IsBlank(Char) | Determine whether or not the supplied character is considered a blank in this font. Remember that many fonts have multiple blank characters. | |
| IsBlank(Int32) | Determine whether or not the character corresponding to the supplied character key is considered a blank in this font. Remember that many fonts have multiple blank characters. | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| OnChanged(Int64) |
This method should be called internally whenever the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) | |
| OnChanged(CogChangedEventArgs) |
This method may be called internally whenever a derived object's state
may have changed and the derived object expresses this change via a
derived CogChangedEventArgs class.
(Inherited from CogSerializableChangedEventBase.) | |
| RenderCompositeShape( Int32 , CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create a CogCompositeShape in which the supplied text is represented graphically by its outline. This outline is derived from the text as drawn using this font and the supplied parameters. | |
| RenderCompositeShape(String, CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create a CogCompositeShape in which the supplied text is represented graphically by its outline. This outline is derived from the text as drawn using this font and the supplied parameters. | |
| RenderCompositeShape( String , CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create a CogCompositeShape in which the supplied text is represented graphically by its outline. This outline is derived from the text as drawn using this font and the supplied parameters. | |
| RenderImage( Int32 , CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create an image in which the supplied text is drawn using this font and the supplied parameters. | |
| RenderImage(String, CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create an image in which the supplied text is drawn using this font and the supplied parameters. | |
| RenderImage( String , CogTransform2DLinear, CogOCVMaxFontRenderParams) | Create an image in which the supplied text is drawn using this font and the supplied parameters. | |
| ResumeAndRaiseChangedEvent |
Re-enables raising of the Changed event after SuspendChangedEvent
has been called, and raises the Changed event if the
ChangedEventSuspended count is reduced to zero and any changes were
made while events were suspended. Must be called once for each call to
SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.) | |
| SetCharacterOrigins | Set the origins as specified if the font is an image font. | |
| SuspendChangedEvent |
Temporarily suspends the raising of the Changed event. May be called
more than once, and a corresponding call to ResumeAndRaiseChangedEvent
must be made for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.) | |
| ToString | (Inherited from Object.) |
Fields
| Name | Description | |
|---|---|---|
| SfFontName | This bit will be set in the EventArgs of a Changed event every time the value returned by FontName may have changed. | |
| SfFontType | This bit will be set in the EventArgs of a Changed event every time the value returned by FontType may have changed. | |
| SfGetAvailableCharacters | This bit will be set in the EventArgs of a Changed event every time the value returned by GetAvailableCharacters may have changed. | |
| SfGetCharacterFullBounds | This bit will be set in the EventArgs of a Changed event every time the value returned by GetCharacterFullBounds may have changed. | |
| SfGetCharacterMarkBounds | This bit will be set in the EventArgs of a Changed event every time the value returned by GetCharacterMarkBounds may have changed. | |
| SfGetCharacterPoses | This bit will be set in the EventArgs of a Changed event every time the value returned by GetCharacterPoses may have changed. | |
| SfGetDefaultBlankCharacter | This bit will be set in the EventArgs of a Changed event every time the value returned by GetDefaultBlankCharacter may have changed. | |
| SfHasBlank | This bit will be set in the EventArgs of a Changed event every time the value returned by HasBlank may have changed. | |
| SfImported | This bit will be set in the EventArgs of a Changed event every time the value returned by Imported may have changed. | |
| SfImportFileName | This bit will be set in the EventArgs of a Changed event every time the value returned by ImportFileName may have changed. | |
| SfLineSpacingX | This bit will be set in the EventArgs of a Changed event every time the value returned by LineSpacingX may have changed. | |
| SfLineSpacingY | This bit will be set in the EventArgs of a Changed event every time the value returned by LineSpacingY may have changed. | |
| SfNextSf | ||
| SfProportional | This bit will be set in the EventArgs of a Changed event every time the value returned by Proportional may have changed. | |
| SfSpotSize | This bit will be set in the EventArgs of a Changed event every time the value returned by SpotSize may have changed. | |
| SfSpotSizeUsed | This bit will be set in the EventArgs of a Changed event every time the value returned by SpotSizeUsed may have changed. | |
| SfSpotSpacingUsed | This bit will be set in the EventArgs of a Changed event every time the value returned by SpotSpacingUsed may have changed. |
Properties
| Name | Description | |
|---|---|---|
| ChangedEventSuspended |
If nonzero, indicates that the raising of the Changed event has been
suspended. This value is incremented when SuspendChangedEvent is called
and decremented when ResumeAndRaiseChangedEvent is called.
(Inherited from CogSerializableChangedEventBase.) | |
| CharacterOriginsSettable | Whether the font is an image font whose characters can have their origins moved using SetCharacterOrigins. | |
| FontName | The name of this font, as defined in the imported font file. An exception is generated if this read-only property is accessed before importing a font file. | |
| FontType | The intrinsic style of this font: Raster, Stroke, Outline, or Image. | |
| HasBlank | Whether or not this font has a blank character. Not all fonts have a blank character. | |
| HasChanged | (Inherited from CogSerializableChangedEventBase.) | |
| ImageFont | Whether or not this font is an image font, i.e. whether it is based on stored bitmaps of characters rather than on synthetic descriptions of characters. | |
| Imported | Whether or not this font has been imported from a font file. True if it has, false if it has not. Most other CogOCVMaxFont properties and methods require that this be true. | |
| ImportFileName | The name of the file from which this font was imported. An exception is generated if this read-only property is accessed before importing a font file. | |
| LineSpacingX | This is the (horizontal) spacing between adjacent line origins in this font. | |
| LineSpacingY | This is the (vertical) spacing between adjacent line origins in this font. | |
| Proportional | Whether or not this font is proportional. A font is proportional if the characters do not all have the same advance value. | |
| SpotSize | In a laser printer, a laser beam is swept across a photo-sensitive drum. The diameter, in microns, of the laser beam at the drum surface is the spot size. Other printing processes have their own intrinsic spot size definition. Note that not all fonts use spot size. Please check the SpotSizeUsed property first before attempting to access the SpotSize property. | |
| SpotSizeUsed | Whether or not this font uses spot size. If this property is false, you may not get or set spot size (an exception will be thrown if you try). Like most font properties, an exception will be generated if this read-only property is accessed before importing a font file. | |
| SpotSpacingUsed | Whether or not this font uses spot spacing. Typically, raster and stroke fonts can use spot spacing, while outline and image fonts cannot. Like most font properties, an exception will be generated if this read-only property is accessed before importing a font file. | |
| StateFlags |
Returns the complete set of state flags supported on this object. The
flags may be indexed by name as shown in the following C# code snippet:
if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.) |
Events
| Name | Description | |
|---|---|---|
| Changed |
This event is raised when one or more parts of the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) |
See Also