Skip to content

[BUG-General] Text not working properly on master compared to v0.1.0 #704

@ChristianCoenen

Description

@ChristianCoenen

Describe the bug
I have a method that reads a codefile, creates a Text / Paragraph object and colors it via tokens generated by pygments (through the set_color method on different ranges of the Text object e.g. Text[1:10]).

This is working very neat on version 0.1.0 as the manim image below shows:
old_output

However, when I run the same code on the current master branch, I get the following output:
new_output

The first problem (resulting in the different style) is that the font is not detected anymore. The fontname is JetBrains Mono Regular and is installed on my PC.

The second problem (resulting in the weird coloring) is that the Text implementation seems to have changed to not include specific characters anymore. This can be seen on the next two images. The first shows v0.1.0 and the second the current version (latest master). It can be seen that the Text object is not of the same length as the raw string that was used to create the Text object.

old
new

Would really appreciate if you can provide some clarity about:

  1. Whether the Text stripping is intended and why it is done (and what gets stripped)
  2. Why the font is not detected anymore

System Specifications

System Details
  • OS: Windows 10 v20H2
  • RAM: 16 GB
  • Python version): 3.8 (venv using Poetry)
Latex details
  • Distribution: ManimLaTeX
  • Installed packages: default (no new packages installed)
FFMPEG Output of `ffmpeg -version`:
4.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    pr:bugfixBug fix for use in PRs solving a specific issue:bug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions