how install ttf-mscorefonts locally (for using only with libreoffice, prevent system from using it)

openSUSE Leap 15.4 (come from 15.3)
cinnamon version 4.6.7
linux kernel 5.14.21-150400.22-default

1- is there’s some way to install Microsoft fonts locally for libreoffice only (prevent system or any other app from use or see them)?

2- when i was use mint or debian (i do not remember), when i try install “ttf-mscorefonts” find some alarm say “there’s another package totally free and open source hold similar fonts to Microsoft fonts, you can use it instead”. any one know name of that package (free and open source fonts that similar to Microsoft fonts (Arial, time new roman)? is it available on opensuse?

When you install fetchmsttfonts, the system has absolutely no reason to use any of them and you do not need to use them in any application though they will appear in each application’s list of available fonts.

i use two keyboard layout(English & other language). when install the “fetchmsttfonts” they effect badly on Facebook (other language posts show very small and weird font). also just install the “fetchmsttfonts” and it effect on system menu.

i make another thread about how prevent “fetchmsttfonts” from effect on firefox, but when did not find solution i make this new thread.
link to other thread:
https://forums.opensuse.org/showthread.php/572384-fonts-control

Most applications (by default) do not use specific unambiguous full font specification but rather generic names (like Sans or Monospace) which are then matched at runtime to the actual font. Installing additional fonts may well result in them being selected as the best match.

Assuming libreoffice is still using fontconfig for selecting fonts - fontconfig supports “prgname” property so it may be possible to restrict these fonts to specific programs only. You will have to experiment to find out the actual value of “prgname” to use. See fonts-conf

Within the Firefox settings, you can choose which font shall be preferred for “Sans” and, the preferred font for “Serif” –

  • Are you suggesting that, Facebook & Co. override these settings?

While searching for this issue on the Internet, I noticed this Ubuntu thread – <14.04 - Unusual font on some sites (like Facebook) - Ask Ubuntu;

  • Please note that openSUSE places ‘30-metric-aliases.conf’ in the directory ‘/etc/fonts/conf.d/’ and, at the top of the file there’s this warning –

<!-- DO NOT EDIT; this is a generated file –>
<!-- modify /etc/sysconfig/fonts-config && run /usr/sbin/fonts-config instead –>

Please take heed of this warning …
You’ll probably want to set up the following parameters in ‘/etc/sysconfig/fonts-config’ – “PREFER_SANS_FAMILIES”; “PREFER_SERIF_FAMILIES”; “PREFER_MONO_FAMILIES” …

next image show the font selection windows (font setting)


and next image show the effect of installing “ttf-mscorefonts” (when uninstall the fonts and before restart the system menu font lost, look down to date and Menu they look like white square)

libreoffice work good for me, fonts appears and can choose from them as i want. i try limit the effect of core fonts as they effect bad on face book and i need them only for libreoffice.
is there’s some manual way to install core fonts in libreoffice directory?

so the system did not use them.

1- i will attach screen image for firefox font setting (before add ms core fonts), in next replay.

2- the normal fonts for firefox before instal MS core fonts is roboto and roboto slap.

3- after install Ms core fonts the firefox fonts setting change automatically and use times new roman, arial.

4- also the system effect.

firefox fonts setting before installing ms core fonts

1- i try change the font setting in firefox and font selection but it end with crash the fonts even after uninstall the ms core fonts. and find my self need to reinstall the opensuse again.

2- try override the setting in “30-metric” by add next code to
/etc/fonts/local.conf
but it did not effect on “Arabic fonts”, where arabic facebook post is the problem


<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

<!-- Map generics to specifics (overrides 30-metric-aliases.conf) -->

    <alias binding="same">
      <family>Helvetica</family>
      <accept>
      <family>Liberation Sans</family>
      </accept>
    </alias>

</fontconfig>

To be perfectly honest, I’ve never, ever, experienced Firefox running on Linux behaving as you describe.

  • I have the Microsoft fonts always installed (since many, many years) but, I’ve never noticed that Firefox automatically changed my personalised font settings.
    Regardless of whether, I chose the Bitstream Vera fonts or, currently, the Linux Liberation fonts …

[HR][/HR]Please check your system installation:

  1. Repositories – please, please, please, override the standard openSUSE Repositories with due care and attention – please avoid private member’s repositories unless, you have communicated with the person responsible for the private repository and, you absolutely understand what you’re doing …
  2. Please make sure that, the repository Meta Data is correct – “zypper refresh --force”.
  3. Please verify your installation – “zypper verify” and “rpm --verify --all”.
  4. Mozilla products normally do a good job of maintaining the content of the user’s cached data – for Firefox, the data located in ‘~/.cache/mozilla/firefox/’ – but, it may well be that, this normally good behaviour, is in your case, not quite as it should be – please check the Firefox behaviour with a new, fresh, test user.

me too in opensuse 15.3 i do not face this problem(i install opensuse 15.3 two or three times in last one year and did not face this problem).

weird thing when face this problem in 15.4 i go back use my usb that hold 15.3 version and install it again but this time face the problem (did the 15.3 repository changed after opensuse 15.4 launch?)

1- i only add packman and NVIDIA repo.

2- sudo zypper ref

Repository 'nVidia Graphics Drivers' is up to date.                             
Repository 'Packman Repository' is up to date.                                  
Repository 'Update repository of openSUSE Backports' is up to date.             
Repository 'Non-OSS Repository' is up to date.                                  
Repository 'Main Repository' is up to date.                                     
Repository 'Update repository with updates from SUSE Linux Enterprise 15' is up
to date.
                                                                                
Repository 'Main Update Repository' is up to date.                              
Repository 'Update Repository (Non-Oss)' is up to date.                         
All repositories have been refreshed.


3- i run sudo zypper verify result: “Dependencies of all installed packages are satisfied.”

i remove the core font and as it effect the arabic font in facebook, the idea i try understand why this happen now, what change

really many thanks for you all

I suspect that it is the font hinting that affects the look of your font, It makes the font smoother thinner and looks smaller in the eyes.
Try the font hinting settings between none, slight, medium and full and see which is easy on your monitor to read.

many thanks for you. try it but did not give the required results. so i open bug report
https://bugzilla.opensuse.org/show_bug.cgi?id=1202074

You may use LibreOffice Portable and add fonts into its font folder: How do I add fonts to LibreOffice Linux?

Can you add fonts to LibreOffice?

In general, you don’t install fonts exclusively for LibreOffice (except for LibreOffice Portable, which has its own fonts folder); normally, fonts are installed system-wide. If the downloaded fonts are in a . zip file, extract them somewhere. Right-click on the font file(s) and select Install from the menu.

many thanks for you