Skip to content

TextNode 'set_small_caps' does not work on 1.11.0 #1666

@Benjamin8693

Description

@Benjamin8693

Description

The 'set_small_caps' method of TextNode does not work. It does set the 'small_caps' field successfully (evident if you call 'get_small_caps'), but it does not have any visual impact on text once generated. This works as intended on 1.10.14.

Functional example:
2024-06-18_21-27

Non-functional example:
2024-06-18_21-28

Steps to Reproduce

  1. Create this file:
from direct.showbase.ShowBase import ShowBase
from panda3d.core import NodePath, TextNode

class Demo(ShowBase):

    def __init__(self):
        ShowBase.__init__(self)

        styling = TextNode('status')
        styling.set_align(TextNode.ACenter)
        styling.set_text_color(1, 1, 1, 1)
        styling.set_shadow(0.075, 0.075)
        styling.set_small_caps(True)
        styling.set_text("Testy McTest!")

        letter = NodePath(styling.generate())
        letter.reparent_to(aspect2d)
        letter.set_scale(0.25)

demo = Demo()
demo.run()
  1. Run it
  2. Note that the lowercase letters have not changed as expected (see documentation)

Environment

  • Operating system: Linux Mint 21.3
  • System architecture: x64
  • Panda3D version: 1.11.0 latest master
  • Installation method: pip
  • Python version (if using Python): 3.10.12
  • Compiler (if using C++): N/A

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions