From: Zoltan B. <zb...@du...> - 2006-01-11 23:21:57
|
Hi, Bob Doan =C3=ADrta: >Hi Zoltan, > >I like GNOME-VFS as a solution. If we add support for gnome-vfs we >could probably make use of it in other File IO places. > >It would have to be a compile time option and a fallback to flat files >(as you say) > >- Bob =20 > just a heads up, that I am progressing. :-) I have done the following: - a little configure.in and Makefile.am magic to detect and use GNOME-VFS= , it can be disabled manually - reordered rpdf_set_font() a little, so it finds already used fonts firs= t, It will implicitely use rpdf_add_font() if it doesn't find the given font name and encoding among the builtins. - rpdf_object_append() returns the current object#, it is needed for embedding fonts, as objects cross-referenced by each=20 other - struct _rpdf_fonts gained two new members, stream and stream_length - GNOME-VFS is used for reading in the file and detecting the MIME type, so I can distinguish between TrueType and Type1 fonts, when only a=20 font name is given, or normal file operations are used and the .ttf and .pfb=20 suffixes are checked for if full path is given for the file. And it doesn't crash. :-) The font binaries already appear in the PDF, but XPDF complains about them and doesn't use them. But it doesn't crash, so the structures are correct but details are missing. :-) You will need to have ttf2pt1 on the system, it will be used to extract the font metrics from the font file, e.g. rpdf_text_width() will=20 need it. I think I will detect its presence in rpdf_new(), if not found, font=20 embedding will be runtime disabled. Would you like to see the patch in this incomplete/non-working state? Best regards, Zolt=C3=A1n B=C3=B6sz=C3=B6rm=C3=A9nyi |