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

gr: add support for user fonts #4671

Merged
merged 1 commit into from
Feb 18, 2023
Merged

Conversation

jheinen
Copy link
Member

@jheinen jheinen commented Feb 17, 2023

No description provided.

@jheinen jheinen added enhancement improving existing functionality GR labels Feb 17, 2023
@t-bltg
Copy link
Member

t-bltg commented Feb 17, 2023

Does GR have a font cache mechanism ?
gr_set_font is called a lot and GR.loadfont might be costly (I haven't checked) ?

@jheinen
Copy link
Member Author

jheinen commented Feb 17, 2023

Yes, there is a font cache mechanism in GR. This MR only adds support for additional/other fonts in the user's or the system-wide font directories - GR.loadfont() is only called once in this case and the font dictionary is extended.

@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Base: 90.43% // Head: 90.26% // Decreases project coverage by -0.18% ⚠️

Coverage data is based on head (875780d) compared to base (65cf8a1).
Patch coverage: 50.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4671      +/-   ##
==========================================
- Coverage   90.43%   90.26%   -0.18%     
==========================================
  Files          40       40              
  Lines        8701     8702       +1     
==========================================
- Hits         7869     7855      -14     
- Misses        832      847      +15     
Impacted Files Coverage Δ
src/backends/gr.jl 90.65% <50.00%> (-0.08%) ⬇️
src/examples.jl 96.03% <0.00%> (-3.18%) ⬇️
RecipesPipeline/src/series.jl 91.02% <0.00%> (-2.57%) ⬇️
RecipesPipeline/src/utils.jl 95.89% <0.00%> (-1.37%) ⬇️
src/components.jl 90.10% <0.00%> (-0.53%) ⬇️
src/backends.jl 82.08% <0.00%> (-0.50%) ⬇️
RecipesPipeline/src/RecipesPipeline.jl 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@BeastyBlacksmith
Copy link
Member

Do we need to bump compat or would this also work with GR v0.69.5?

@jheinen
Copy link
Member Author

jheinen commented Feb 17, 2023

Do we need to bump compat or would this also work with GR v0.69.5?

No, the GR.loadfont function was already introduced in version 0.64.3.

@BeastyBlacksmith BeastyBlacksmith merged commit 06540cb into JuliaPlots:master Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improving existing functionality GR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants