• Jan-Marek Glogowski's avatar
    Move PhysicalFontFace member of FontSelectPattern · 083b7ca2
    Jan-Marek Glogowski yazdı
    A FontSelectPattern describes a general font request. It can be
    used to find the best matching LogicalFontInstance. The instance
    will be created based on a PhysicalFontFace, which is really a
    factory since commit 8b700794.
    Following this workflow, this moves the PhysicalFontFace pointer
    to the instance and makes it constant.
    
    Which leaves some special symbol font handling code in the hash
    and instance lookup code path. It used to query the font face
    directly from the instance.
    I'm not sure of the correct handling. The related commits where
    made to fix #i89002#, which has an attached test document.
    
    1. commit 849f6182
    2. commit 8c9823d3
    
    The document is as broken as it was before the patch. The symbol
    substitution still works, but the 'Q's are missing when displaying
    a symbol font.
    
    I also don't understand all the reinterpret_casts for fake font
    ids. I guess this was used to prevent the crashes I see, where a
    PhysicalFontFace referenced in a valid LogicalFontInstance is
    freed and a later FontId check in the GlyphCache crashes. So this
    now checks for a valid cache instead.
    
    Change-Id: If8ee5a6288e66cfa4c419289fbdd5b5da128c6ea
    Reviewed-on: https://gerrit.libreoffice.org/47279Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarKhaled Hosny <khaledhosny@eglug.org>
    083b7ca2
fontselect.hxx 3.55 KB