How to reset locale settings in Debian?

0

0

I am newbie to Debian, last night I regenerated locales using following command.

sudo dpkg-reconfigure locales

I selected all from the prompted screen and it generated all locales. After restarting my PC I am seeing fonts as in the picture below. I need help resetting my locale settings.

M A

Posted 2014-05-14T14:59:19.053

Reputation: 111

I guess you can redo the same command and select what you want again, but not all options. look here for more details: locale-settings

– Digital site – 2014-05-14T15:08:11.203

IIUC, your problem has nothing to do with locales but rather with fonts -- in particular with "screen smoothing" of them. How to tweak it, depends on what desktop environment you're using. If it's GNOME, install gnome-tweak-tool run it and navigate to its "Fonts" tab. – kostix – 2014-05-14T15:12:44.247

Another hint, it that in 99.9% of cases you don't need all locales -- it's OK to only have the en_US locale and the one matching your country. It's OK to only have those with UTF-8 encoding enabled among these two categorues. So, most of the time you only need two locales. – kostix – 2014-05-14T15:14:00.933

@kostix Okay, thanks, is there any command so that I can reset fonts settings or repair them? – M A – 2014-05-14T15:21:57.243

are you referring to default console-font? or all other fonts? – Digital site – 2014-05-14T15:31:09.227

@MohAdnan, no command to repair (because there's nothing to repair -- you've just removed some font package or somehow managed to get some other font as system-default or somehting like that) but you can deal with your situation by picking a font that suits your visual taste and font rendering options that suit you using a font configuration tool suitable to your environment. If it's GNOME (the default DE in Debian Wheezy) then please read again what I wrote, otherwise please tell us what you have installed as your DE (KDE? XFCE? LXDE? other?). – kostix – 2014-05-14T15:31:20.780

@Digitalsite, the screenshot does not look like a terminal window to me, let alone like a VT console ;-) – kostix – 2014-05-14T15:32:02.000

@kostix Yes, I was trying to add "Urdu" fonts. I have installed gnome-tweak-tool and 'll update here. – M A – 2014-05-14T15:36:56.470

@kostix Can you tell me which font needs to be changed from this screenshot? I have tried all but results are same as above in my post. http://imgur.com/tXmcQjH

– M A – 2014-05-14T15:45:56.230

@MohAdnan, what software renders the fonts in your original screenshot? Is this a browser? Mozilla Firefox by any chance? – kostix – 2014-05-14T16:14:53.500

@kostix Yes, I am using Chrome and Iceweasel (Debian default) web browser. Bother rendering same fonts. – M A – 2014-05-14T17:20:55.863

@MohAdnan, at least Firefox has its own font settings dialog. What I'm leading you to... Does the rest of the system display fonts okay and you only see non-pretty fonts in your browsers? – kostix – 2014-05-14T18:06:38.890

@kostix I am sorry, but I don't know how to reset fonts, but I have removed all my manually added fonts. Thanks – M A – 2014-05-14T18:20:15.500

Answers

1

I used the following command:

dpkg-reconfigure fontconfig-config

Font tuning method for screen (system default): Selected Native then for Enable subpixel rendering for screen: selected Automatic logout and login again, now fonts are normal again.

Thanks everyone here :)

M A

Posted 2014-05-14T14:59:19.053

Reputation: 111

0

Take a look at the contents of this file:

cat /etc/default/locale

Add a comment with your contents (would've just commented on your post but lacking the rep to do so)

l0sts0ck

Posted 2014-05-14T14:59:19.053

Reputation: 11

Here are my locale file contents: # File generated by update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 – M A – 2014-05-14T15:20:29.860

That means you are using now English US font. what font are you looking to setup? – Digital site – 2014-05-14T15:32:49.933

ok, from the picture in your post, you want to change the font family to something else that was on your system!! – Digital site – 2014-05-14T15:34:23.723

@Digitalsite Yes, – M A – 2014-05-14T15:41:31.083

-1

I believe if you don't have the fonts, you can download them from these links: Ubuntu font rendering on Debian Wheezy & Sid Download Page for fontconfig-config Debian Wheezy

Method #1


you can choose other packages such as Wheezy, Sid, Squeeze and so on, if you like here: All Debain packages for fontconfig

follow the steps:

1- Download the package.
2- open .deb file with Archive Manager
3- enter the **/etc/fonts** directory
4- open nautilus and brows to **/etc/fonts**
5- drag all the files and folders from the archive into the file browser
6- Log out and log in, and change font preferences.

The full procedure is on this link: Ubuntu font rendering on Debian Wheezy & Sid

an image for clarification from the same site

Method #2


you need to recompile the package again; the original one you have on your system like this:

su -c 'dpkg-reconfigure fontconfig'

Then type: touch .fonts.conf

after that, open the config file

nano .fonts.conf

Then paste in this code:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintslight</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="rgba" >
   <const>rgb</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
 </match>
<match target="font">
   <edit mode="assign" name="lcdfilter">
   <const>lcddefault</const>
   </edit>
 </match>
<match target="pattern">
   <edit name="dpi" mode="assign">
   <double>96</double></edit>
</match>
</fontconfig>

for lolz, paste into .Xdefaults :

Xft.autohint: 0
Xft.antialias: 1
Xft.hinting: true
Xft.hintstyle: hintslight
Xft*dpi: 96
Xft.rgba: rgb
Xft.lcdfilter: lcddefault

Last, Log out and log in to see things in affect...

Digital site

Posted 2014-05-14T14:59:19.053

Reputation: 158

At this URL: http://packages.ubuntu.com/natty/all/fontconfig-config/download There is nothing but Error page.

– M A – 2014-05-14T15:47:57.523

my apology. I will edit the answer now. – Digital site – 2014-05-14T15:59:44.103

What the heck? You're teaching a Debian user to download packages in the browser instead of just firing up a package manager, finding the package there and hitting install?! That's plain wrong on so many levels it won't fit into the comment's size limit would I have tried to explain them all. Also, font packages have nothing to do with fontconfig which is a tool to tweak font settings and nothing more. – kostix – 2014-05-14T16:17:51.257

now there are 2 ways how to do it, and possibly the 2nd method is easy and anyone can do it!! :) – Digital site – 2014-05-14T20:59:02.870

@Digitalsite Thanks for your second method, can you mention the location of .Xdefaults file? – M A – 2014-05-15T19:32:19.217

.Xdefaults is what recently called .Xresources. it should be in your home dir. if you don't have one, you need to create one. you can read about it here – Digital site – 2014-05-15T23:26:26.310

@Digitalsite Thanks for your help, second method does affect font settings but still I am unable to read some texts. Is there anything else you want me to try? – M A – 2014-05-17T13:06:23.220

@MohAdnan, unfortunately there is no other tweaks I know of. The second method if done correctly it should be working well. try again and change the settings. – Digital site – 2014-05-19T06:42:44.753

@Digitalsite Thanks, I have reconfigured default font settings, I also added Answer in this post. Thanks for your help. – M A – 2014-05-19T07:40:50.467

glad your issue has been solved!! Good luck. – Digital site – 2014-05-19T10:36:52.617