diff --git a/docs/internals/io-frames.html b/docs/internals/io-frames.html new file mode 100644 index 000000000..923085cb5 --- /dev/null +++ b/docs/internals/io-frames.html @@ -0,0 +1,187 @@ + + + + + + + FreeType 2 Internals - I/O Frames + + + + + +
+

+FreeType 2.0 I/O Frames

+ +
+

+© 2000 David Turner (david@freetype.org)
+© 2000 The FreeType Development Team (devel@freetype.org)

+ +


+


+
  +

Introduction:

+ + +


+ +

I. What frames are:

+ + +


+ +

II. Accessing and reading a frame with macros:

+ + +


+ +

III. Alternatives:

+
    + It is sometimes useful to read small integers from a font file without using + a frame. Some functions have been introduced in FreeType 2 to do just that, + and they are of the form FT_Read_xxxx. +

    + For example, FT_Read_Short( stream, &error ) reads and returns a 2-byte + big-endian short from a stream, and place an error code in the error + variable. +

    + Thus, reading a single big-endian integer is shorter than using a frame for it. +

    + Note that there is also the macros READ_xxx() which translate to:

    +

      + ( FT_Read_xxx(stream,&error), error != FT_Err_Ok ) +
    +

    + and can be used as in:

    +

      + if ( READ_UShort(variable1) || READ_ULong (variable2) ) goto Fail;
      +
    +

    + when error and stream are already defined locally.. +

+