3b1b / 3b1b/manim

Non-Western fonts cannot align Western fonts and formulas

未关闭
#2,042 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
93.8k
派生
7.7k
PR 合并指标
PR 指标待抓取

描述

As the picture showed, Non-Western(Chinese, Japanese, for example) fonts cannot align Western fonts and formulas.

![](https://img1.imgtp.com/2023/07/10/S3SJpbbP.png)

Here is the code:
```python
from manimlib import *
class Example(Scene):
def construct(self):
self.play(
Write(
MTexText("勾股定理 Pythagorean theorem のぬ $a^2+b^2=c^2$")
)
)
```

贡献指南

这个仓库没有索引到贡献指南

调研方向

The issue demonstrates misalignment of mixed-language text in MTexText. Start by examining the manimlib/text/mtex.py file where MTexText is defined, and look at how text layout and font handling are implemented. Run the provided example to see the visual misalignment, then explore font metrics and alignment logic for combining Western and non-Western characters with LaTeX math.

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
computer-graphics
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
描述清楚
新手友好度
40/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。