LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-10-2014, 02:21 PM   #1
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 302

Rep: Reputation: 89
Problem Creating Font Alias


Hello, I am trying to create an alias to a system-installed font. I would like to do something similar to the following, which I copied from here.

Code:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
  <dir>~/.fonts</dir>
  <alias>
    <family>XTerm</family>
    <prefer><family>Envy Code R</family></prefer>
    <default><family>monospace</family></default>
  </alias>
  <match target="pattern">
    <test name="family">
      <string>XTerm</string>
    </test>
    <edit mode="assign" name="family">
      <string>Envy Code R</string>
    </edit>
    <edit mode="assign" name="antialias">
      <bool>false</bool>
    </edit>
  </match>
</fontconfig>
That post goes on to say "This creates a font alias called XTerm which maps to Envy Code R but disables antialiasing. Run fc-cache ~/.fonts, and you should then be able to select that font in Terminal."

In particular, I would like to disable anti-aliasing for use in a particular application while leaving that font's settings in tact for all other applications. I have pasted this code into ~/.fonts.conf, as it would be nice to do this on a per-user basis, if possible. I do not have Envy Code R so for the sake of argument I replaced all instances with Droid Sans. This does not seem to work for me. I am doing this on Debian Wheezy with fontconfig 2.9 installed (I know a lot changed with > 2.10 but hopefully that doesn't apply here). Running fc-cache ~/.fonts really doesn't seem to do anything, even with the -v switch, so I'm not sure if ~/.fonts.conf is even getting read. What is supposed to happen, and how do I know if the said alias gets created? Thanks.
 
Old 04-11-2014, 12:55 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,223

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by ordealbyfire83 View Post
how do I know if the said alias gets created? Thanks.
Well, that part I can answer. Let's use the example of the "sans" alias. To check which font it us, use:

Code:
$ fc-match sans
DejaVuSans.ttf: "DejaVu Sans" "Book"
 
Old 04-16-2014, 04:22 PM   #3
ordealbyfire83
Member
 
Registered: Oct 2006
Location: Leiden, Netherlands
Distribution: LFS, Ubuntu Hardy
Posts: 302

Original Poster
Rep: Reputation: 89
Thanks for the suggestion. Unfortunately no new alias got created...
 
  


Reply

Tags
antialiasing, fontconfig



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I need help with creating a certain alias please help, thanks... BMan8577 Linux - Newbie 3 04-29-2011 07:56 PM
ssh problem after creating an ssh alias. porotothorpe Linux - General 2 01-25-2006 07:56 PM
Create alias for font? titopoquito Linux - Software 4 10-03-2005 06:17 AM
problem creating an alias to mount a drive j_l_ajaste Linux - Newbie 6 07-01-2003 10:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration