bugThe FreeType Project - Bugs: bug #24462, Some suitcase font could not be...

 
 

bug #24462: Some suitcase font could not be loaded on Classic Mac OS

Submitted by:  suzuki toshiya <mpsuzuki>
Submitted on:  Mon 06 Oct 2008 10:44:32 AM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: Works For MePrivacy: Public
Assigned to: suzuki toshiya <mpsuzuki>Open/Closed: Closed
Planned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 07 Oct 2008 03:43:37 PM UTC, comment #4:

ftdump does not receive the error, it can load
the face correctly. I close this bug as "Works
for me" once, because ftoldmac is the only
application reproduces this bug.

Attached text files are ascii-fied MPW makefiles
to build ftdump running on MPW. Convert them by
ascii2mpw.py and put the converted makefiles as
"ft2demos/ftdump.m68k_far.make" and
"ft2demos/ftdump.ppc_classic.make", and build
ftdump.m68k_far and ftdump.ppc_classic, as ftoldmac.

Also I attached the trace logs of ftdump.

(file #16622, file #16623, file #16624)

suzuki toshiya <mpsuzuki>
Project AdministratorIn charge of this item.
Mon 06 Oct 2008 02:32:25 PM UTC, comment #3:

As usual, please go ahead and apply your patches (and please stay within the 80 character width limit if possible).

Werner LEMBERG <wl>
Project Administrator
Mon 06 Oct 2008 01:46:12 PM UTC, comment #2:

There is a possibility that this is NOT FreeType2 bug
but ftoldmac bug. When the loading process goes further
by previous PartialResourceRead() patch, it receives
an error when FT_ALLOC() is called to allocate a buffer
to store sfnt stream. It seems that some invalid memory
management is caused by ftoldmac.

Attached is a patch to add more trace message and the
trace log of ftoldmac. In the 2nd access of the font
file, the allocation in open_face_PS_from_sfnt_stream()
receives an error, and following process is aborted.

ftdump should be ported to MPW environment for further
investigation.

(file #16617, file #16618)

suzuki toshiya <mpsuzuki>
Project AdministratorIn charge of this item.
Mon 06 Oct 2008 11:20:27 AM UTC, comment #1:

ReadPartialResource() seems to copy the image
of sfnt stream correctly. In the attached log,
the buffer filled by ReadPartialResource() is
correct sfnt stream, even the handle returned
by GetResource() is not a pointer to the copied
image of sfnt stream.

(file #16614, file #16615)

suzuki toshiya <mpsuzuki>
Project AdministratorIn charge of this item.
Mon 06 Oct 2008 10:44:32 AM UTC, original submission:

During the tests for sfnt-wrapped CID-keyed font in
suitcase font format, it is found that some suitcase
font could not be loaded by the functions in ftmac.c.
Attached is a patch to generate detailed debug messages
for the functions in ftmac.c (both of src/base/ftmac.c
for Mac OS X, and builds/mac/ftmac.c for Classic Mac OS).

Also I attached the log for Adobe's HeiseiKakuGo-W3
(it's proprietary font and I cannot attach here -
if I find a free font to reproduce the problem,
I will add here).

Both of ftdump and ftoldmac open the font twice:
the 1st is to count the face in the file, and
the 2nd is to open the specified face in the file.

log.carbon shows the expected behaviour. In 2 accesses,
we can find exactly same pointer to the copied image of
sfnt resource in the font. The copied image starts from
the version number "typ1".

log.mpw-m68k and log.mpw-ppc show the unexpected behaviour.
In the 1st access, the pointer returned by GetResource()
points the memory image including the sfnt stream,
it starts with "type1". But in the 2nd access,
GetResource() returns different pointer, and the pointed
buffer does not contain valid sfnt stream. As a result,
the application will fall into very confusing scenario:

  • application tries to open a file and check whether

it is valid font file, and how many faces are included.

  • application tries to open a face from "successfully

opened font file", but it fails.

The Carbon-free implementation without GetResource() can
load such font files successfully, but it is not available
in Classic Mac OS. Further investigation is needed to detect
what is wrong in the procedure to access the resource in
the font file.

suzuki toshiya <mpsuzuki>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #16624:  ftdump.ppc_carbon.log added by mpsuzuki (8KiB - application/octet-stream)
file #16618:  allocerror.log added by mpsuzuki (10KiB - application/octet-stream)
file #16617:  alloc-debug.patch added by mpsuzuki (6KiB - application/octet-stream)
file #16615:  testReadPartialResource.log added by mpsuzuki (8KiB - application/octet-stream)
file #16614:  testReadPartialResource.log added by mpsuzuki (8KiB - application/octet-stream)
file #16610:  ftmac-debug.patch added by mpsuzuki (37KiB - application/octet-stream)
file #16611:  log.carbon added by mpsuzuki (6KiB - application/octet-stream)
file #16612:  log.mpw-m68k added by mpsuzuki (9KiB - application/octet-stream)
file #16613:  log.mpw-ppc added by mpsuzuki (8KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by mpsuzuki (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 15 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 07 Oct 2008 03:43:37 PM UTCmpsuzukiAttached File-=>Added ftdump.m68k_far.make.txt, #16622
      Attached File-=>Added ftdump.ppc_classic.make.txt, #16623
      Attached File-=>Added ftdump.ppc_carbon.log, #16624
      StatusNeed Info=>Works For Me
      Open/ClosedOpen=>Closed
    Mon 06 Oct 2008 01:46:12 PM UTCmpsuzukiAttached File-=>Added allocerror.log, #16618
      StatusIn Progress=>Need Info
    Mon 06 Oct 2008 01:46:11 PM UTCmpsuzukiAttached File-=>Added alloc-debug.patch, #16617
    Mon 06 Oct 2008 11:20:27 AM UTCmpsuzukiAttached File-=>Added testReadPartialResource.log, #16614
      Attached File-=>Added testReadPartialResource.log, #16615
      StatusConfirmed=>In Progress
    Mon 06 Oct 2008 10:44:33 AM UTCmpsuzukiAttached File-=>Added ftmac-debug.patch, #16610
      Attached File-=>Added log.carbon, #16611
      Attached File-=>Added log.mpw-m68k, #16612
      Attached File-=>Added log.mpw-ppc, #16613

    Back to the top


    Powered by Savane 3.1-cleanup1