Comment #91 on issue 12530 by yusu...@chromium.org: Segfault when  
ResourceBundle::GetFont fails -- more font fallback needed?
http://code.google.com/p/chromium/issues/detail?id=12530

agl:
I finally succeeded to reproduce it (hopefully). In short, I guess <edit
mode="prepend" binding="same"> or <edit mode="prepend" binding="weak"> in  
their
fontconfig configurations might trigger this bug.

For example, if a user has a ~/.fonts.conf file (or  
~/.fonts.conf.d/foo.conf or
/etc/fonts/conf.d/bar.conf  file?) which looks like:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
   <match target="pattern">
     <edit mode="prepend" binding="same" name="family">  <!-- or  
binding="weak" -->
       <string>DejaVu Sans</string>  <!-- always prefer DejaVu Sans -->
     </edit>
   </match>
</fontconfig>

and the user sets the Application Font to "Bitstream Vera Sans" (or any  
fonts other
than "DejaVu Sans") using /usr/bin/gnome-appearance-properties command,  
chromium
fails to start with the error:

[8513:8513:2971107470385:FATAL:/usr/local/google/home/yusukes/chromium_rw2/src/app/gfx/font_skia.cc(90)]
Check failed: tf. Could not find font: Bitstream Vera Sans
Trace/breakpoint trap

This is because  |post_config_family|  in FontConfigDirect::Match  
becomes "DejaVu
Sans" while  |post_match_family|  remains "Bitstream Vera Sans" for unclear  
reasons.


My environment: gHardy 8.04 64bit

$ dpkg -l fontconfig | grep fontconfig
ii  fontconfig                                                2.5.0-2ubuntu3
                               generic font configuration library - support  
binaries

$ printenv | egrep -e '(LANG|LC_)'
LC_MONETARY=C
LC_NUMERIC=C
LC_COLLATE=C
LANG=en_US.UTF-8
GDM_LANG=en_US
LC_TIME=C

$ fc-list | egrep -r '(Bitstream Vera Sans|DejaVu Sans)'
Bitstream Vera Sans Mono:style=Bold
DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique
DejaVu Sans Mono:style=Bold Oblique
Bitstream Vera Sans:style=Oblique
Bitstream Vera Sans:style=Roman
DejaVu Sans:style=Bold Oblique
Bitstream Vera Sans Mono:style=Oblique
DejaVu Sans:style=Oblique
Bitstream Vera Sans:style=Bold
DejaVu Sans Mono:style=Oblique
DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold Oblique,Bold Oblique
DejaVu Sans,DejaVu Sans Light:style=ExtraLight
Bitstream Vera Sans Mono:style=Bold Oblique
Bitstream Vera Sans:style=Bold Oblique
Bitstream Vera Sans Mono:style=Roman
DejaVu Sans,DejaVu Sans Condensed:style=Condensed,Book
DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold,Bold
DejaVu Sans:style=Bold
DejaVu Sans:style=Book
DejaVu Sans Mono:style=Book
DejaVu Sans Mono:style=Bold

$ fc-match -s "Bitstream Vera Sans" | head -10
Vera.ttf: "Bitstream Vera Sans" "Roman"
DejaVuSans.ttf: "DejaVu Sans" "Book"
DejaVuSans-ExtraLight.ttf: "DejaVu Sans" "ExtraLight"
DejaVuSans-Bold.ttf: "DejaVu Sans" "Bold"
DejaVuSans-Oblique.ttf: "DejaVu Sans" "Oblique"
DejaVuSans-BoldOblique.ttf: "DejaVu Sans" "Bold Oblique"
Verdana.ttf: "Verdana" "Normal"
Arial.ttf: "Arial" "Normal"
luxisr.ttf: "Luxi Sans" "Regular"
n019003l.pfb: "Nimbus Sans L" "Regular"

$ FC_DEBUG=1 fc-match "Bitstream Vera Sans"
FC_DEBUG=1
FC_DEBUG=1
Match Pattern has 17 elts (size 32)
     family: "DejaVu Sans"(w) "Bitstream Vera Sans"(s) "DejaVu  
Sans"(w) "Bitstream
Vera Sans"(w) "Verdana"(w) "Arial"(w) "Liberation Sans"(w) "Albany  
AMT"(w) "Luxi
Sans"(w) "Nimbus Sans L"(w) "Helvetica"(w) "Liberation Sans"(w) "WenQuanYi  
Zen
Hei"(w) "AR PL UMing HK"(w) "AR PL UMing CN"(w) "Khmer  
OS"(w) "Nachlieli"(w) "MgOpen
Modata"(w) "VL Gothic"(w) "IPAMonaGothic"(w) "IPAGothic"(w) "Sazanami  
Gothic"(w)
"Kochi Gothic"(w) "AR PL KaitiM GB"(w) "AR PL KaitiM Big5"(w) "AR PL  
ShanHeiSun
Uni"(w) "AR PL SungtiL GB"(w) "AR PL Mingti2L Big5"(w) "MSゴシック"(w)
"ZYSong18030"(w) "Baekmuk Dotum"(w) "Baekmuk  
Gulim"(w) "SimSun"(w) "KacstQura"(w)
"Lohit Bengali"(w) "Lohit Gujarati"(w) "Lohit Hindi"(w) "Lohit  
Punjabi"(w) "Lohit
Tamil"(w) "Lohit Malayalam"(w) "Lohit Kannada"(w) "Lohit Telugu"(w) "Lohit  
Oriya"(w)
"LKLUG"(w) "sans-serif"(w) "Waree"(w) "Loma"(w) "Garuda"(w) "Roya"(w) 
"Koodak"(w)
"Terafik"(w)

    ^^^
    The first font in the list is "DejaVu Sans", while the matched font  
is "Bitstream
Vera Sans".


--Yusuke


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to