Bug 1046104

Summary: Monospaced font SourceCodePro is bold by default after update to texlive 2017
Product: [openSUSE] openSUSE Tumbleweed Reporter: Philipp Wagner <mail>
Component: OtherAssignee: Dr. Werner Fink <werner>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: badshah400, mail, rombert, sndirsch, werner
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
See Also: http://bugzilla.opensuse.org/show_bug.cgi?id=1181691
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1181691    
Attachments: Screenshot with texlive-sourcecodepro installed
Screenshot *without* texlive-sourcecodepro installed
fc-match with texlive-sourcecodepro installed
fc-match *without* texlive-sourcecodepro installed

Description Philipp Wagner 2017-06-27 08:52:55 UTC
Created attachment 730330 [details]
Screenshot with texlive-sourcecodepro installed

Since the last update including the new texlive 2017 packages, the default monospace font (SourceCodePro) on my system was overwritten with a bold one. Things are better explained in a picture as seen in the attached screenshots.

I got things back to normal by deinstalling the texlive versions of the font with 
> sudo zypper remove texlive-sourcecodepro*

Now the following packets are installed:
> LANG=C sudo zypper search sourcecodepro
Loading repository data...
Reading installed packages...

S  | Name                        | Summary                                                  | Type   
---+-----------------------------+----------------------------------------------------------+--------
i+ | adobe-sourcecodepro-fonts   | A set of OpenType fonts designed for coding environments | package
   | texlive-sourcecodepro       | Use SourceCodePro with TeX(-alike) systems               | package
   | texlive-sourcecodepro-doc   | Documentation for texlive-sourcecodepro                  | package
   | texlive-sourcecodepro-fonts | Severed fonts for texlive-sourcecodepro                  | package



I've confirmed with fc-match that if the texlive packages are installed, the texlive version of SourceCodePro is used. Otherwise, it's the version from the adobe-sourcecodepro-fonts package. I've also attached the output of "fc-match -v monospace" before and after deinstalling the texlive package.


My system information:

> cat /etc/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20170625"
ID=opensuse
ID_LIKE="suse"
VERSION_ID="20170625"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20170625"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
Comment 1 Philipp Wagner 2017-06-27 08:53:28 UTC
Created attachment 730331 [details]
Screenshot *without* texlive-sourcecodepro installed
Comment 2 Philipp Wagner 2017-06-27 08:53:54 UTC
Created attachment 730332 [details]
fc-match with texlive-sourcecodepro installed
Comment 3 Philipp Wagner 2017-06-27 08:54:10 UTC
Created attachment 730333 [details]
fc-match *without* texlive-sourcecodepro installed
Comment 4 Philipp Wagner 2017-06-27 09:03:02 UTC
I forgot the zypper output before removing the texlive fonts:

> sudo zypper search sourcecode
Repository-Daten werden geladen...
Installierte Pakete werden gelesen...

S  | Name                        | Zusammenfassung                                          | Typ  
---+-----------------------------+----------------------------------------------------------+------
i+ | adobe-sourcecodepro-fonts   | A set of OpenType fonts designed for coding environments | Paket
i  | texlive-sourcecodepro       | Use SourceCodePro with TeX(-alike) systems               | Paket
i  | texlive-sourcecodepro-doc   | Documentation for texlive-sourcecodepro                  | Paket
i  | texlive-sourcecodepro-fonts | Severed fonts for texlive-sourcecodepro                  | Paket
Comment 5 Dr. Werner Fink 2017-06-27 09:46:55 UTC
The question rises which of the fonts are wrong as there are e.g.

2017/packages> tar tf sourcecodepro.tar.xz | \
               grep sourcecodepro/SourceCodePro | grep tosf-ts1.vf 
fonts/vf/adobe/sourcecodepro/SourceCodePro-Black-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-BlackIt-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-Bold-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-BoldIt-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-ExtraLight-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-ExtraLightIt-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-It-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-Light-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-LightIt-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-Medium-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-MediumIt-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-Regular-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-Semibold-tosf-ts1.vf
fonts/vf/adobe/sourcecodepro/SourceCodePro-SemiboldIt-tosf-ts1.vf
2017/packages> tar Oxf sourcecodepro.tar.xz tlpkg/tlpobj/sourcecodepro.tlpobj |\
               grep ^catalogue
catalogue-ctan /fonts/sourcecodepro
catalogue-date 2016-06-24 19:18:15 +0200
catalogue-license ofl
catalogue-topics font font-mono font-otf font-type1
catalogue-version 2.6

 2017/packages> rpm -q adobe-sourcecodepro-fonts
 adobe-sourcecodepro-fonts-2.010-15.1.noarch

that is that this seems to be how adobe had defined there fonts in version 2.6 ... adding maintainer of adobe-sourcecodepro-fonts to Carbon Copy
Comment 6 Robert Munteanu 2017-06-27 10:00:13 UTC
I've packaged the latest source code pro version in my home repo at https://build.opensuse.org/package/show/home:robert_munteanu:branches:M17N:fonts/adobe-sourcecodepro-fonts . Can you install it and see if that changes anything?
Comment 7 Robert Munteanu 2017-06-27 10:19:56 UTC
I upgraded myself and the issue is not fixed with the latest adobe-sourcecodepro-fonts package.

I noted the following rpm output when upgrading:

( 774/2430) Installing: texlive-sourcecodepro-fonts-2017.125.2.6svn40597-33.2.noarch ...............................................................................................................................................................................................[done]
Additional rpm output:
Couldn't determine full name for SourceCodePro-Black.pfb
Couldn't determine weight for SourceCodePro-Black.pfb
Couldn't determine full name for SourceCodePro-BlackIt.pfb
Couldn't determine weight for SourceCodePro-BlackIt.pfb
Couldn't determine full name for SourceCodePro-Bold.pfb
Couldn't determine weight for SourceCodePro-Bold.pfb
Couldn't determine full name for SourceCodePro-BoldIt.pfb
Couldn't determine weight for SourceCodePro-BoldIt.pfb
Couldn't determine full name for SourceCodePro-ExtraLight.pfb
Couldn't determine weight for SourceCodePro-ExtraLight.pfb
Couldn't determine full name for SourceCodePro-ExtraLightIt.pfb
Couldn't determine weight for SourceCodePro-ExtraLightIt.pfb
Couldn't determine full name for SourceCodePro-It.pfb
Couldn't determine weight for SourceCodePro-It.pfb
Couldn't determine full name for SourceCodePro-Light.pfb
Couldn't determine weight for SourceCodePro-Light.pfb
Couldn't determine full name for SourceCodePro-LightIt.pfb
Couldn't determine weight for SourceCodePro-LightIt.pfb
Couldn't determine full name for SourceCodePro-Medium.pfb
Couldn't determine weight for SourceCodePro-Medium.pfb
Couldn't determine full name for SourceCodePro-MediumIt.pfb
Couldn't determine weight for SourceCodePro-MediumIt.pfb
Couldn't determine full name for SourceCodePro-Regular.pfb
Couldn't determine weight for SourceCodePro-Regular.pfb
Couldn't determine full name for SourceCodePro-Semibold.pfb
Couldn't determine weight for SourceCodePro-Semibold.pfb
Couldn't determine full name for SourceCodePro-SemiboldIt.pfb
Couldn't determine weight for SourceCodePro-SemiboldIt.pfb

