Hey,
Yes i am aware of this issue. (I am the one who implemented ttc support
in the first place)
I just didnt need Meiryo in blod in my project (btw: most asian fonts do
not have a bold or italic version and its considered rude to use italic
japanese)
If you want to further filter out result:
Line 253 in PdfFontCache.cpp there is a comment "//..TODO.. check
additional styles (check fontStyle, fontFullName, fontPostscriptName) ?"
The code to check if we have found a matching found must go there,
should be more or less some if cases that check other local values
against the inFont...
Do as you like to further improve it :-)
I dont have the time atm to work on something podofo related, sorry.
Greetings,
Dennis
Am 15.07.2016 um 18:14 schrieb Jaseem Ali K T:
Hi All
I have identified some issues with current TTC font implementation in
windows environment.
The sample scenario is this:
If you try to create the font Meiryo with both bold and italic set to
true , the returned is Meiryo Bold, and similarly if you go for Meiryo
Italic, you will get Meiryo.
I have identified the cause for this.
For ttc fonts , the data returned by GetFontData (windows) function
will have data for multiple fonts. So we need to extract the correct
font. This is done by extracting font family name, font style etc and
matching it against the input.
Currently the matching is done against only font family name. Meiryo
and Meiryo Italic has the same family name, Meiryo. So the code stops
when it encounters Meiryo and returns the incorrect font.
Also there is an additional draw back with the current implementation
(in my opinion) of matching font family name against input font name.
For ttf fonts , I can give input as fontname=’Arial Bold Italic’,
bold=’false’ , italic =’false’ and still get the correct Arial Bold
Italic font. Please note that, here I have passed the font full name
, instead of font family name and styles. If I do the same with ttc
fonts , ie if I pass the font name ‘Meiryo Bold Italic’ I will not get
any font as the matching is done against font family name. I guess
font full name also needs to be considered while matching is done.
Most of the action happens at GetFontFromCollection() and
GetDataFromHFONT() in PdfFontCache.cpp .
I guess with this information would be helpful for someone ready to
fix the issue.
Additionally currently there is an overloaded method for CreateFont ()
to create font from LOGFONTW structure( in windows). I guess a similar
method for CreateFontSubset() would also be useful.
Thanks and Regards
Ali
::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as
information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in
transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any
liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of
the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction,
dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior
written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error
please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for
viruses and other defects.
----------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users