Commit Graph

3375 Commits

Author SHA1 Message Date
suzuki toshiya
82633a2440 [cache] Fix Savannah bug #27441, cleanup Redhat bugzilla #513582. 2009-09-27 16:55:44 +09:00
suzuki toshiya
f2647ddabb [cache, psaux, type1] Fix for multi build. 2009-09-26 00:48:37 +09:00
suzuki toshiya
76f1b9d9cf [autofit] Fix for multi build. 2009-09-25 23:57:30 +09:00
suzuki toshiya
4e0c9ee155 [cache] Check the face filled by FTC_Manager_LookupFace(). 2009-09-24 14:30:40 +09:00
Werner Lemberg
e2184505b1 * docs/CHANGES: Updated. 2009-09-23 09:28:48 +02:00
Werner Lemberg
766b822f4c [raster] Fix 5-levels grayscale output.
This was broken since version 2.3.0.

* src/raster/ftraster.c (count_table): Use pre-2.3.0 values (which
were then computed dynamically).
(Vertical_Gray_Sweep_Step): Updated.

(ft_black_render): Initialize `worker->gray_lines' (problem found by
valgrind).

(FT_RASTER_OPTION_ANTI_ALIASING, DEBUG_RASTER): Dont' #undef, just
comment out.
2009-09-12 23:15:17 +02:00
suzuki toshiya
812d1bc90d Improve configure.raw for cross build. 2009-09-13 02:12:44 +09:00
suzuki toshiya
704f4d75cd [BDF] Modify hash API to take size_t value instead of void *. 2009-09-13 00:50:14 +09:00
suzuki toshiya
519a5eafd7 Whitespace. 2009-09-13 00:00:28 +09:00
suzuki toshiya
0729bc9f52 [Win64] Improve the computation of random seed from stack address. 2009-09-10 16:09:55 +09:00
Werner Lemberg
fecb7a60fa Replace CR line endings with CRLF in Visual C/CE project files. 2009-09-10 07:36:11 +02:00
Werner Lemberg
d30062d25c Whitespace. 2009-09-08 07:06:54 +02:00
Werner Lemberg
4539b3eec8 Whitespace. 2009-09-08 07:05:26 +02:00
Werner Lemberg
5e240c1270 [raster] Improvements for stand-alone mode.
* src/raster/rules.mk: Don't handle ftmisc.h.  It is needed for
stand-alone mode only.

* src/raster/ftmisc.h (FT_MemoryRec , FT_Alloc_Func, FT_Free_Func,
FT_Realloc_Func): Copy declarations from ftsystem.h.
2009-09-03 13:14:24 +02:00
Bram Tassyns
4694ea2b95 Improve vertical metrics calculation (Savannah bug #27364).
The calculation of `vertBearingX' is not defined in the OTF font
spec so FreeType does a `best effort' attempt.  However, this value
is defined in the PDF and PostScript specs, and that algorithm is
better than the one FreeType currently uses:

  FreeType: Use the middle of the bounding box as the X coordinate
            of the vertical origin.

  Adobe PDF spec: Use the middle of the horizontal advance vector as
                  the X coordinate of the vertical origin.

FreeType's algorithm goes wrong if you have a really small glyph
(like the full-width, circle-like dot at the end of the sentence, as
used in CJK scripts) with large bearings.  With the FreeType
algorithm this dot gets centered on the baseline; with the PDF
algorithm it gets the correct location (in the top right).  Note
that this is a serious issue, it's like printing the dot at the end
of a Roman sentence at the center of the textline instead of on the
baseline like it should. So i believe the PDF spec's algorithm
should be used in FreeType as well.

The `vertBearingY' value for such small glyphs is also very strange
if no `vmtx' information is present, since the height of the bbox is
not representable for the height of the glyph visually (the
whitespace up to the baseline is part of the glyph).  The fix also
includes some code for a better estimate of `vertBearingY'.

* src/base/ftobjs.c (ft_synthesize_vertical_metrics): `vertBearingX'
is now calculated as described by the Adobe PDF Spec.  Estimate for
`vertBearingY' now works better for small glyphs completely above or
below the baseline into account.

