Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1424

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/24/1424/1

fdo#38090: vcl: remove ImplFontCache::maFontNameList:

The font cache in VCL returns different fonts for identical parameters,
which causes layout differences in Writer.

first we search the font with language 1054:
 debug: XXX 0x2103950   add to maFontNameList: TH SarabunPSK->waree
 p maFontNameList
 $9 = boost::unordered_map with 1 elements = {
   ["TH SarabunPSK"] = "waree"
 debug: XXX 0x2103950 found in maFontNameList: TH SarabunPSK->waree
in this very same invocation the "waree" is then rerouted to Deja Vu
(which can only be because it was called with language 1033):
 debug: XXX 0x2103950   add to maFontNameList: TH SarabunPSK->dejavusans
 p maFontNameList
 $11 = boost::unordered_map with 1 elements = {
   ["TH SarabunPSK"] = "dejavusans"
 }
 debug: XXX 0x2103950 found in maFontNameList: TH SarabunPSK->dejavusans

- the selection of different fonts happens in
  FcPreMatchSubstititution::FindFontSubstitute.
- we never get a direct cache hit from maFontInstanceList because there
  are some differences like WIDTH_DONTKNOW, and the maSearchName
- the first time a font is searched, it ends up in maFontInstanceList
- the second time a font is searched, it may end up in maFontNameList,
  which maps _only_ based on the name (appears to be an invalid optimization)
- once we have TH SarabunPSK->dejavusans in maFontNameList we can never
  select the other one because apparently dejavusans covers all languages

Change-Id: Ibd73de88d8fc3b6e1319eb34c261e55ea217a988
---
M vcl/inc/outdev.h
M vcl/source/gdi/outdev3.cxx
2 files changed, 0 insertions(+), 30 deletions(-)


--
To view, visit https://gerrit.libreoffice.org/1424
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd73de88d8fc3b6e1319eb34c261e55ea217a988
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Michael Stahl <mstahl@redhat.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.