SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I used this command instead (it can be improved but it worked):
Code:
sed -i 's/\/\* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING[[:space:]]\+\*\//#define TT_CONFIG_OPTION_SUBPIXEL_HINTING/g' include/freetype/config/ftoption.h
This might be able to be improved even more, but this is a bit shorter (and possibly a bit easier to read since there's only two escape characters for the asterisks).
Code:
sed -i 's|^/\* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING \*/|#define TT_CONFIG_OPTION_SUBPIXEL_HINTING|' include/freetype/config/ftoption.h
(Sorry, I like figuring out sed commands to keep my knowledge up.)
Click here to see the post LQ members have rated as the most helpful post in this thread.
Taking inspiration from dugan's own sed command, the subpixel hinting patch for 14.2 (freetype 2.6.3) could be even shorter
Code:
sed -i 's|^/\* \(#define TT_CONFIG_OPTION_SUBPIXEL_HINTING\) \*/|\1|' include/freetype/config/ftoption.h
I was curious how this worked, so I did some looking into sed commands. For any others who might be curious, basically you have the string you're searching for:
Code:
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
When you search for it using sed, you need to escape the asterisks with a backslash, so it now becomes this:
Code:
/\* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING \*/
Now, since we want a certain portion of it, we can mark it using opening and closing parenthesis. You can do this multiple times to mark multiple blocks of text.
Now, we can use \1 in the replacement section to pull up the pattern. If you did multiple patterns, you can use \2, \3, etc up to 9 different patterns (which would correspond to 9 different sections with opening and closing parenthesis. We're using the pipe symbol | as the delimiter so we don't have to escape the forward slash in the searched text.
When we put it all together, we get the following command. Dugan's/gegechris99's commands both had a carat ^ at the front to signify it's the beginning of the line, but based on the text I've seen, it shouldn't be needed because no other lines should match the command (but it doesn't hurt to add it).
Code:
sed -i 's|/\* (#define TT_CONFIG_OPTION_SUBPIXEL_HINTING) \*/|\1|' include/freetype/config/ftoption.h
Last edited by bassmadrigal; 08-11-2017 at 02:25 AM.
Reason: Butchered my own post...
Thanks for detailed info on this particular sed syntax.
Note: you just forgot to put the parenthesis in the last sed command
Please edit your post and correct it as this is supposed to be the command to apply the subpixel hinting patch in 14.2.
Last edited by gegechris99; 08-11-2017 at 02:20 AM.
Reason: Add reason for correcting sed command
Note: you just forgot to put the parenthesis in the last sed command
Please edit your post and correct it as this is supposed to be the command to apply the subpixel hinting patch in 14.2.
Thanks for that. That's what I get for typing it up at work without having a bash shell nearby to test it...
You could also customize /etc/profile.d/infinality-settings.sh if you feel like it.
Also could you check your /etc/profile.d/infinality-settings.sh and see if it is long with lots of comments (upstream) or short (bohomil's version). I made some changes to the SlackBuild after you had posted, now using bohomil's infinality-settings.sh which looks better for me out of the box.
Hello.
I am using Slackware 14.2 / -current (I did not update all the packages).
I see that you guys are using infinality with versions of freetype 2.5 or so.
I am using freetype 2.8 and I would like to know if that AND the fact that maybe you guys had a previous version of Slackware would prevent the sources on these post from working fine with the versions I use (both freetype 2.8 and Slackware 14.2/-current).
Does anyone know? --> Since I consider myself still a beginner in Slackware I'd like to ask before trying by myself to avoid destroying my distro (which I already did once).
Yes you can use infinality with Slackware 14.2 because the library versions still have infinality support. You can find infinality for Slackware here https://github.com/archfan/bob-infinality-bundle. Infiniality has now been depreciated because all the various patches have been merged into the freetype source. If you want infinality looking fonts on -current follow this guide I wrote https://www.linuxquestions.org/quest...ml#post5744886
I was using the Open Logos font for awhile to get a Slackware logo in conky, but I no longer use conky so I don't have a need for it. The Nerd fonts look like a convenient way to get a battery indicator on my panel, though.
I ended up installing Font Awesome and using it on my awesome WM panel to get a battery indicator and also CPU and RAM icons. They didn't really have a proper CPU icon, but I think the calculator does a decent enough job.
To install, I didn't mess with fontconfig at all, I just used KDE System Settings (yes, while running awesome WM) to install the .otf file locally, then I copied and pasted the characters from the Font Awesome Cheat Sheet into my rc.lua config script for Awesome. UTF-8 is required.
(The font is called Font Awesome and the window manager is called awesome window manager, in case that was confusing for anyone.)
I've noticed that fonts in my 14.2 could be improved. I note in the past I've had to make a few changes in both Ubuntu and Debian in order to do so, so it's no surprise that I have to do the same in Slack.
I will first attempt the install of Infinality as per this post and then symlink.
As a second option:
I note also that the OP has kindly provided links to cairo, freetype etc but these links are down. Does anyone have links that work? Apologies if I missed them. Would his fonts.conf as given in the OP still work?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.