← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 691442] Re: The TTFSearchPath changed at outside module is ignored

 

Hello,

As xrg pointed out, you can alter the TTFSearchPathMap directly, instead of trying to modify the tuples directly :-)
I'm closing this bug because the TTFSearchPath tuples were not meant to be extended in that way anyway (we'll try to have a minimal doc for this customfonts business online soon)

Thanks!

** Changed in: openobject-server
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/691442

Title:
  The TTFSearchPath changed at outside module is ignored

Status in OpenObject Server:
  Invalid

Bug description:
  There are 3 variable defined in report.render.rml2pdf.customfonts module: TTFSearchPath_Linux, TTFSearchPath_Windows, TTFSearchPath_Darwin, all refers to tuple object. They are refereed in the TTFSearchPathMap dict like below:
TTFSearchPathMap = {
    'Darwin': TTFSearchPath_Darwin,
    'Windows': TTFSearchPath_Windows,
    'Linux': TTFSearchPath_Linux,
}

If at later time I make 3 TTFSearchPath variable refers to other tuple object (eg. change the search path), these changes won't affect the TTFSearchPath* in TTFSearchPathMap dict, as they are still refered to the original tuple object.

I propose to replace immutable tuple to list, thus all changes to these variable will count in the later process.

patch is attached





References