Hello to all,

What is the best way of knowing whether two GfxFont instances are
actually the same font? I have a tentative implementation that works
fine in tests, and I would like to know whether it is correct. It
works like this:

  1. If the pointers to the GfxFonts are the same, then it is
     the same font.
  2. (else) If the Ref returned by GfxFont::getID() for the two
     fonts is the same num/gen pair, then it is the same font.
  3. (else) If the font tags returned by GfxFont::getTag() are
     the same, then it is the same font.
  5. (else) If the names returned by GfxFont::getName() are the
     same, then it is the same font.
  6. (else) The fonts are different.

My main concern is that it seems that comparing the tag seems to
be enough, and maybe some comparisons can be removed. Also, in
case the additional comparisons are needed, is the font name a
good discriminator?

Thanks in advance,


-Adrian

Attachment: pgpMBCv2pM3Kg.pgp
Description: PGP signature

_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to