You are not logged in.

#1 2010-12-06 19:15:51

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

[Solved] Abiword and font [symlinking fonts]

Hi,
I keep Abiword around for .{doc,docx,odt} document that are sent to me. Often, these are set with the type face Times New Roman, which I do not have (and I'd like to keep it that way). Is there any way to have Abiword always display documents using a specific type face? I.e. always replace TNR with a sane default e.g. DejaVu Sans or Droid Sans?

edit: Alternatively, would it be possible to install another font as a placeholder for TNR, i.e. have Abiword (the system) believe that it is using TNR but really it is merely using Droid Sans?

Thanks,
Rasmus

Last edited by Pank (2010-12-06 19:49:32)


Arch x64 on Thinkpad X200s/W530

Offline

#2 2010-12-06 19:24:47

urist
Member
Registered: 2009-02-22
Posts: 248

Re: [Solved] Abiword and font [symlinking fonts]

Would something like this work? By my understanding, that would make everything on your system that defaulted to the unwanted font use the wanted one instead.

Last edited by urist (2010-12-06 19:25:55)

Offline

#3 2010-12-06 19:27:21

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: [Solved] Abiword and font [symlinking fonts]

You can use fontconfig to do to font replacements, see https://wiki.archlinux.org/index.php/Fo … lace_fonts.

When a program requests Times New Roman, fontconfig will give it the replacement instead.

Fontconfig already has 30-metric-aliases.conf, so you just need to install ttf-liberation.

I know this will work in a web browser if the font is requested, but I'm not sure if Abiword will still make the request if the font isn't installed.

Offline

#4 2010-12-06 19:29:26

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: [Solved] Abiword and font [symlinking fonts]

urist wrote:

Would something like this work? By my understanding, that would make everything on your system that defaulted to the unwanted font use the wanted one instead.

DejaVu includes 57-dejavu-sans.conf, etc. which set it as the fallback font, so I'm not sure either of our suggestions will work if it doesn't already work out of the box.

Last edited by thestinger (2010-12-06 19:30:46)

Offline

#5 2010-12-06 19:49:16

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

Re: [Solved] Abiword and font [symlinking fonts]

Hi,
Thanks for the quick replies, and sorry for not checking out the wiki properly.
Anyhow, the following solved the problem:

# Note: one could also be using ~/.fonts.conf
$ cat /etc/fonts/local.conf 
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>
<match target="pattern" name="family" >
    <test name="family" qual="any" >
        <string>Times New Roman</string>
    </test>
    <edit name="family" mode="assign">
        <string>Droid Sans</string>
    </edit>
</match>
</fontconfig>

Arch x64 on Thinkpad X200s/W530

Offline

Board footer

Powered by FluxBB