Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-123901

addFontToDatabase encounters stack overflow while load some special Chinese fonts

    XMLWordPrintable

Details

    • Windows

    Description

      It will touch stack overflow crash if meeting special system font like chinese ‘萍方’ fonts under window when font database load system fonts.

       

      steps to reproduce

      1. unzip the attached files “PingFangFonts.zip" to c:\windows\fonts

      2. run any simple demo, create qml componet control to loading system fonts

       

      We'll get the output like below if we enable QtDebug.

      15:02:25.243 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 128 TTF=0 DEVICE scalable=1 Size=65535 Style=0 Weight=50 stretch=100" 
      15:02:25.244 [11064]: [DEBUG] QtDebugMsg: "PingFang SC" 
      15:02:25.244 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 134 TTF=1 TRUETYPE scalable=1 Size=65535 Style=0 Weight=57 stretch=100" 
      15:02:25.246 [11064]: [DEBUG] QtDebugMsg: "蘋方-簡" 
      15:02:25.246 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 128 TTF=0 DEVICE scalable=1 Size=65535 Style=0 Weight=50 stretch=100" 
      15:02:25.248 [11064]: [DEBUG] QtDebugMsg: "PingFang SC" 
      15:02:25.249 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 134 TTF=1 TRUETYPE scalable=1 Size=65535 Style=0 Weight=57 stretch=100" 
      15:02:25.250 [11064]: [DEBUG] QtDebugMsg: "蘋方-簡" 
      15:02:25.250 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 128 TTF=0 DEVICE scalable=1 Size=65535 Style=0 Weight=50 stretch=100" 
      15:02:25.252 [11064]: [DEBUG] QtDebugMsg: "PingFang SC" 
      15:02:25.252 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 134 TTF=1 TRUETYPE scalable=1 Size=65535 Style=0 Weight=57 stretch=100" 
      15:02:25.254 [11064]: [DEBUG] QtDebugMsg: "蘋方-簡" 
      15:02:25.254 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 128 TTF=0 DEVICE scalable=1 Size=65535 Style=0 Weight=50 stretch=100" 
      15:02:25.256 [11064]: [DEBUG] QtDebugMsg: "PingFang SC" 
      15:02:25.256 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 134 TTF=1 TRUETYPE scalable=1 Size=65535 Style=0 Weight=57 stretch=100" 
      15:02:25.258 [11064]: [DEBUG] QtDebugMsg: "蘋方-簡" 
      15:02:25.258 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 128 TTF=0 DEVICE scalable=1 Size=65535 Style=0 Weight=50 stretch=100" 
      15:02:25.260 [11064]: [DEBUG] QtDebugMsg: "PingFang SC" 
      15:02:25.260 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 134 TTF=1 TRUETYPE scalable=1 Size=65535 Style=0 Weight=57 stretch=100" 
      15:02:25.262 [11064]: [DEBUG] QtDebugMsg: "蘋方-簡" 
      15:02:25.262 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 128 TTF=0 DEVICE scalable=1 Size=65535 Style=0 Weight=50 stretch=100" 
      15:02:25.264 [11064]: [DEBUG] QtDebugMsg: "PingFang SC" 
      15:02:25.264 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 134 TTF=1 TRUETYPE scalable=1 Size=65535 Style=0 Weight=57 stretch=100" 
      15:02:25.266 [11064]: [DEBUG] QtDebugMsg: "蘋方-簡" 
      15:02:25.266 [11064]: [DEBUG] QtDebugMsg: "addFontToDatabase 萍方-简 128 TTF=0 DEVICE scalable=1 Size=65535 Style=0 Weight=50 stretch=100"  

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              shengyuan IT QT01
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes