swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] pdf2swf


From: Go Furukawa
Subject: Re: [Swftools-common] pdf2swf
Date: Mon, 24 Oct 2011 18:57:30 +0900

Hi, Chris and all.

I cannot get good results only font config settings.
I need to fix a bug (maybe).

/swftools-0.9.1/lib/pdf/GFXOutputDev.cc line 499-506

    if(style) {
        msg("<debug> FontConfig: Looking for font %s (family=%s style=%s)",
name, family, style);
        pattern = FcPatternBuild(NULL, FC_OUTLINE, FcTypeBool, FcTrue,
FC_SCALABLE, FcTypeBool, FcTrue, FC_FAMILY, FcTypeString, family,
FC_STYLE, FcTypeString, style, NULL);
    } else {
        msg("<debug> FontConfig: Looking for font %s (family=%s)", name, 
family);
        pattern = FcPatternBuild(NULL, FC_OUTLINE, FcTypeBool, FcTrue,
FC_SCALABLE, FcTypeBool, FcTrue, FC_FAMILY, FcTypeString, family,
NULL);
    }
    pattern = FcPatternBuild(NULL, FC_OUTLINE, FcTypeBool, FcTrue,
FC_SCALABLE, FcTypeBool, FcTrue, FC_FAMILY, FcTypeString, family,
NULL);

I think this is a bug. If font has a style, "pattern" variable is
overriden just after if/else statement.
I comment out this statement and re-compile.

I've checked development snapshot swftools-2011-10-10-1647, structure
and filename is changed but same statement is still there.
/swftools-2011-10-10-1647/lib/pdf/CharOutputDev.cc line 380-387

Regards,

Go Furukawa

2011/10/22 Chris <address@hidden>:
>>On Fri, 21 Oct 2011 19:36:09 +0900
>>Go Furukawa <address@hidden> wrote:
>
>> Thank you, Chris.
>>
>> >    http://www.freefontconverter.com/
>>
>> I did convert the fonts on this site, and retry pdf2swf --verbose.
>> All converted truetype fonts are recognized and added to font lists.
>
> Good.
>
>> But when generating swf file, mapping from the font name to the font
>> file is mistaken.
>
> This could be because some of the characters/glyplhs are missing, and being 
> picked
> from tne next nearest choice?
>
>> Is this made by fontconfig?
>
> Yes, I think so.
>
>> Do you know how I fix this differences ?
>
> Check out the local .conf file for font config?  Changes are something like,
>
> <alias>
>        <family>this-font</family>
>        <prefer>
>           <family>another-font</family>
>        </prefer>
> </alias>
>
> A look at the fontconfig documentation may also be useful?
>
>   http://www.freedesktop.org/wiki/Software/fontconfig
>
> HTH.
>
> Regards,
>
>
>
> Chris.
>
>> Regards,
>>
>> 2011/10/21 Chris Pugh <address@hidden>:
>> > On Thu, 20 Oct 2011 23:26:42 +0900
>> > Go Furukawa <address@hidden> wrote:
>> >
>> >> I check http://swftools.org, but I cannot find any infomation what
>> >> font format is supported.
>> >
>> > Agreed. Information is a little sparse.  pdf2swf makes use of xpdf though, 
>> > so whichever
>> > fonts the latter supports, pdf2swf should also.
>> >
>> >> Does pdf2swf only support truutype and type 1 font ?
>> >
>> > Possibly!  font2swf does ( at the moment ).
>> >
>> >> I read the past post below.
>> >>
>> >> Re: [Swftools-common] OTF fonts
>> >> http://lists.gnu.org/archive/html/swftools-common/2007-12/msg00012.html
>> >> > OTF (OpenType) should be supported, too.
>> >
>> > A bit old.  Changes could have been implemented.  Matthias should have the 
>> > definitive
>> > answer there.
>> >
>> >> I get HelveticaNeue from Adobe Fonts, so maybe I cannot convert .otf
>> >> to .ttf for license problem.
>> >> http://www.adobe.com/type/
>> >
>> > Well, you could try the conversion anyway, placing the ttf versions in the 
>> > same
>> > directory.  If it then works, you have your answer!  This url may be 
>> > useful to you:
>> >
>> >    http://www.freefontconverter.com/
>> >
>> >> BTW I tried various Japanese OTF, Morisawa, Hiragino,
>> >> I can use Japanese Open Type fonts with parameters -s
>> >> languagedir=/path/to/xpdf/japanese
>> >> I get language support files from Xpdf website.
>> >> http://foolabs.com/xpdf/download.html
>> >
>> > Yes, any extra fonts required can usually be obtained from the Xpfd 
>> > download area.
>> >
>> > Regards,
>> >
>> >
>> > Chris.
>> >
>> >> 2011/10/20 Chris <address@hidden>:
>> >> > All -F option does is add the specified path to that currently used by 
>> >> > fontconfig,
>> >> > which processes the fonts.
>> >> >
>> >> > I'd check that you have all the font names *correctly* stated, 
>> >> > especially with
>> >> > respect to upper/lower case letters, to make sure that 
>> >> > 'HelveticaNeueLTStd-Md'
>> >> > really does exist as a truetype/type 1 font.  What you have, are Open 
>> >> > Type fonts,
>> >> >
>> >> >   HelveticaNeueLTStd-Md.otf
>> >> >   HelveticaNeueLTStd-MdCn.otf
>> >> >
>> >> > Other than that, if the required font(s) are in the directory, 
>> >> > correctly stated, and
>> >> > required for the conversion, then they should be used.
>> >> >
>> >> > Regards,
>> >> >
>> >> >
>> >> > Chris.
>> >> >
>> >> > On Thu, 20 Oct 2011 04:27:52 +0900
>> >> > Go Furukawa <address@hidden> wrote:
>> >> >
>> >> >> Hello All,
>> >> >>
>> >> >> I have a problem about pdf2swf.
>> >> >>
>> >> >> I want to convert a PDF file (not embeded fonts) to a swf file,
>> >> >> but converted swf is bad, font shape is not real, font position is 
>> >> >> strange.
>> >> >>
>> >> >> I'm using pdf2swf using following parameters
>> >> >> # pdf2swf  -F /path/to/fonts HelveticaNeue.pdf -o HelveticaNeue.swf -v
>> >> >>
>> >> >> pdf2swf -v log
>> >> >> http://dl.dropbox.com/u/123033/pdf2swf_question/log.txt
>> >> >>
>> >> >> I put many fonts to /path/to/fonts/ directory,
>> >> >> but in my log, only 3 fonts is recognized at line 6,
>> >> >> and found 10 fonts at line 9.
>> >> >>
>> >> >> How can I use all fonts in directory ?
>> >> >> Is anyone have an idea to solve my problem ?
>> >> >>
>> >> >> Source PDF (not embeded fonts):
>> >> >> http://dl.dropbox.com/u/123033/pdf2swf_question/HelveticaNeue.pdf
>> >> >>
>> >> >> pdf2swf Output:
>> >> >> http://dl.dropbox.com/u/123033/pdf2swf_question/HelveticaNeue.swf
>> >> >>
>> >> >> Fonts (not attached to this mail)
>> >> >> HelveticaNeueLTStd-Md.otf
>> >> >> HelveticaNeueLTStd-MdCn.otf
>> >> >> I put them to /path/to/fonts directory.
>> >> >>
>> >> >>
>> >> >> http://dl.dropbox.com/u/123033/pdf2swf_question/capture_pdf.png
>> >> >> http://dl.dropbox.com/u/123033/pdf2swf_question/capture_swf.png
>> >> >>
>> >> >>
>> >> >> from Go Furukawa
>> >
>> >
>>
>
>
> --
> Chris <address@hidden>
>
> ---------------
> SWFTools-common is a self-managed list. To subscribe/unsubscribe, or amend an 
> existing subscription, please kindly point your favourite web browser 
> at:<http://lists.nongnu.org/mailman/listinfo/swftools-common>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]