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

Make font selection more amenable to cross platform differences #15

Open
aaime opened this issue May 12, 2020 · 0 comments
Open

Make font selection more amenable to cross platform differences #15

aaime opened this issue May 12, 2020 · 0 comments

Comments

@aaime
Copy link
Member

aaime commented May 12, 2020

While setting up the Korean fonts we noticed that two different Linux systems ends up calling the same font in a different way:

image

versus:

image

Note the lack of "regular" at the end of the name. The former case happened on Windows, and on a Linux machine where the fonts were just dropped in the Java fonts directory. The latter on a Linux Mint where the fonts where installed via the system utilities, so that they are available to multiple JDKs (dev machine).

Right now fonts are enumerated one by one, it's verbose, somewhat hard to maintain, and sensitive to these differences. On GeoServer 2.17.x the mbstyle module offers the "fontAlternatives" function, which allows to pick every font starting with a certain prefix.

I suggest we:

  • Move the function to core, as it's of general usage
  • See if we can make it work with multiple prefixes, or allow calling it multiple times
  • Check if CSS needs to be modified to support using that function
  • Change the styles to just use something like:
font-family: fontAlternatives('Noto Sans'), fontAlternatives('DejaVu Sans'), , fontAlternatives('HanaMin'), , fontAlternatives('Unifont');

This will require a newer version of GeoServer, so release of this data dir should be cut, that is compatible with GeoServer 2.16.0/1/2.

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