That may provide a hint
Comment 8 Dr. Werner Fink 2017-06-27 10:30:12 UTC
(In reply to Robert Munteanu from comment #7)
> I upgraded myself and the issue is not fixed with the latest
> adobe-sourcecodepro-fonts package.
> 

Then the question rises: What happens if you're switching to the

   SourceCodePro-Light

font ...

Beside this it could also a problem with mkfontscale(1) as the messages are from mkfontscale
Comment 9 Robert Munteanu 2017-06-27 10:40:40 UTC
(In reply to Dr. Werner Fink from comment #8)
> (In reply to Robert Munteanu from comment #7)
> > I upgraded myself and the issue is not fixed with the latest
> > adobe-sourcecodepro-fonts package.
> > 
> 
> Then the question rises: What happens if you're switching to the
> 
>    SourceCodePro-Light
> 
> font ...
> 
> Beside this it could also a problem with mkfontscale(1) as the messages are
> from mkfontscale

With 

PREFER_MONO_FAMILIES="Source Code Pro Light"

in /etc/sysconfig/fonts-config the font switches to the light variant in gnome-terminal. Firefox still uses the bold variant.

$ fc-match -v monospace | grep otf
file: "/usr/share/fonts/truetype/SourceCodePro-Light.otf"(w)

BTW, as a workaround I am using:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <selectfont>
    <rejectfont>
        <glob>/usr/share/fonts/texlive-sourcecodepro/*</glob>
    </rejectfont>
 </selectfont>
</fontconfig>

in ~/.config/fontconfig/fonts.conf, running sudo /usr/sbin/fonts-config after each change.
Comment 10 Dr. Werner Fink 2017-06-27 11:45:04 UTC
The package texlive-sourcecodepro-fonts does have both the otf and pfb variant of the Source Code Pro font family ... but indeed the pfb files seem to miss some macros like Weight and FullName.  Not sure if I'm allowed to modify those pfb files.  Could be done with t1ascii+t1binary and some script code to add missing definitions.
Comment 11 Dr. Werner Fink 2017-06-27 11:55:12 UTC
(In reply to Robert Munteanu from comment #9)

> 
> BTW, as a workaround I am using:
> 
> <?xml version='1.0'?>
> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
> <fontconfig>
>  <selectfont>
>     <rejectfont>
>         <glob>/usr/share/fonts/texlive-sourcecodepro/*</glob>
>     </rejectfont>
>  </selectfont>
> </fontconfig>
> 
> in ~/.config/fontconfig/fonts.conf, running sudo /usr/sbin/fonts-config
> after each change.


The file /etc/fonts/conf.avail/58-texlive-sourcecodepro.conf should do the same
by using the commands

   cd /etc/fonts/conf.d
   ln -sf ../conf.avail/58-texlive-sourcecodepro.conf .
Comment 12 Robert Munteanu 2017-06-27 12:02:15 UTC
(In reply to Dr. Werner Fink from comment #11)
> (In reply to Robert Munteanu from comment #9)
> 
> > 
> > BTW, as a workaround I am using:
> > 
> > <?xml version='1.0'?>
> > <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
> > <fontconfig>
> >  <selectfont>
> >     <rejectfont>
> >         <glob>/usr/share/fonts/texlive-sourcecodepro/*</glob>
> >     </rejectfont>
> >  </selectfont>
> > </fontconfig>
> > 
> > in ~/.config/fontconfig/fonts.conf, running sudo /usr/sbin/fonts-config
> > after each change.
> 
> 
> The file /etc/fonts/conf.avail/58-texlive-sourcecodepro.conf should do the
> same
> by using the commands
> 
>    cd /etc/fonts/conf.d
>    ln -sf ../conf.avail/58-texlive-sourcecodepro.conf .

Good to know, thanks!
Comment 13 Bernhard Wiedemann 2017-06-27 16:00:46 UTC
This is an autogenerated message for OBS integration:
This bug (1046104) was mentioned in
https://build.opensuse.org/request/show/506500 Factory / texlive-specs-v
Comment 14 Atri Bhattacharya 2017-06-27 22:13:15 UTC
Just wanted to express my appreciation for the super quick fix. I hit the issue today, checked this bug, installed
texlive-sourcecodepro-fonts-2017.130.2.6svn40597-125.4.noarch.rpm
from Publishing:TeXLive and it was fixed. Awesome!
Comment 15 Dr. Werner Fink 2017-06-28 10:13:52 UTC
(In reply to Atri Bhattacharya from comment #14)
> Just wanted to express my appreciation for the super quick fix. I hit the
> issue today, checked this bug, installed
> texlive-sourcecodepro-fonts-2017.130.2.6svn40597-125.4.noarch.rpm
> from Publishing:TeXLive and it was fixed. Awesome!

Thanks for spotting as well as for reporting success!
Comment 16 Philipp Wagner 2017-07-02 20:56:50 UTC
The update made it well into Tumbleweed and fixed the problem for me. Thanks to everybody involved! What a great turnaround time.
Comment 17 Bernhard Wiedemann 2017-07-12 12:00:49 UTC
This is an autogenerated message for OBS integration:
This bug (1046104) was mentioned in
https://build.opensuse.org/request/show/509708 Factory / texlive-specs-a
https://build.opensuse.org/request/show/509709 Factory / texlive-specs-b
https://build.opensuse.org/request/show/509710 Factory / texlive-specs-c
https://build.opensuse.org/request/show/509711 Factory / texlive-specs-d
https://build.opensuse.org/request/show/509712 Factory / texlive-specs-e
https://build.opensuse.org/request/show/509713 Factory / texlive-specs-f
https://build.opensuse.org/request/show/509714 Factory / texlive-specs-g
https://build.opensuse.org/request/show/509715 Factory / texlive-specs-h
https://build.opensuse.org/request/show/509716 Factory / texlive-specs-i
https://build.opensuse.org/request/show/509717 Factory / texlive-specs-j
https://build.opensuse.org/request/show/509718 Factory / texlive-specs-k
https://build.opensuse.org/request/show/509719 Factory / texlive-specs-l
https://build.opensuse.org/request/show/509720 Factory / texlive-specs-m
https://build.opensuse.org/request/show/509721 Factory / texlive-specs-n
https://build.opensuse.org/request/show/509722 Factory / texlive-specs-o
https://build.opensuse.org/request/show/509723 Factory / texlive-specs-p
https://build.opensuse.org/request/show/509724 Factory / texlive-specs-q
https://build.opensuse.org/request/show/509725 Factory / texlive-specs-r
https://build.opensuse.org/request/show/509726 Factory / texlive-specs-s
https://build.opensuse.org/request/show/509727 Factory / texlive-specs-t
https://build.opensuse.org/request/show/509728 Factory / texlive-specs-u
https://build.opensuse.org/request/show/509731 Factory / texlive-specs-w
https://build.opensuse.org/request/show/509732 Factory / texlive-specs-x
https://build.opensuse.org/request/show/509733 Factory / texlive-specs-y
https://build.opensuse.org/request/show/509734 Factory / texlive-specs-z
Comment 18 OBSbugzilla Bot 2021-02-05 15:50:07 UTC
This is an autogenerated message for OBS integration:
This bug (1046104) was mentioned in
https://build.opensuse.org/request/show/869791 Factory / texlive-specs-v
Comment 19 OBSbugzilla Bot 2021-03-09 11:40:07 UTC
This is an autogenerated message for OBS integration:
This bug (1046104) was mentioned in
https://build.opensuse.org/request/show/877957 Factory / texlive-specs-n