[reportlab-users] Problem using FAQ example for embedding font

Gerry Reno greno at verizon.net
Tue Sep 16 09:29:41 EDT 2008


Andy Robinson wrote:

> 2008/9/16 Gerry Reno <greno at verizon.net>:

>

>> Why this problem happens is because in a container (here TinyERP but could

>> be any) the container itself is initializing the module containing the font

>> registration code and then when the user does an update it causes the

>> initialization to run again which is rather normal. Maybe another way of

>> handling the issue would be that if the font is already registered it should

>> just ignore the subsequent attempts or replace the existing registration

>> with the new registration rather than throwing an exception. Certainly this

>> does not have to be a fatal error.

>>

>

> It's a deliberate safeguard because otherwise people could (and in

> fact have) attempted to register several different versions of a

> common font name (e.g. "Helvetica") with different encodings or

> character sets. We can't just assume the font is the same and this

> forces the developer to deal with it by picking unique names for

> unique fonts.

>

> The problem is lessened now that we use Unicode everywhere, but I

> still think developers should be alerted if they are attempting to

> reuse the same name in a single registry. Also, in a long-running

> process, we might need to get into 'locking' the structures used by

> the widths cache while being updated to stop another document suddenly

> finding a half-initialised font - and I really don't want to start

> getting into threading issues,

>

> I think it's a bug in TinyERP, and since the author of that package is

> (a) using the name RML without our permission, (b) has never replied

> to any of our emails asking for modest changes in his web pages and

> giving due credit, and (c) has never contributed patches or feedback

> of any kind to our open source package, I'm not inclined to make

> changes on his behalf or to spend time supporting his users. Sorry,

> this is not aimed at you in any way.

>

> If they changed their code implementing the registerFont tags to use a

> try/except block, that would solve the problem too - that's what we do

> in "Genuine RML(tm)" ;-)

>



I don't think that TinyERP had any malicious intent when they started
developing their own RML parser. And RML actually sounds like HTML, XML,
which most people associate with being a term that just describes
generically a type of document language. I would have never guessed that
RML (Report Markup Language) was anyone's trademark. Now, I do agree
with you that the TinyERP author should have corresponded with you and
come to some type of consensus and agreement as to how to make clear
that RML was a ReportLab product and that maybe TRML would be their
implementation. And bug fixes and enhancements to open source code
should be being contributed between both parties. The fact that you've
had zero response from Tiny is not good and I would hope that for the
sake of both packages that some congenial conversation can take place.
BTW, Tiny has done much to raise awareness of RML which does actually
benefit ReportLab and I think that should also be recognized. Anyway,
I'm not defending the lack of communication from Tiny but just want to
set some perspective for both ReportLab and Tiny users who may read
this. And given the background, thanks for taking the time to reply to
my problem.

Regards,
Gerry



More information about the reportlab-users mailing list