posit-dev / great-tables

Make awesome display tables using Python.
https://posit-dev.github.io/great-tables/
MIT License
1.9k stars 71 forks source link

feat: add google font helper, implement in `opt_table_font()` and `style.text()` #423

Closed rich-iannone closed 2 months ago

rich-iannone commented 2 months ago

This adds support for incorporating Google fonts into the table text, via:

The necessary additions are:

A simple example of this is through the use of opt_table_font()

from great_tables import GT, exibble, google_font

GT(exibble.head()).opt_table_font(font = google_font("IBM Plex Mono"))
image

Fixes: https://github.com/posit-dev/great-tables/issues/374

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 89.79592% with 5 lines in your changes missing coverage. Please review.

Project coverage is 86.78%. Comparing base (49ceeb7) to head (a043032). Report is 30 commits behind head on main.

Files with missing lines Patch % Lines
great_tables/_styles.py 66.66% 3 Missing :warning:
great_tables/_helpers.py 90.90% 1 Missing :warning:
great_tables/_options.py 91.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #423 +/- ## ========================================== + Coverage 86.75% 86.78% +0.03% ========================================== Files 42 42 Lines 4702 4745 +43 ========================================== + Hits 4079 4118 +39 - Misses 623 627 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.