Hi
Thanks for the reply.
I am not much familiar with release cycles and related info about PoDoFo. It
would be very helpful if you can provide a date(maximum (and minimum :)) no of
days we may have to wait) by which the fix will be released as our requirement
is somewhat heavily dependent on the issue.
...............
I have not tested CreateFontIndirect(), but I always thought it would always
return failure when it can't find the font matching with name. Even if the
other qualities don't provided in LOGFONT match , it would return some font
(with other qualities)in the same family. (The function can return NULL).<< "
The best method is to try one name and, on failure" >> My understanding here
was that , the failure mentioned refers to the failure of CreateFontIndirect()
function
Thanks and Regards
Ali
CreateFontIndirect() ->
1.:
"If it fails to find an exact match, it provides an alternative whose
characteristics match as many of the requested characteristics as possible."
2.:
"The fonts for many East Asian languages have two typeface names: an English
name and a localized name.
CreateFont<https://msdn.microsoft.com/de-de/library/windows/desktop/dd183499%28v=vs.85%29.aspx>
and CreateFontIndirect take the localized typeface name only on a system
locale that matches the language, while they take the English typeface name on
all other system locales. The best method is to try one name and, on failure,
try the other. Note that
EnumFonts<https://msdn.microsoft.com/de-de/library/windows/desktop/dd162622%28v=vs.85%29.aspx>,
EnumFontFamilies<https://msdn.microsoft.com/de-de/library/windows/desktop/dd162619%28v=vs.85%29.aspx>,
and
EnumFontFamiliesEx<https://msdn.microsoft.com/de-de/library/windows/desktop/dd162620%28v=vs.85%29.aspx>
return the English typeface name if the system locale does not match the
language of the font."
Src:
https://msdn.microsoft.com/de-de/library/windows/desktop/dd183500(v=vs.85).aspx
-> 1:
This means if you e.g. only provide a name and a charset in the LOGFONT struct
you can basically get any font on the PC... if the PC doesnt have your exact
font.
-> 2:
The program for which i wrote that code is using EnumFontFamilies to show the
fonts on the PC to the user. If the user has a japanese system with an english
Languangepack. Meiyro and Gothic and other fonts will have japanese name in the
UI event though i have a languagepack installed which should switch the locale
(im guessing on this one ;D )
Therefore i first look up the locale variant of the font and see if it matches,
if it doesnt i look for the english version of the font and use that if it
matches. Works like a charm for my Software at least ^_^ (needs a refactor
though, i dont like how the code looks...)
TTF:
TTFs are easier to handle because they are not Collections of fonts :D
But actually i dont know that much about how podofo handles them... (maybe only
the winApi calls will do the trick?) I only know that no TTF font ever had any
problem i know off when used in podofo :D
Greetings Dennis
Am 11.02.2016 um 17:35 schrieb Jaseem Ali K T:
Hi
The fix is probably unsafe, but still I have the following questions(just out
of curiosity)
Before the call to GetFontFromCollection , two Microsoft functions ,
CreateFontIndirect() and GetFontData are called in order. Of these the first
function will give ok only if it can find font with characteristics
provided(font name, style etc), and then we have to pass GetFontData function
also. So can't we be pretty much sure we have the font we wanted?
,Currently we go only by name in GetFontFromCollection(as you mentioned). If
we also check for bold italic etc, wont this give problems in future?
Because for some fonts italic or bold version may not be available, so we will
get the regular font instead(I think this is the desired functionality). If we
tag this as failure here wont it be a problem?
Are there similar verification done for TTF fonts?
Thanks and Regards
-----Original Message-----
From: dennis [mailto:dennis.v...@dots.de]
Sent: Wednesday, February 10, 2016 1:22 PM
To:
podofo-users@lists.sourceforge.net<mailto:podofo-users@lists.sourceforge.net>
Subject: Re: [Podofo-users] TTC Font Support
As i said, a colleague of mine will provide a patch in (hoepfully) short time.
Just setting if(true) is not going to solve the problem. You cant even be sure
if you have the right font if you always copy the buffer...
Second: the functionalty was build so that it could be refactored to reconize
bold, italic etc. (it doesnt care about those attributes atm it only goes by
name).
But well, if your fix fixes your problem for the moment, just remember to
update if podofo has a new version ;-)
::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.
----------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users