Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Garbled characters when exporting to PNG format #110

Closed
Hongqing-Hu opened this issue Oct 3, 2022 · 1 comment
Closed

Garbled characters when exporting to PNG format #110

Hongqing-Hu opened this issue Oct 3, 2022 · 1 comment

Comments

@Hongqing-Hu
Copy link

Chinese fonts are displayed normally in HTML format. Garbled characters when exporting to PNG format.

`import pandas as pd
import altair as alt
from altair_saver import save

df = pd.DataFrame({"x":[0.5,1,2],
"y" : [0.5,1,2],
"text": ["你好", "中国", "明天"]})

pic = alt.Chart(df).mark_text().encode(
x = "x",
y= 'y',
text ='text'
)
save(pic, "text.png")`

@joelostblom
Copy link
Member

Since Altair 5.2, the functionality of Altair Saver is now available in Altair via the vl-convert package. Most of the functionality has been available since 5.0, and the main addition in 5.2 was PDF export. See the docs on how to save charts for more details

We are going to archive this repo, so I'm closing all the open issues and PRs before doing so. Try out the new options for saving charts mentioned above and if you run into issues, please open an issue directly in the altair or vl-convert repo.

@joelostblom joelostblom closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants