# fonts issue on browser and terminal



## joplass (Jan 21, 2020)

I did everything in the thread below but some sites still display these characters and the terminal has not changed.

fonts in .Xdefaults

```
URxvt*font: xft:Monospace:pixelsize=12
URxvt*boldFont: xft:Monospace:pixelsize=12
```

https://forums.freebsd.org/threads/installing-truetype-fonts-on-freebsd.65261/


----------



## yuripv (Jan 21, 2020)

.Xdefaults is NOT read anymore, for a long time, AFAIK.  Either use .Xdefaults-yourhostname, or put it in .Xresources and read in from e.g. your .xinitrc using `xrdb .Xresources`.


----------



## joplass (Jan 21, 2020)

.Xresources with xrdb .Xresources in .xinitrc made matter worst since even urxvt could not be read from it.  .Xdefaults-hostname did not change anything I am sure I am missing something.


----------



## memreflect (Jan 22, 2020)

If your `LANG` environment variable doesn't use UTF-8 (e.g. you're using EUC-JP, Big5, GB18030, ISO-8859-1, or something other than UTF-8), the output from something like `curl wttr.in` may not appear properly in the terminal, but you can usually also just use `curl wttr.in | iconv -f utf-8` to convert from UTF-8 to your system's character set as well.  This may cause trouble with the colored output unfortunately, so you'll need to use `curl wttr.in?T | iconv -f utf-8` if the output is wrong because of colors.  However, encoding issues like this are separate from having the fonts necessary to display the correct characters.

For the font issue I see in the browser screenshot, you appear to be missing CJK fonts to display Chinese, Japanese, and Korean characters.  For that, you can install the x11-fonts/noto pkg/port (it's actually a "meta-port", meaning it actually installs a group of related packages; the download size is ~830 MiB for all of them, if that matters, and ~1 GiB of storage will be required.)  You may need to restart your X server to see the correct characters being rendered.  You should also verify the fonts chosen by the browser for displaying such characters; your browser may need to be configured to use the necessary fonts.


----------



## joplass (Jan 22, 2020)

This is a brand new install being located in the US I thought adding

```
:charset=UTF-8:\
        :lang=en_US.UTF-8:\
        :setenv=LC_COLLATE=C:
```
to .login_conf will fix the UTF-8 issue.  Is there something else to do to fix troubles with UTF-8?


----------



## memreflect (Jan 22, 2020)

joplass said:


> This is a brand new install being located in the US I thought adding
> 
> ```
> :charset=UTF-8:\
> ...


That should fix the UTF-8 issue after you use `cap_mkdb ~/.login_conf` and log out and log back in.


----------



## joplass (Jan 22, 2020)

yep noto x11-fonts/note fixed the browser rendering.


----------



## aragats (Jan 29, 2020)

Definitely there is an issue with urxvt(), since with the exactly same setup it perfectly works in Linux (Debian), but not in FreeBSD.
In my case I use 2 fonts for urxvt in .Xresources:

```
URxvt.font: xft:DejaVu Sans Mono:size=10, xft:Symbola:size=10
```
However, urxvt refuses displaying certain characters, e.g.  (small truck, which appears in email subjects regarding online orders).
If I use only the second font, it works (but regular text appers very ugly).

I tried to rebuild x11/rxvt-unicode several times with different encoding-related options enabled/disabled, but that didn't help.


----------



## Sivan! (Jun 22, 2022)

memreflect said:


> memreflect said:
> 
> 
> > That should fix the UTF-8 issue after you use `cap_mkdb ~/.login_conf` and log out and log back in.


That didn't fix my font problem. What do I have to say in the terminal to try the code 
	
	



```
noto x11-fonts/note
```
 which fixed the browser rendering for joplass ?


----------



## Deleted member 70435 (Jun 22, 2022)

you have not installed the necessary fonts.  `pkg install x11-fonts/noto`





						FreshPorts -- x11-fonts/noto: Google Noto Fonts family (meta port)
					

When text is rendered by a computer, sometimes characters are displayed as "tofu". They are little boxes to indicate your device doesn't have a font to display the text.  Google has been developing a font family called Noto, which aims to support all languages with a harmonious look and feel...




					www.freshports.org


----------



## Sivan! (Jun 22, 2022)

Vadim Alexandrov said:


> you have not installed the necessary fonts.  `pkg install x11-fonts/noto`
> 
> 
> 
> ...



Installed noto now, and once again ran `cap_mkdb ~/.login_conf`.  After a reboot, the sequence of fixes worked like a charm !

Another font question: 

Is it required to append `.login_conf` with similar / specific instructions as related to x11 Noto, or do something else for truetype and other font families? Or would all font families work from now on?

Thank you.


----------

