libharu/libharu — pull request #41 by danieldocu (2013-07-16 13:49:48+00:00)
Title: Fixes for various libharu issues

The following changes have been made:

Changes made to function HPDF_PAGE_SetDash
-The elements of the dash_ptn array are now real numbers
-phase parameter is now a real number
-Removed if-statement which checked if the number of dash pattern array elements is even, because I could not find a reason for this check in the PDF reference.

Changes made to function HPDF_LoadRawImageFromMem
-Added parameter size. If size is not 0, the image size will be set to the value of the size parameter. If size is 0 the image size will be calculated. This change was necessary because the image size was not always calculated correctly.
-Added parameter black_white. If black_white is false, the image will not be loaded with the function. HPDF_Image_LoadRaw1BitImageFromMem but instead with the function HPDF_Image_LoadRawImageFromMem

Changes made to function LoadAfm
-LoadAfm will no longer cancel loading an afm file if a line (for example a comment) is longer than 512 characters
-If the character number specified in the afm file is not equal with the number determined by HPDF_GryphNameToUnicode, the character data will additionally be saved with the character number from the afm file.

Added function HPDF_Page_WriteComment (HPDF_Page page, const char *text);
-The function writes a comment into the PDF file.
-If the comment does not start with % the PDF file may be corrupt.