adrg / sysfont

Golang identification and matching of system fonts
https://pkg.go.dev/github.com/adrg/sysfont
MIT License
43 stars 13 forks source link

feat: add option for setting search paths #21

Closed darkliquid closed 2 years ago

darkliquid commented 2 years ago

Add a new SearchPaths option that allows you to set the search paths for fonts without having to modify the package level xdg.FontDirs slice.

The rationale for this is that you may want to limit searches to a particular directory or portable collection of fonts packaged with your app, or you may want to do both, but build two separate registries, one for system fonts and one for local fonts, and being able to explicitly set search paths enables that.

codecov[bot] commented 2 years ago

Codecov Report

Merging #21 (255908a) into master (345eec7) will decrease coverage by 0.13%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
- Coverage   10.48%   10.34%   -0.14%     
==========================================
  Files           4        4              
  Lines         229      232       +3     
==========================================
  Hits           24       24              
- Misses        205      208       +3     
Impacted Files Coverage Δ
finder.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 345eec7...255908a. Read the comment docs.

darkliquid commented 2 years ago

@adrg updated

adrg commented 2 years ago

Looks good. Thanks again for your contribution.