# vtkTextActor (0x26049358): Failed getting the TextRenderer instance!

**URL:** https://discourse.vtk.org/t/vtktextactor-0x26049358-failed-getting-the-textrenderer-instance/1931
**Category:** Support
**Created:** [October 15, 2019, 6:21am UTC](https://discourse.vtk.org/t/vtktextactor-0x26049358-failed-getting-the-textrenderer-instance/1931 "2019-10-15T06:21:55Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![KeyboardMan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/keyboardman/32/968_2.png) [@KeyboardMan](https://discourse.vtk.org/u/KeyboardMan)
#### Post date: [October 15, 2019, 6:21am UTC](https://discourse.vtk.org/t/vtktextactor-0x26049358-failed-getting-the-textrenderer-instance/1931/1 "2019-10-15T06:21:55Z")

</div>

![QQ%E6%88%AA%E5%9B%BE20191015142058](https://discourse.vtk.org/uploads/default/original/1X/a001235340677418964e91dad117a62b019abb1e.png) ![QQ%E6%88%AA%E5%9B%BE20191015142116](https://discourse.vtk.org/uploads/default/original/1X/6e483b0e4077e0ac134c6d33d4a3d073851dd5d0.png)

---

<div class="post-metadata">

### Author: ![KeyboardMan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/keyboardman/32/968_2.png) [@KeyboardMan](https://discourse.vtk.org/u/KeyboardMan)
#### Post date: [October 15, 2019, 6:22am UTC](https://discourse.vtk.org/t/vtktextactor-0x26049358-failed-getting-the-textrenderer-instance/1931/2 "2019-10-15T06:22:23Z")

</div>

How did this happen?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [October 15, 2019, 11:22pm UTC](https://discourse.vtk.org/t/vtktextactor-0x26049358-failed-getting-the-textrenderer-instance/1931/3 "2019-10-15T23:22:34Z")

</div>

It looks like this is an object factory class. You’ll need to link to `VTK::RenderingFreeType` and add it to the autoinit list to get a concrete implementation of a text renderer. What version of VTK is this?

---

<div class="post-metadata">

### Author: ![KeyboardMan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/keyboardman/32/968_2.png) [@KeyboardMan](https://discourse.vtk.org/u/KeyboardMan)
#### Post date: [October 16, 2019, 1:25am UTC](https://discourse.vtk.org/t/vtktextactor-0x26049358-failed-getting-the-textrenderer-instance/1931/4 "2019-10-16T01:25:49Z")

</div>

VTK 8.2

- I copied this code in the example  
[https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/Axes/](https://lorensen.github.io/VTKExamples/site/Cxx/GeometricObjects/Axes/)

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [October 16, 2019, 1:21pm UTC](https://discourse.vtk.org/t/vtktextactor-0x26049358-failed-getting-the-textrenderer-instance/1931/5 "2019-10-16T13:21:07Z")

</div>

How did you try to build the example? Does the VTK you compiled against have the `vtkRenderingFreetype` module enabled? That is required to get text rendering to work.

---

<div class="post-metadata">

### Author: ![KeyboardMan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/keyboardman/32/968_2.png) [@KeyboardMan](https://discourse.vtk.org/u/KeyboardMan)
#### Post date: [October 17, 2019, 8:20am UTC](https://discourse.vtk.org/t/vtktextactor-0x26049358-failed-getting-the-textrenderer-instance/1931/6 "2019-10-17T08:20:59Z")

</div>

Thanks Ben Boeckel

- I solved this problem by adding VTK\_MODULE\_INIT(vtkRenderingFreeType) to the code

---

<div class="post-metadata">

### Author: ![Q1CHEN](https://discourse.vtk.org/user_avatar/discourse.vtk.org/q1chen/32/6435_2.png) [@Q1CHEN](https://discourse.vtk.org/u/Q1CHEN)
#### Post date: [January 19, 2023, 6:47am UTC](https://discourse.vtk.org/t/vtktextactor-0x26049358-failed-getting-the-textrenderer-instance/1931/7 "2023-01-19T06:47:30Z")

</div>

I am experiencing the same issue. May I ask where to add it?
