Package org.opencv.imgproc

## Class FontFace

- java.lang.Object
- - org.opencv.imgproc.FontFace

-     public class FontFace
      extends java.lang.Object

  Wrapper on top of a truetype/opentype/etc font, i.e. Freetype's FT_Face. The class is used to store the loaded fonts; the font can then be passed to the functions putText and getTextSize.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected long` | `nativeObj` |

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `` | `FontFace()` | loads default font
    `protected` | `FontFace​(long addr)` |
    `` | `FontFace​(java.lang.String fontPathOrName)` | loads font at the specified path or with specified name.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static FontFace` | `__fromPtr__​(long addr)` |
    `protected void` | `finalize()` |
    `boolean` | `getInstance​(MatOfInt params)` |
    `java.lang.String` | `getName()` |
    `long` | `getNativeObjAddr()` |
    `boolean` | `set​(java.lang.String fontPathOrName)` | loads new font face
    `boolean` | `setInstance​(MatOfInt params)` | sets the current variable font instance.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### nativeObj

          protected final long nativeObj

  - ### Constructor Detail

    - #### FontFace

          protected FontFace​(long addr)

    - #### FontFace

          public FontFace()

      loads default font

    - #### FontFace

          public FontFace​(java.lang.String fontPathOrName)

      loads font at the specified path or with specified name.
      Parameters:
        `fontPathOrName` - either path to the custom font or the name of embedded font: "sans", "italic" or "uni". Empty fontPathOrName means the default embedded font.

  - ### Method Detail

    - #### getNativeObjAddr

          public long getNativeObjAddr()

    - #### __fromPtr__

          public static FontFace __fromPtr__​(long addr)

    - #### set

          public boolean set​(java.lang.String fontPathOrName)

      loads new font face
      Parameters:
        `fontPathOrName` - automatically generated
      Returns:
        automatically generated

    - #### getName

          public java.lang.String getName()

    - #### setInstance

          public boolean setInstance​(MatOfInt params)

      sets the current variable font instance.
      Parameters:
        `params` - The list of pairs key1, value1, key2, value2, ..., e.g. `myfont.setInstance({CV_FOURCC('w','g','h','t'), 400&lt;&lt;16, CV_FOURCC('s','l','n','t'), -(15&lt;&lt;16)});` Note that the parameter values are specified in 16.16 fixed-point format, that is, integer values need to be shifted by 16 (or multiplied by 65536).
      Returns:
        automatically generated

    - #### getInstance

          public boolean getInstance​(MatOfInt params)

    - #### finalize

          protected void finalize()
                           throws java.lang.Throwable

      Overrides:
        `finalize` in class `java.lang.Object`
      Throws:
        `java.lang.Throwable`