* src/cff/cffgload.c (cff_slot_load): `vertBearingX' is now
calculated as described by the Adobe PDF Spec.  Vertical metrics
information was always ignored when FT_CONFIG_OPTION_OLD_INTERNALS
was not defined.

* src/truetype/ttgload.c (compute_glyph_metrics): `vertBearingX' is
now calculated as described by the Adobe PDF Spec.
2009-09-02 13:06:33 +02:00
John Tytgat
03e8b2f763 Fix custom cmap for empty Type 1 font (Savannah bug #27294).
* include/freetype/internal/t1types.h (T1_EncodingRecRec_): Update
comment to reflect revised code_last meaning.
* src/type1/t1load.c (T1_Open_Face), src/type42/t42objs.c
(T42_Open_Face): Assign max_char as highest character code + 1 and
use this for T1_EncodingRecRec_::code_last.
* src/psaux/t1cmap.c (t1_cmap_custom_init): Follow revised
T1_EncodingRecRec_::code_last meaning.
2009-09-01 08:10:24 +02:00
Ralph Giles
17904a107a Document that FT_Get_X11_Font_Format() is a general call.
This function was originally added to return the underlying font
format in a way which was compatible with the needs of the XFree86
font server.  However, a function of this sort is also necessary when
freetype is used by PDF interpreters which apply different rules
based on the font format.

The X11 namespace is confusing for such users.  This commit ameliorates
that confusion by documenting that this function is in fact entirely
internal to freetype and doesn't depend on X11 in any way.
2009-08-28 09:08:00 +02:00
Werner Lemberg
d77cd8ce7e Fix rendering of horizontally compressed CFFs.
Bug reported by Ivan Nincic <inincic@pdftron.com>.

* src/cff/cffgload.c (cff_slot_load): Thinko: Check `xx' element of
`font_matrix' also.

* docs/CHANGES: Updated.
2009-08-27 00:10:56 +02:00
Su Yu
efaf5abcf8 Don't call ft_fseek' every time when executing ft_fread'.
* src/base/ftstream.c (FT_Stream_Seek), src/base/ftsystem.c
(ft_ansi_stream_io): Implement it.
2009-08-03 19:55:58 +02:00
suzuki toshiya
2b6a3f0be9 sfnt: Cast a charcode to 32-bit in cmap format 14 parser. 2009-08-01 00:37:59 +09:00
suzuki toshiya
9b1aab8d1e sfnt: Cast a charcode to 32-bit in cmap format 12 parser. 2009-08-01 00:37:58 +09:00
suzuki toshiya
e6d0c1fb9c psaux: Fix a few casts to FT_Int32 value. 2009-08-01 00:37:58 +09:00
suzuki toshiya
b76c3f718d sfnt: Fix a data type mismatching with its source. 2009-08-01 00:37:57 +09:00
suzuki toshiya
2a2beb47c4 sfnt: Extend a few local variables to load 32-bit values. 2009-08-01 00:37:57 +09:00
suzuki toshiya
3783dac000 pfr: Extend `num_aux' to take 32-bit value. 2009-08-01 00:37:56 +09:00
suzuki toshiya
3bda1f9949 pcf: Truncate FT_ULong `nprops' to fit to int PCF_Face->nprops. 2009-08-01 00:37:56 +09:00
suzuki toshiya
8eb551f1b3 gxvalid: Extend a few local variables to reduce the casts. 2009-08-01 00:37:55 +09:00
suzuki toshiya
d365997759 gxvalid: Extend `settingTable' to take 32-bit offset. 2009-08-01 00:37:55 +09:00
suzuki toshiya
6e2375f72c autofit: Cast FT_Long glyph_count to compare with FT_UInt GID. 2009-08-01 00:37:54 +09:00
suzuki toshiya
057bc4c071 smooth: Exclude 16-bit system in invalid pitch/height check. 2009-08-01 00:35:40 +09:00
suzuki toshiya
b16a942671 cff: Type large constants > 0x7FFF as long for 16-bit systems. 2009-08-01 00:32:25 +09:00
suzuki toshiya
5133c56f2f base: Remove an unused variable. 2009-08-01 00:32:25 +09:00
suzuki toshiya
5d3ff05615 cache: Check higher bits in flags for non ILP32 systems. 2009-08-01 00:32:24 +09:00
suzuki toshiya
61adbe980a sfnt: Ignore invalid GIDs in glyph name lookup. 2009-08-01 00:32:24 +09:00
suzuki toshiya
eec405540d pcf: Fix a comparison between FT_Long and FT_ULong. 2009-08-01 00:32:24 +09:00
suzuki toshiya
eceaffef3e gxvalid: Guarantee `nFeatureFlags' size up to 32-bit. 2009-08-01 00:32:23 +09:00
suzuki toshiya
cad4f91555 sfnt: Insert explicit cast for LP64 system. 2009-08-01 00:32:23 +09:00
suzuki toshiya
2f07c57f5a gxvalid: Guarantee `just' table size upto 32-bit. 2009-08-01 00:32:22 +09:00
suzuki toshiya
205a2a0cce gxvalid: Guarantee `trak' table size upto 32-bit. 2009-08-01 00:32:22 +09:00
suzuki toshiya
49740490e1 type1: Fix a data type mismatching with its source. 2009-08-01 00:32:22 +09:00
suzuki toshiya
737634e5e4 pfr: Fix a data type mismatching with its source. 2009-08-01 00:32:21 +09:00
suzuki toshiya
b12b8c3ce4 pfr: Fix a data type mismatching with its source. 2009-08-01 00:32:21 +09:00
suzuki toshiya
c4420d97f4 pfr: Fix a data type mismatching with its source. 2009-08-01 00:32:21 +09:00
suzuki toshiya
471980d9dc smooth: Improve the format in debug message. 2009-08-01 00:32:20 +09:00
suzuki toshiya
0105905052 sfnt: Fix a data type mismatching with its source. 2009-08-01 00:32:20 +09:00
suzuki toshiya
cf31edf5ee psaux: Fix a data type mismatching with its source. 2009-08-01 00:32:19 +09:00
suzuki toshiya
ec7bc863fb truetype: Extend TrueType GX packed deltas to FT_Offset. 2009-08-01 00:32:19 +09:00
suzuki toshiya
5668181bda truetype: Extend mmvar_len to hold size_t values. 2009-08-01 00:32:18 +09:00
suzuki toshiya
a115142057 truetype: Check invalid function number in IDEF instruction. 2009-08-01 00:32:18 +09:00
suzuki toshiya
d1c23082b6 truetype: Check invalid function number in FDEF instruction. 2009-08-01 00:32:17 +09:00