Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing font for individual cells #259

Open
JonnyNOS opened this issue Dec 4, 2024 · 0 comments
Open

Changing font for individual cells #259

JonnyNOS opened this issue Dec 4, 2024 · 0 comments

Comments

@JonnyNOS
Copy link

JonnyNOS commented Dec 4, 2024

Hello,
i worked my way through the Package and found a way to change the Font of a individual Cell

The way it works is basically like the highlights: i have a function in functions.py "add_hifont", which adds a key to the cell_options. in my case just "True" and "False" but for custom Fonts the Font could be passed instead of "True".
image

Then in the sheet.py i have the function "highlight_hifont" which calls the "add_hifont" for each cell and sets "True"(same for dehighlight, but with "False")
image

in the "main_table.py" where text is generated, i added an if-statement which checks the cell-options for "True", if so, change the Font etc.
image

So in the end the table can look like this:
image

I hope this can help someone or help implementing the Feature in the Future even if this is just a quick and dirty solution.
Here are the 3 Files: data.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant