# How to customize font in Java Method Imgproc.putText

**URL:** <https://forum.opencv.org/t/how-to-customize-font-in-java-method-imgproc-puttext/4137>\
**Category:** Android/Java\
**Tags:** contrib, freetype, imgproc\
**Created:** [July 2, 2021, 3:24pm UTC](https://forum.opencv.org/t/how-to-customize-font-in-java-method-imgproc-puttext/4137 "2021-07-02T15:24:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RKing](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/rking/32/2559_2.png) [@RKing](https://forum.opencv.org/u/RKing)\
**Post date:** [July 2, 2021, 3:24pm UTC](https://forum.opencv.org/t/how-to-customize-font-in-java-method-imgproc-puttext/4137/1 "2021-07-02T15:24:19Z")

</div>

Hello, I’m using the version 4.5.0 of OpenCV Java library now. Also, I’m using the method Imgproc.putText to create text on the image. But it seems this method only allow predefined fonts, what I need to do to allow customized fonts?

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [July 2, 2021, 4:15pm UTC](https://forum.opencv.org/t/how-to-customize-font-in-java-method-imgproc-puttext/4137/2 "2021-07-02T16:15:16Z")

</div>

`putText` uses very simple built-in fonts.

if you want to specify a “regular” font (e.g. truetype), you will need to use the `freetype` module from `opencv_contrib`. that requires the freetype and harfbuzz _libraries_ (not related to OpenCV).

I don’t know if the java bindings will include this API. [another thread](https://forum.opencv.org/t/opencv-in-java-how-can-i-output-all-kind-of-symbols-chinese-japanese-accents-etc/4112) discusses this issue.
