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

[linux] Use fontconfig to locate fonts instead of hardcoding the paths #136

Closed
coderobe opened this issue Feb 9, 2018 · 4 comments
Closed
Assignees
Labels

Comments

@coderobe
Copy link
Contributor

coderobe commented Feb 9, 2018

Currently, LCUI hard-codes the font paths, like here:

FONTDIR"truetype/ubuntu-font-family/Ubuntu-R.ttf",

These are not guaranteed to be in the same location across different linux systems.

FONTDIR"opentype/noto/NotoSansCJK-Regular.ttc",
for example, is located in /usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc on my system.

I suggest using Fontconfig, which would allow to match fonts with their names instead of using the absolute paths.

I am preparing a pull request that updates fontlibrary.c to use Fontconfig for you to review.

@coderobe coderobe changed the title Hardcoded font paths [linux] Use fontconfig to locate fonts instead of hardcoding the paths Feb 9, 2018
@lc-soft lc-soft added the linux label Feb 9, 2018
@lc-soft lc-soft self-assigned this Feb 9, 2018
coderobe added a commit to coderobe/LCUI that referenced this issue Feb 9, 2018
Font paths are not guaranteed to be the same across
different linux systems, this commit introduces Fontconfig
support to locate the font files based on their font names.

see also: lc-soft#136
@coderobe
Copy link
Contributor Author

coderobe commented Feb 9, 2018

I have implemented this functionality in #137

coderobe added a commit to coderobe/LCUI that referenced this issue Feb 12, 2018
Font paths are not guaranteed to be the same across
different linux systems, this commit introduces Fontconfig
support to locate the font files based on their font names.

see also: lc-soft#136
coderobe added a commit to coderobe/LCUI that referenced this issue Feb 12, 2018
Font paths are not guaranteed to be the same across
different linux systems, this commit introduces Fontconfig
support to locate the font files based on their font names.

see also: lc-soft#136
coderobe added a commit to coderobe/LCUI that referenced this issue Feb 12, 2018
Font paths are not guaranteed to be the same across
different linux systems, this commit introduces Fontconfig
support to locate the font files based on their font names.

see also: lc-soft#136
@stale
Copy link

stale bot commented Feb 24, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 24, 2018
@coderobe
Copy link
Contributor Author

^ i think this bot is a really bad idea. this will end up closing a lot of feature-request issues or old-but-unfixed bug reports.
on top of that, it's been only two weeks.

@stale stale bot removed the stale label Feb 24, 2018
@lc-soft
Copy link
Owner

lc-soft commented Feb 24, 2018

Sorry, I'm test this robot work. I will change configuration of this robot in the later.

@lc-soft lc-soft added this to the 1.0.0 beta 2 milestone Feb 25, 2018
@lc-soft lc-soft removed this from the 1.0.0 beta 2 milestone Mar 19, 2018
lc-soft pushed a commit that referenced this issue May 20, 2018
Font paths are not guaranteed to be the same across
different linux systems, this commit introduces Fontconfig
support to locate the font files based on their font names.

see also: #136
@lc-soft lc-soft closed this as completed May 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants