1؎м|EF tN@VVR1҈oVst BsX,:urHt 0F}VN#0~u09rFN@0<t,;<v,<usFsF<t SF@uX^uV0|F}UsV^V  F1t$S[ÊtLVtFtfjftSjjH@^ F6 PXE Boot:  WiLinupfSensDrive ?:?::AEuU<fjQPS1Pjf1ɎَѼ|}r,`|uuƀrIᾢ}K1҉ .w ޿)Itduddu`PDL Zs*}}0r4u.t"rURAZrUu tBRZrˀ?tfFRff1fC0fZf=w@(f8r^P[s Ot0FsF ^(FwReadBoot error PUWEVamnesiac?:WEV ::BTX 1мfjf^)GG^╬s uU}EEEfh (֕Е @"ꌐ1ɱѱ8ٺ6 -)б3QPhj+5 QQQQRja %"1"Еf юَH" 1Ўػpܕtr4!PP 栈!桰!桰!XX!j4j0j,j(j$j jj j j j j j j4$D$`f|$Dut$Pt$PjWD^d$a<$t<$u D$ud$π j>j :j 6j 2j .j *j&j"jpjqjrjsjtju jvjwj`jt$D%]Fu-^+]BR^u%1҉] j"uT$0taf] ]~Vq^^]6]]f "1؎ܕfffffa]ϼ]f`fffff1؎֕Е @"e1ɱюَ%]t$D%͕8ك=]tI~V]3 ]y5]ʹ^Rt ]fFaσuD$ `X6 tŰ=VtfvtatJCPu fu6 ЖFt -t t  u^ u pPXPX$< i/ u`1ɴPf 8cuf1< tPЀfBPr0ƀrf PffajWEVu WEVt=$7t{h4h4]X=,7uf~u 7,7$79s򃺔uh4륡(7(7+(7$D$((7D$D$D$$D$D$ [^_] [^_] WVSt$ D$$D$ |$F<%uzFNRNN mGANNNEuHANNN6gANNNLjANNNFOSANNNXANNN}"ANNNœAANNNEuANNNoANNN{ANNN- $TNpo(NAN`hpxP$'TNpo(NAN (08@H\{8$TNpo(NAN`hpxLJ NNANlibpng/png.hfNNANlibpng/pngconf.h{UANNNpL$$TN- DNAN:$TN- DNANO$sTN- DNANX-*1ANNNtANNN`6Ңh1$` TNDNANXG' $TNDNAN[K$TNDNANƳ3$TNDNANO8$Z TNDNANGb&$:TNDNAN$ TNDNAN$kTNDNAN#6$y TNDNAN/$VTNDNANJf$TNDNBNdr*$kUNDNBNh$UNDNBNa'r$^UNDNBN^ >N`$ UNDNBN0o!$XUNDNBNTd$MUNDNBN@r $UNDNBN_$UNDNBN_fl$-UNDNBN gؤ$UNDNBN] $*UNDNBNU$"UNDNBNsX$UNDNBNG^$oUNDNBN ײ\\$UNDNBN#2$UNDNBN(ZS/$UNDNBN,o$UNDNBN0e$UNDNBN3z$UNDNBN8 ($UNDNBN;Be$UNDNBN@,I$UNDNBNCWH$VNDNBNHµfA$VNDNCNKf1L$ VNDNCNPZ$VNDNCNS$rVNDNCNX4 $VNDNCN\"$\VNDNCNc$VNDNCNhAS$pVNDNCN^6|ɓ$GVNDNCNkuE$VN2DNCNpkw@$<VN8DNCNx4$AVN4DNCNN!j$2VNDNCNLANNNtPANNN  5ja/ANNN b[ $?VNDNCN >]$`VNDNCN'1>AX$ WNDNCNu"$WNDNCN (08@HPX`Z ^$kWNDNCNhp$WNDNCN (08@1$f(WNDNDNx;b$ WNDNDN @ B$]WNDNDNGE$6WNDNDN?7]$WNDNDN(08@HPX`hpxBu$`WNDNDNԇp$WNDNDN F4$,/WNDNDNJg$$WNDNDN ,@$WNDNDNc$iWNDNDNM/u$81WNDNDN/0$WNDNDN7 `h$vBXNDNDNX ` h p x X$,XNDNDN   С$XNDNDN|_$|AXNDNDN ( 0 ?!$XNDNDN8 G ۼI1$BXNDNDN   "5$XXNDNDN( 0 8 @ H P -N $hXNDNDNX ` h p x 5rm$XNDNDN@ H 0x6$XNDNDNP ض$~XNDNDN @R$XNDNEN \$W+XNDNEN z $Y%XNDNEN 3d$+XNDNEN     $aLXNDNEN ( 0 8 @ 'ҵL$9XNDNENH W $'XNDNENP X ` 3$ YNDNENh p @(E$YNDNENx E$(YNDNEN V$qYNDNEN  ۀ$SNYNDNEN (Q$YNDNENx h E$֛YNDNEN   ( 0 8 @ H P N< |$YNDNENX N m$YNDNEN` |?ANNN_ $ YN˅NENp $ YN˅NEN $YN˅NEN ey$ YN˅NFN d$YN˅NFN .iNMANNNs $:YN˅NFN ( 0 b.$v YN˅NFN8 -,$ YN˅NFNw̨L$ ZN˅NFN@ J|$CZNlDNFNH U ⺍ANNNKw ANNN6 $ZNDNFN ?!~ NNFNlibpng14.pc葁$ZNDNFNO *ZNDNFN ANNNG GANNNw F^$ZN- DNFNVANNN !!t$ZN2DNFNP f ;ZNNFNX a $ ZN:DNGN  ( !8ANNNn*ANNN.[Jpm[N/NGNhpx q4mHs[N?NGN` h p x :=؏mhA[N?NGN  !$Mmx5[N?NGN8@H Qi mb[N?NGNPX`hpx 2m[N?NGN (08 mc[NNGN 2֪>m[N@NHN` m([N@NHNd 6m5[N@NHN ˳m[N@NHN[QVm\N@NHNN m`\N@NHN#8m\N@NHN m8\N@NHN(0pm,\N@NHN8@H3?ma\N@NHNPX`hpx 1ɶhm$\N@NHN Pvm\N@NHNAgӇm!\NNHNڹm`?\NNHN gumo\NNHN (08xmU\NANHN{Emо\NANHN8@HPX`hpx`Dmx1\NANHN`hp'Hm0\NANHN^NumM\NANHN'!km,\NANHNm,\NANHN (mm@\NANHN08@Ho!nmX]NANHNXx;mX=]NANHNPX`hR/m8]NANHNpxV J@M5m`>]NANHN DmT]NNIN6 *Wmx`]NNIN (710mX]NANIN08@HPX`hpxF Zkm]NANIN (08@HPm`]NANING m0]NANINTm]NBNIN (08@HPXVl_NCNQNh(p(x(( {m5_NCNRN((( 4mP_NCNRN,,,,,,,,,,,,%磜mJ_NCNRN()0)8)@)H)&j?mp_NDNRN -(-0-8-@-H-P-X-`-h-p-Vv1m@`NDNRNx------------0&p um8m`NDNRNP)X)`)h)p)x))7Y}m`NDNRN8.@.H.P.X.`.h.p.x....(ymD `NDNRN(]A%m2`NDNRN---N)']\m0`NDNRN )-'mx`NDNRN--kp`NNRN// /(/0/8/@/H/P/X/d(TmH `NENRN////////0000.xsVmPjaNENSN`/h/p/x////6+m_aNENSN.. .(.0./0c]mxaNENSN555555555555/PV!m8aaNENSN85@5H5P5X5`51=]6m_aNENSNh5p5x55550 m_aNENSN6666770Rm`aNENSN//m0aNENSN//fm&aNENSN7 7 .|GpmxaNENSN057BlmPaNENSN7777777777777x mȔaNENTN(70787@7H7P7X7`7h7 Kdm8EaNENTN::: := #6maNFNTN::::::::::::p7͕mUbNFNTN(:0:8:@:H:] +.m"bNFNTNx77v-PJibNzNTN0RC`bNzNTN//2Gj!fNNXNX:`:odzN N Nmec+!%6j%gp:F`gm tƒ]ZM JwFrK 0wݢJZ __lbfH|A^/3)@uK4o+WnKj0E$%Ue,EuLٖoBbY&Oث%R/$xk} cY[ GeE$Za%3SJYA>3!A;oiATzGfzh}ZJe?qQ!oOWjGlb%$*Jg%&i`oXј+]Dc?Ь!Eo0%Ҝ_ ~r? L u_S$X0i]ͥGơMUr֖TF6;U? 7.nqy3gs(YMsJzpTE]Rb؀:&&s) M.T&QC;I0vI瓢h?uCYNVWC^]vu Zʧ\к|e|x&mE0Uϊ|qIk,Nm aP0NM>ILJd0/`.U^3igv/Sv"xzPA` `j;ydRXZO$)Q"`GmZҠ *Trh6Lphhҕ3 I5v'qS5QAeQ5 ebXef>5nZ IFRatt))*bҾpmW1pʶ~S0OYӌ2$/=XpqaM:biT?qa] n]x( e űd6!,U~tw_|^Ɠ9Y0"3M)FZt&Y*F *FRQӉ0*_:MJ=zqA]7mZ´Su9V<C\`P} ͽ?]8 gat!3'-D3!ۼB ; A2wnjҊQG5Tuoej%$ !SՒ)aEqLMn_j058t KdXwD-F /OC r%u>xmU^c)~nWvb|`Du/o$ +[~o}Yt))Y˿MS\כEHRƲFbQHjm7/Dץse_2h)iVT5Xn:ϯHv[_ſo0ˏ*ED#] (3CJBzHzE)()tp^]3AqMHKkק}5^^J#ՁbCxZ4Yt?9GC١qS.\ ra 1}W'3 lR|ԽYV.:͡y"hGꭂlo׬ XIf=zrMrhhH@< ;-=|8&XVfhOC]2Zv4bO*m‹\vD?[@HMzZ-f Bh̅?j"q ʭwP(R[BxQZh pb.VQoҊ۶`BǙQ|PMX­RCEB1tb<t:p`Nے2YB&Wr!ttu291/ AB E*t2p1u2-lY^TJ獄QҐ'nZQug3]p9!T!%Ǘcjՠ̫|zO {؍4Umc1ߢ.˜gzfF/6ʼnxnKmMɪ}yۻigIb^2lHXjkr L-#yy>`fj R7 MWvq>p*w nч Sd9bYx,srQӖNE>G#[`0Q0,sfS yPcղKq90mUAYI TV7xڮ=.Y?FC-{Rqy#/eR: m3Kr⾐vIg SbB<`tCr=K)P#LF*.NK& GiX/+]R9ҢV-  a< QT8i'( /s[; |kepl%;o#Y4Zx(%|G*0"8ȜO F*wꋂԩRF gmT}xf/k=o6meIٿPtGYzr`ͺX*H5{VA{ ~/)2Y ȼ!i2Ba]AK:gSubE?Ȝ QT*r30kŸ{VDאּĥz TK4m/eW&*,VX8,eu\Z<WX/LR+INmx>\ Qx[ztrЅD\:  Pq4?^;_F Qws7H"3;}꧛h5jnC*G_ӧJ2Ą e߰ByL,+k5SCT}D%tA̪.gb2: L1[cT6bcj qV o֭h0Omc>?dUh2-3)13 O8N:1hh*&0g&Ѡ3؄_{J2Q(J<#BJ:?g[Rrz䦟&4<\I9oI4wnf,VYA%"iLb* 'EX@`1׈Txzcك"8V!kFL=bh=Ci>6teW 36}gBKY|*ps+,#5z{dхcaG(ΜgB+ ۥK9\ AQpfEYhW8Nt6b][rit:QqQipH"ix;$C E-To.\.#*_:=_c|JY<ӆ?/Dϊ-==h&i]% tVvx4=߉x(SSe1Gq3I==p^3-$e0}wPt~!s/ƒi 0ysd@I4Hz<؈3a{i2H9`U- <NiD70-]ze'ɰ *.,CJ›d1@{@ƪ6&rmɶry0>'9J?.s15rS+8 m|8(w\w[O; s?,Ÿbeٖ|,w9sexՕmfNF|;\4fQ>AN+qEi FAf,Mz a,p>ynsg -i;\bUo'Ǧhv8bZE0A=^P"A;txx y-su0oXk j3T1g)!Gh5di⃖Hќ.15 ʥdjf9Jk!zvSf05v,QD J߃9"rq %-"WjC== |'Ti-ζR?ZSb2TDP-5/U;&jb]8++6҈U<3]G]u_%6-e2 ck-VK4N\_? ].dxP:Q/}qhDYg(ٹdm3gz<!hc.D)!BNvxAV> "A>7'&?0X[c/q2PA2b\>* =rF &iX;@v/@kiaB Ekjl)}CZ}m"kjbW!M:(G.D@d\P=8WW$h{l#uHlZ#%%m`)uf26DܡC,-Ђ%g,p ATDyt|sP`\ E"wUv&Dbٵj|~iZa1`A}^^Ft)/WL dtF"@-R}?exlYE(F'i@%a"Z4:aGpsrBԀUϑׄYjJOw){\AGnoSh "hg ןH?טҵ3Xh,:l]5DhI笑!$Wѿ-><S! XuT #bMwc4t.%c|:5t\E0Gp1A̶T3 O H]a_Og 6{mC;LPnMBKFpl#{DRjUPH't(8%uZ mH#/4js!ܙL(<XL,}[;RNK [ ^JWor? 61Kg1SZhv~F&l1ȓ H꛽6G2.^3) 48^)yeN46+<P:7ƠDk#D6LTy/qi%{Й c U47 m Uk - m U m U m S k Q  m Q4 " m Un Xj Zo `o `o `o `o `o `o `o `o `o `o `o `H S ]m ` `o `o `o `o `o `o `o `o `o ` ]o `o `o `o `o `o `o `o `o `o `o `o `o `o `o `o `o `o `o `o `o `o `o `m o `o `o `o `o `( o `o `o `n _o `o `o `o `o `o `n _o `o `o `o `o `a^o `m `2 `o `o `o `o `o `o `} ?o `n _o `  1_0O!l l . = k Q@ IE G E m UZ I . E H m U m U m U m U m U m U m U m U m U m U m U m U m U - E     6 i m U m U m U l P m U<  z U .`.. .`.. .`.. . ...snap COPYRIGHT> w binbootf cfconf conf.default3 dev etc home`7kernels lib libexecmedia  mntprocrescue`rootsbin@scripts` tmp usr F var nanobuild>@Y|nanond Electronics Engineers, Inc. In the event of any discrepancy between these versions and the original IEEE Standard, the original IEEE Standard is the referee document. In the following statement, the phrase ``This material'' refers to portions of the system documentation. This material is reproduced with permission from American National Standards Committee X3, on Information Processing Systems. Computer and Business Equipment Manufacturers Association (CBEMA), 311 First St., NW, Suite 500, Washington, DC 20001-2178. The developmental work of Programming Language C was completed by the X3J11 Technical Committee. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the Regents of the University of California. NOTE: The copyright of UC Berkeley's Berkeley Software Distribution ("BSD") source has been updated. The copyright addendum may be found at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change and is included below. July 22, 1999 To All Licensees, Distributors of Any Version of BSD: As you know, certain of the Berkeley Software Distribution ("BSD") source code files require that further distributions of products containing all or portions of the software, acknowledge within their advertising materials that such products contain software developed by UC Berkeley and its contributors. Specifically, the provision reads: " * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors." Effective immediately, licensees and distributors are no longer required to include the acknowledgement within advertising materials. Accordingly, the foregoing paragraph of those BSD Unix files containing it is hereby deleted in its entirety. William Hoskins Director, Office of Technology Licensing University of California, Berkeley  .`.. .`.. ... .`.. .`.. .`.. .`.. . ..libpng png.h pngconf.h@ X11iconv.h libcharset.hlocalcharset.h libart-2.0>G autosprintf.hH gettext-po.hI libintl.h>J ft2build.h>K freetype2>|auradfuirrd.h . ..png.h pngconf.h> pngpriv.h> ...# $FreeBSD: src/COPYRIGHT,v 1.11.2.2.2.1 2010/06/14 02:09:06 kensmith Exp $ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 The compilation of software known as FreeBSD is distributed under the following terms: Copyright (c) 1992-2010 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The 4.4BSD and 4.4BSD-Lite software is distributed under the following terms: All of the documentation and software included in the 4.4BSD and 4.4BSD-Lite Releases is copyrighted by The Regents of the University of California. Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors. 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The Institute of Electrical and Electronics Engineers and the American National Standards Committee X3, on Information Processing Systems have given us permission to reprint portions of their documentation. In the following statement, the phrase ``this text'' refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the second BSD Networking Software Release, from IEEE Std 1003.1-1988, IEEE Standard Portable Operating System Interface for Computer Environments (POSIX), copyright C 1988 by the Institute of Electrical a /* pngconf.h - machine configurable file for libpng * * libpng version 1.4.5 - December 9, 2010 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h * */ /* Any machine specific code is near the front of this file, so if you * are configuring libpng for a machine, you may want to read the section * starting here down to where it starts to typedef png_color, png_text, * and png_info. */ #ifndef PNGCONF_H #define PNGCONF_H #ifndef PNG_NO_LIMITS_H # include #endif /* Added at libpng-1.2.9 */ /* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" * script. */ #ifdef PNG_CONFIGURE_LIBPNG # ifdef HAVE_CONFIG_H # include "config.h" # endif #endif /* * Added at libpng-1.2.8 * * PNG_USER_CONFIG has to be defined on the compiler command line. This * includes the resource compiler for Windows DLL configurations. */ #ifdef PNG_USER_CONFIG # include "pngusr.h" # ifndef PNG_USER_PRIVATEBUILD # define PNG_USER_PRIVATEBUILD # endif #endif /* * If you create a private DLL you should define in "pngusr.h" the following: * #define PNG_USER_PRIVATEBUILD * e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons." * #define PNG_USER_DLLFNAME_POSTFIX * e.g. // private DLL "libpng14gx.dll" * #define PNG_USER_DLLFNAME_POSTFIX "gx" * * The following macros are also at your disposal if you want to complete the * DLL VERSIONINFO structure. * - PNG_USER_VERSIONINFO_COMMENTS * - PNG_USER_VERSIONINFO_COMPANYNAME * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS */ #ifdef __STDC__ # ifdef SPECIALBUILD # pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\ are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.") # endif # ifdef PRIVATEBUILD # pragma message("PRIVATEBUILD is deprecated.\ Use PNG_USER_PRIVATEBUILD instead.") # define PNG_USER_PRIVATEBUILD PRIVATEBUILD # endif #endif /* __STDC__ */ /* End of material added to libpng-1.2.8 */ #ifndef PNG_VERSION_INFO_ONLY /* This is the size of the compression buffer, and thus the size of * an IDAT chunk. Make this whatever size you feel is best for your * machine. One of these will be allocated per png_struct. When this * is full, it writes the data to the disk, and does some other * calculations. Making this an extremely small size will slow * the library down, but you may want to experiment to determine * where it becomes significant, if you are concerned with memory * usage. Note that zlib allocates at least 32Kb also. For readers, * this describes the size of the buffer available to read the data in. * Unless this gets smaller than the size of a row (compressed), * it should not make much difference how big this is. */ #ifndef PNG_ZBUF_SIZE # define PNG_ZBUF_SIZE 8192 #endif /* Enable if you want a write-only libpng */ #ifndef PNG_NO_READ_SUPPORTED # define PNG_READ_SUPPORTED #endif /* Enable if you want a read-only libpng */ #ifndef PNG_NO_WRITE_SUPPORTED # define PNG_WRITE_SUPPORTED #endif /* Enabled in 1.4.0. */ #ifdef PNG_ALLOW_BENIGN_ERRORS # define png_benign_error png_warning # define png_chunk_benign_error png_chunk_warning #else # ifndef PNG_BENIGN_ERRORS_SUPPORTED # define png_benign_error png_error # define png_chunk_benign_error png_chunk_error # endif #endif /* Added at libpng version 1.4.0 */ #if !defined(PNG_NO_WARNINGS) && !defined(PNG_WARNINGS_SUPPORTED) # define PNG_WARNINGS_SUPPORTED #endif /* Added at libpng version 1.4.0 */ #if !defined(PNG_NO_ERROR_TEXT) && !defined(PNG_ERROR_TEXT_SUPPORTED) # define PNG_ERROR_TEXT_SUPPORTED #endif /* Added at libpng version 1.4.0 */ #if !defined(PNG_NO_CHECK_cHRM) && !defined(PNG_CHECK_cHRM_SUPPORTED) # define PNG_CHECK_cHRM_SUPPORTED #endif /* Added at libpng version 1.4.0 */ #if !defined(PNG_NO_ALIGNED_MEMORY) && !defined(PNG_ALIGNED_MEMORY_SUPPORTED) # define PNG_ALIGNED_MEMORY_SUPPORTED #endif /* Enabled by default in 1.2.0. You can disable this if you don't need to support PNGs that are embedded in MNG datastreams */ #ifndef PNG_NO_MNG_FEATURES # ifndef PNG_MNG_FEATURES_SUPPORTED # define PNG_MNG_FEATURES_SUPPORTED # endif #endif /* Added at libpng version 1.4.0 */ #ifndef PNG_NO_FLOATING_POINT_SUPPORTED # ifndef PNG_FLOATING_POINT_SUPPORTED # define PNG_FLOATING_POINT_SUPPORTED # endif #endif /* Added at libpng-1.4.0beta49 for testing (this test is no longer used in libpng and png_calloc() is always present) */ #define PNG_CALLOC_SUPPORTED /* If you are running on a machine where you cannot allocate more * than 64K of memory at once, uncomment this. While libpng will not * normally need that much memory in a chunk (unless you load up a very * large file), zlib needs to know how big of a chunk it can use, and * libpng thus makes sure to check any memory allocation to verify it * will fit into memory. #define PNG_MAX_MALLOC_64K */ #if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) # define PNG_MAX_MALLOC_64K #endif /* Special munging to support doing things the 'cygwin' way: * 'Normal' png-on-win32 defines/defaults: * PNG_BUILD_DLL -- building dll * PNG_USE_DLL -- building an application, linking to dll * (no define) -- building static library, or building an * application and linking to the static lib * 'Cygwin' defines/defaults: * PNG_BUILD_DLL -- (ignored) building the dll * (no define) -- (ignored) building an application, linking to the dll * PNG_STATIC -- (ignored) building the static lib, or building an * application that links to the static lib. * ALL_STATIC -- (ignored) building various static libs, or building an * application that links to the static libs. * Thus, * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and * this bit of #ifdefs will define the 'correct' config variables based on * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but * unnecessary. * * Also, the precedence order is: * ALL_STATIC (since we can't #undef something outside our namespace) * PNG_BUILD_DLL * PNG_STATIC * (nothing) == PNG_USE_DLL * * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent * of auto-import in binutils, we no longer need to worry about * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore, * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes * to __declspec() stuff. However, we DO need to worry about * PNG_BUILD_DLL and PNG_STATIC because those change some defaults * such as CONSOLE_IO. */ #ifdef __CYGWIN__ # ifdef ALL_STATIC # ifdef PNG_BUILD_DLL # undef PNG_BUILD_DLL # endif # ifdef PNG_USE_DLL # undef PNG_USE_DLL # endif # ifdef PNG_DLL # undef PNG_DLL # endif # ifndef PNG_STATIC # define PNG_STATIC # endif # else # ifdef PNG_BUILD_DLL # ifdef PNG_STATIC # undef PNG_STATIC # endif # ifdef PNG_USE_DLL # undef PNG_USE_DLL # endif # ifndef PNG_DLL # define PNG_DLL # endif # else # ifdef PNG_STATIC # ifdef PNG_USE_DLL # undef PNG_USE_DLL # endif # ifdef PNG_DLL # undef PNG_DLL # endif # else # ifndef PNG_USE_DLL # define PNG_USE_DLL # endif # ifndef PNG_DLL # define PNG_DLL # endif # endif # endif # endif #endif /* This protects us against compilers that run on a windowing system * and thus don't have or would rather us not use the stdio types: * stdin, stdout, and stderr. The only one currently used is stderr * in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will * prevent these from being compiled and used. #defining PNG_NO_STDIO * will also prevent these, plus will prevent the entire set of stdio * macros and functions (FILE *, printf, etc.) from being compiled and used, * unless (PNG_DEBUG > 0) has been #defined. * * #define PNG_NO_CONSOLE_IO * #define PNG_NO_STDIO */ #ifdef _WIN32_WCE # define PNG_NO_CONSOLE_IO # define PNG_NO_STDIO # define PNG_NO_TIME_RFC1123 # ifdef PNG_DEBUG # undef PNG_DEBUG # endif #endif #if !defined(PNG_NO_STDIO) && !defined(PNG_STDIO_SUPPORTED) # define PNG_STDIO_SUPPORTED #endif #ifdef PNG_BUILD_DLL # if !defined(PNG_CONSOLE_IO_SUPPORTED) && !defined(PNG_NO_CONSOLE_IO) # define PNG_NO_CONSOLE_IO # endif #endif # ifdef PNG_NO_STDIO # ifndef PNG_NO_CONSOLE_IO # define PNG_NO_CONSOLE_IO # endif # ifdef PNG_DEBUG # if (PNG_DEBUG > 0) # include # endif # endif # else # include # endif #if !(defined PNG_NO_CONSOLE_IO) && !defined(PNG_CONSOLE_IO_SUPPORTED) # define PNG_CONSOLE_IO_SUPPORTED #endif /* This macro protects us against machines that don't have function * prototypes (ie K&R style headers). If your compiler does not handle * function prototypes, define this macro and use the included ansi2knr. * I've always been able to use _NO_PROTO as the indicator, but you may * need to drag the empty declaration out in front of here, or change the * ifdef to suit your own needs. */ #ifndef PNGARG #ifdef OF /* zlib prototype munger */ # define PNGARG(arglist) OF(arglist) #else #ifdef _NO_PROTO # define PNGARG(arglist) () #else # define PNGARG(arglist) arglist #endif /* _NO_PROTO */ #endif /* OF */ #endif /* PNGARG */ /* Try to determine if we are compiling on a Mac. Note that testing for * just __MWERKS__ is not good enough, because the Codewarrior is now used * on non-Mac platforms. */ #ifndef MACOS # if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) # define MACOS # endif #endif /* Enough people need this for various reasons to include it here */ #if !defined(MACOS) && !defined(RISCOS) # include #endif /* PNG_SETJMP_NOT_SUPPORTED and PNG_NO_SETJMP_SUPPORTED are deprecated. */ #if !defined(PNG_NO_SETJMP) && \ !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED) # define PNG_SETJMP_SUPPORTED #endif #ifdef PNG_SETJMP_SUPPORTED /* This is an attempt to force a single setjmp behaviour on Linux. If * the X config stuff didn't define _BSD_SOURCE we wouldn't need this. * * You can bypass this test if you know that your application uses exactly * the same setjmp.h that was included when libpng was built. Only define * PNG_SKIP_SETJMP_CHECK while building your application, prior to the * application's '#include "png.h"'. Don't define PNG_SKIP_SETJMP_CHECK * while building a separate libpng library for general use. */ # ifndef PNG_SKIP_SETJMP_CHECK # ifdef __linux__ # ifdef _BSD_SOURCE # define PNG_SAVE_BSD_SOURCE # undef _BSD_SOURCE # endif # ifdef _SETJMP_H /* If you encounter a compiler error here, see the explanation * near the end of INSTALL. */ __pngconf.h__ in libpng already includes setjmp.h; __dont__ include it again.; # endif # endif /* __linux__ */ # endif /* PNG_SKIP_SETJMP_CHECK */ /* Include setjmp.h for error handling */ # include # ifdef __linux__ # ifdef PNG_SAVE_BSD_SOURCE # ifdef _BSD_SOURCE # undef _BSD_SOURCE # endif # define _BSD_SOURCE # undef PNG_SAVE_BSD_SOURCE # endif # endif /* __linux__ */ #endif /* PNG_SETJMP_SUPPORTED */ #ifdef BSD # include #else # include #endif /* Other defines for things like memory and the like can go here. */ /* This controls how fine the quantizing gets. As this allocates * a largish chunk of memory (32K), those who are not as concerned * with quantizing quality can decrease some or all of these. */ /* Prior to libpng-1.4.2, these were PNG_DITHER_*_BITS * These migration aids will be removed from libpng-1.5.0. */ #ifdef PNG_DITHER_RED_BITS # define PNG_QUANTIZE_RED_BITS PNG_DITHER_RED_BITS #endif #ifdef PNG_DITHER_GREEN_BITS # define PNG_QUANTIZE_GREEN_BITS PNG_DITHER_GREEN_BITS #endif #ifdef PNG_DITHER_BLUE_BITS # define PNG_QUANTIZE_BLUE_BITS PNG_DITHER_BLUE_BITS #endif #ifndef PNG_QUANTIZE_RED_BITS # define PNG_QUANTIZE_RED_BITS 5 #endif #ifndef PNG_QUANTIZE_GREEN_BITS # define PNG_QUANTIZE_GREEN_BITS 5 #endif #ifndef PNG_QUANTIZE_BLUE_BITS # define PNG_QUANTIZE_BLUE_BITS 5 #endif /* This controls how fine the gamma correction becomes when you * are only interested in 8 bits anyway. Increasing this value * results in more memory being used, and more pow() functions * being called to fill in the gamma tables. Don't set this value * less then 8, and even that may not work (I haven't tested it). */ #ifndef PNG_MAX_GAMMA_8 # define PNG_MAX_GAMMA_8 11 #endif /* This controls how much a difference in gamma we can tolerate before * we actually start doing gamma conversion. */ #ifndef PNG_GAMMA_THRESHOLD # define PNG_GAMMA_THRESHOLD 0.05 #endif /* The following uses const char * instead of char * for error * and warning message functions, so some compilers won't complain. * If you do not want to use const, define PNG_NO_CONST. */ #ifndef PNG_CONST # ifndef PNG_NO_CONST # define PNG_CONST const # else # define PNG_CONST # endif #endif /* The following defines give you the ability to remove code from the * library that you will not be using. I wish I could figure out how to * automate this, but I can't do that without making it seriously hard * on the users. So if you are not using an ability, change the #define * to an #undef, or pass in PNG_NO_feature and that part of the library * will not be compiled. * If your linker can't find a function, you may want to make sure the * ability is defined here. Some of these depend upon some others being * defined. I haven't figured out all the interactions here, so you may * have to experiment awhile to get everything to compile. If you are * creating or using a shared library, you probably shouldn't touch this, * as it will affect the size of the structures, and this will cause bad * things to happen if the library and/or application ever change. */ /* Any features you will not be using can be undef'ed here */ /* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user * to turn it off with PNG_NO_READ|WRITE_TRANSFORMS on the compile line, * then pick and choose which ones to define without having to edit this * file. It is safe to use the PNG_NO_READ|WRITE_TRANSFORMS * if you only want to have a png-compliant reader/writer but don't need * any of the extra transformations. This saves about 80 kbytes in a * typical installation of the library. (PNG_NO_* form added in version * 1.0.1c, for consistency; PNG_*_TRANSFORMS_NOT_SUPPORTED deprecated in * 1.4.0) */ /* Ignore attempt to turn off both floating and fixed point support */ #if !defined(PNG_FLOATING_POINT_SUPPORTED) || \ !defined(PNG_NO_FIXED_POINT_SUPPORTED) # define PNG_FIXED_POINT_SUPPORTED #endif #ifdef PNG_READ_SUPPORTED /* PNG_READ_TRANSFORMS_NOT_SUPPORTED is deprecated. */ #if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \ !defined(PNG_NO_READ_TRANSFORMS) # define PNG_READ_TRANSFORMS_SUPPORTED #endif #ifdef PNG_READ_TRANSFORMS_SUPPORTED # ifndef PNG_NO_READ_EXPAND # define PNG_READ_EXPAND_SUPPORTED # endif # ifndef PNG_NO_READ_SHIFT # define PNG_READ_SHIFT_SUPPORTED # endif # ifndef PNG_NO_READ_PACK # define PNG_READ_PACK_SUPPORTED # endif # ifndef PNG_NO_READ_BGR # define PNG_READ_BGR_SUPPORTED # endif # ifndef PNG_NO_READ_SWAP # define PNG_READ_SWAP_SUPPORTED # endif # ifndef PNG_NO_READ_PACKSWAP # define PNG_READ_PACKSWAP_SUPPORTED # endif # ifndef PNG_NO_READ_INVERT # define PNG_READ_INVERT_SUPPORTED # endif # ifndef PNG_NO_READ_QUANTIZE /* Prior to libpng-1.4.0 this was PNG_READ_DITHER_SUPPORTED */ # ifndef PNG_NO_READ_DITHER /* This migration aid will be removed */ # define PNG_READ_QUANTIZE_SUPPORTED # endif # endif # ifndef PNG_NO_READ_BACKGROUND # define PNG_READ_BACKGROUND_SUPPORTED # endif # ifndef PNG_NO_READ_16_TO_8 # define PNG_READ_16_TO_8_SUPPORTED # endif # ifndef PNG_NO_READ_FILLER # define PNG_READ_FILLER_SUPPORTED # endif # ifndef PNG_NO_READ_GAMMA # define PNG_READ_GAMMA_SUPPORTED # endif # ifndef PNG_NO_READ_GRAY_TO_RGB # define PNG_READ_GRAY_TO_RGB_SUPPORTED # endif # ifndef PNG_NO_READ_SWAP_ALPHA # define PNG_READ_SWAP_ALPHA_SUPPORTED # endif # ifndef PNG_NO_READ_INVERT_ALPHA # define PNG_READ_INVERT_ALPHA_SUPPORTED # endif # ifndef PNG_NO_READ_STRIP_ALPHA # define PNG_READ_STRIP_ALPHA_SUPPORTED # endif # ifndef PNG_NO_READ_USER_TRANSFORM # define PNG_READ_USER_TRANSFORM_SUPPORTED # endif # ifndef PNG_NO_READ_RGB_TO_GRAY # define PNG_READ_RGB_TO_GRAY_SUPPORTED # endif #endif /* PNG_READ_TRANSFORMS_SUPPORTED */ /* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */ #if !defined(PNG_NO_PROGRESSIVE_READ) && \ !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */ # define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */ #endif /* about interlacing capability! You'll */ /* still have interlacing unless you change the following define: */ #define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */ /* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */ #if !defined(PNG_NO_SEQUENTIAL_READ) && \ !defined(PNG_SEQUENTIAL_READ_SUPPORTED) && \ !defined(PNG_NO_SEQUENTIAL_READ_SUPPORTED) # define PNG_SEQUENTIAL_READ_SUPPORTED #endif #ifndef PNG_NO_READ_COMPOSITE_NODIV # ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */ # define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */ # endif #endif #if !defined(PNG_NO_GET_INT_32) || defined(PNG_READ_oFFS_SUPPORTED) || \ defined(PNG_READ_pCAL_SUPPORTED) # ifndef PNG_GET_INT_32_SUPPORTED # define PNG_GET_INT_32_SUPPORTED # endif #endif #endif /* PNG_READ_SUPPORTED */ #ifdef PNG_WRITE_SUPPORTED /* PNG_WRITE_TRANSFORMS_NOT_SUPPORTED is deprecated. */ #if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \ !defined(PNG_NO_WRITE_TRANSFORMS) # define PNG_WRITE_TRANSFORMS_SUPPORTED #endif #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED # ifndef PNG_NO_WRITE_SHIFT # define PNG_WRITE_SHIFT_SUPPORTED # endif # ifndef PNG_NO_WRITE_PACK # define PNG_WRITE_PACK_SUPPORTED # endif # ifndef PNG_NO_WRITE_BGR # define PNG_WRITE_BGR_SUPPORTED # endif # ifndef PNG_NO_WRITE_SWAP # define PNG_WRITE_SWAP_SUPPORTED # endif # ifndef PNG_NO_WRITE_PACKSWAP # define PNG_WRITE_PACKSWAP_SUPPORTED # endif # ifndef PNG_NO_WRITE_INVERT # define PNG_WRITE_INVERT_SUPPORTED # endif # ifndef PNG_NO_WRITE_FILLER # define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */ # endif # ifndef PNG_NO_WRITE_SWAP_ALPHA # define PNG_WRITE_SWAP_ALPHA_SUPPORTED # endif # ifndef PNG_NO_WRITE_INVERT_ALPHA # define PNG_WRITE_INVERT_ALPHA_SUPPORTED # endif # ifndef PNG_NO_WRITE_USER_TRANSFORM # define PNG_WRITE_USER_TRANSFORM_SUPPORTED # endif #endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */ #if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \ !defined(PNG_WRITE_INTERLACING_SUPPORTED) /* This is not required for PNG-compliant encoders, but can cause * trouble if left undefined */ # define PNG_WRITE_INTERLACING_SUPPORTED #endif #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \ !defined(PNG_WRITE_WEIGHTED_FILTER) && \ defined(PNG_FLOATING_POINT_SUPPORTED) # define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED #endif #ifndef PNG_NO_WRITE_FLUSH # define PNG_WRITE_FLUSH_SUPPORTED #endif #if !defined(PNG_NO_SAVE_INT_32) || defined(PNG_WRITE_oFFS_SUPPORTED) || \ defined(PNG_WRITE_pCAL_SUPPORTED) # ifndef PNG_SAVE_INT_32_SUPPORTED # define PNG_SAVE_INT_32_SUPPORTED # endif #endif #endif /* PNG_WRITE_SUPPORTED */ #define PNG_NO_ERROR_NUMBERS #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) # ifndef PNG_NO_USER_TRANSFORM_PTR # define PNG_USER_TRANSFORM_PTR_SUPPORTED # endif #endif #if defined(PNG_STDIO_SUPPORTED) && !defined(PNG_TIME_RFC1123_SUPPORTED) # define PNG_TIME_RFC1123_SUPPORTED #endif /* This adds extra functions in pngget.c for accessing data from the * info pointer (added in version 0.99) * png_get_image_width() * png_get_image_height() * png_get_bit_depth() * png_get_color_type() * png_get_compression_type() * png_get_filter_type() * png_get_interlace_type() * png_get_pixel_aspect_ratio() * png_get_pixels_per_meter() * png_get_x_offset_pixels() * png_get_y_offset_pixels() * png_get_x_offset_microns() * png_get_y_offset_microns() */ #if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED) # define PNG_EASY_ACCESS_SUPPORTED #endif /* Added at libpng-1.2.0 */ #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED) # define PNG_USER_MEM_SUPPORTED #endif /* Added at libpng-1.2.6 */ #ifndef PNG_NO_SET_USER_LIMITS # ifndef PNG_SET_USER_LIMITS_SUPPORTED # define PNG_SET_USER_LIMITS_SUPPORTED # endif /* Feature added at libpng-1.4.0, this flag added at 1.4.1 */ # ifndef PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED # define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED # endif /* Feature added at libpng-1.4.1, this flag added at 1.4.1 */ # ifndef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED # define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED # endif #endif /* Added at libpng-1.2.43 */ #ifndef PNG_USER_LIMITS_SUPPORTED # ifndef PNG_NO_USER_LIMITS # define PNG_USER_LIMITS_SUPPORTED # endif #endif /* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGs no matter * how large, set these two limits to 0x7fffffffL */ #ifndef PNG_USER_WIDTH_MAX # define PNG_USER_WIDTH_MAX 1000000L #endif #ifndef PNG_USER_HEIGHT_MAX # define PNG_USER_HEIGHT_MAX 1000000L #endif /* Added at libpng-1.2.43. To accept all valid PNGs no matter * how large, set these two limits to 0. */ #ifndef PNG_USER_CHUNK_CACHE_MAX # define PNG_USER_CHUNK_CACHE_MAX 0 #endif /* Added at libpng-1.2.43 */ #ifndef PNG_USER_CHUNK_MALLOC_MAX # define PNG_USER_CHUNK_MALLOC_MAX 0 #endif /* Added at libpng-1.4.0 */ #if !defined(PNG_NO_IO_STATE) && !defined(PNG_IO_STATE_SUPPORTED) # define PNG_IO_STATE_SUPPORTED #endif #ifndef PNG_LITERAL_SHARP # define PNG_LITERAL_SHARP 0x23 #endif #ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET # define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b #endif #ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET # define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d #endif #ifndef PNG_STRING_NEWLINE #define PNG_STRING_NEWLINE "\n" #endif /* These are currently experimental features, define them if you want */ /* Very little testing */ /* #ifdef PNG_READ_SUPPORTED # ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED # define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED # endif #endif */ /* This is only for PowerPC big-endian and 680x0 systems */ /* some testing */ /* #ifndef PNG_READ_BIG_ENDIAN_SUPPORTED # define PNG_READ_BIG_ENDIAN_SUPPORTED #endif */ #if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS) # define PNG_USE_READ_MACROS #endif /* Buggy compilers (e.g., gcc 2.7.2.2) need PNG_NO_POINTER_INDEXING */ #if !defined(PNG_NO_POINTER_INDEXING) && \ !defined(PNG_POINTER_INDEXING_SUPPORTED) # define PNG_POINTER_INDEXING_SUPPORTED #endif /* Any chunks you are not interested in, you can undef here. The * ones that allocate memory may be expecially important (hIST, * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info * a bit smaller. */ /* The size of the png_text structure changed in libpng-1.0.6 when * iTXt support was added. iTXt support was turned off by default through * libpng-1.2.x, to support old apps that malloc the png_text structure * instead of calling png_set_text() and letting libpng malloc it. It * was turned on by default in libpng-1.4.0. */ /* PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated. */ #if defined(PNG_READ_SUPPORTED) && \ !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \ !defined(PNG_NO_READ_ANCILLARY_CHUNKS) # define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED #endif /* PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated. */ #if defined(PNG_WRITE_SUPPORTED) && \ !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \ !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS) # define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED #endif #ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED #ifdef PNG_NO_READ_TEXT # define PNG_NO_READ_iTXt # define PNG_NO_READ_tEXt # define PNG_NO_READ_zTXt #endif #ifndef PNG_NO_READ_bKGD # define PNG_READ_bKGD_SUPPORTED # define PNG_bKGD_SUPPORTED #endif #ifndef PNG_NO_READ_cHRM # define PNG_READ_cHRM_SUPPORTED # define PNG_cHRM_SUPPORTED #endif #ifndef PNG_NO_READ_gAMA # define PNG_READ_gAMA_SUPPORTED # define PNG_gAMA_SUPPORTED #endif #ifndef PNG_NO_READ_hIST # define PNG_READ_hIST_SUPPORTED # define PNG_hIST_SUPPORTED #endif #ifndef PNG_NO_READ_iCCP # define PNG_READ_iCCP_SUPPORTED # define PNG_iCCP_SUPPORTED #endif #ifndef PNG_NO_READ_iTXt # ifndef PNG_READ_iTXt_SUPPORTED # define PNG_READ_iTXt_SUPPORTED # endif # ifndef PNG_iTXt_SUPPORTED # define PNG_iTXt_SUPPORTED # endif #endif #ifndef PNG_NO_READ_oFFs # define PNG_READ_oFFs_SUPPORTED # define PNG_oFFs_SUPPORTED #endif #ifndef PNG_NO_READ_pCAL # define PNG_READ_pCAL_SUPPORTED # define PNG_pCAL_SUPPORTED #endif #ifndef PNG_NO_READ_sCAL # define PNG_READ_sCAL_SUPPORTED # define PNG_sCAL_SUPPORTED #endif #ifndef PNG_NO_READ_pHYs # define PNG_READ_pHYs_SUPPORTED # define PNG_pHYs_SUPPORTED #endif #ifndef PNG_NO_READ_sBIT # define PNG_READ_sBIT_SUPPORTED # define PNG_sBIT_SUPPORTED #endif #ifndef PNG_NO_READ_sPLT # define PNG_READ_sPLT_SUPPORTED # define PNG_sPLT_SUPPORTED #endif #ifndef PNG_NO_READ_sRGB # define PNG_READ_sRGB_SUPPORTED # define PNG_sRGB_SUPPORTED #endif #ifndef PNG_NO_READ_tEXt # define PNG_READ_tEXt_SUPPORTED # define PNG_tEXt_SUPPORTED #endif #ifndef PNG_NO_READ_tIME # define PNG_READ_tIME_SUPPORTED # define PNG_tIME_SUPPORTED #endif #ifndef PNG_NO_READ_tRNS # define PNG_READ_tRNS_SUPPORTED # define PNG_tRNS_SUPPORTED #endif #ifndef PNG_NO_READ_APNG # define PNG_READ_APNG_SUPPORTED # define PNG_APNG_SUPPORTED #endif #ifndef PNG_NO_READ_zTXt # define PNG_READ_zTXt_SUPPORTED # define PNG_zTXt_SUPPORTED #endif #ifndef PNG_NO_READ_OPT_PLTE # define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */ #endif /* optional PLTE chunk in RGB and RGBA images */ #if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \ defined(PNG_READ_zTXt_SUPPORTED) # define PNG_READ_TEXT_SUPPORTED # define PNG_TEXT_SUPPORTED #endif #endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */ #ifndef PNG_NO_READ_UNKNOWN_CHUNKS # ifndef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED # define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED # endif # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED # define PNG_UNKNOWN_CHUNKS_SUPPORTED # endif # ifndef PNG_READ_USER_CHUNKS_SUPPORTED # define PNG_READ_USER_CHUNKS_SUPPORTED # endif #endif #ifndef PNG_NO_READ_USER_CHUNKS # ifndef PNG_READ_USER_CHUNKS_SUPPORTED # define PNG_READ_USER_CHUNKS_SUPPORTED # endif # ifndef PNG_USER_CHUNKS_SUPPORTED # define PNG_USER_CHUNKS_SUPPORTED # endif #endif #ifndef PNG_NO_HANDLE_AS_UNKNOWN # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED # endif #endif #ifdef PNG_WRITE_SUPPORTED #ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED #ifdef PNG_NO_WRITE_TEXT # define PNG_NO_WRITE_iTXt # define PNG_NO_WRITE_tEXt # define PNG_NO_WRITE_zTXt #endif #ifndef PNG_NO_WRITE_bKGD # define PNG_WRITE_bKGD_SUPPORTED # ifndef PNG_bKGD_SUPPORTED # define PNG_bKGD_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_cHRM # define PNG_WRITE_cHRM_SUPPORTED # ifndef PNG_cHRM_SUPPORTED # define PNG_cHRM_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_gAMA # define PNG_WRITE_gAMA_SUPPORTED # ifndef PNG_gAMA_SUPPORTED # define PNG_gAMA_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_hIST # define PNG_WRITE_hIST_SUPPORTED # ifndef PNG_hIST_SUPPORTED # define PNG_hIST_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_iCCP # define PNG_WRITE_iCCP_SUPPORTED # ifndef PNG_iCCP_SUPPORTED # define PNG_iCCP_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_iTXt # ifndef PNG_WRITE_iTXt_SUPPORTED # define PNG_WRITE_iTXt_SUPPORTED # endif # ifndef PNG_iTXt_SUPPORTED # define PNG_iTXt_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_oFFs # define PNG_WRITE_oFFs_SUPPORTED # ifndef PNG_oFFs_SUPPORTED # define PNG_oFFs_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_pCAL # define PNG_WRITE_pCAL_SUPPORTED # ifndef PNG_pCAL_SUPPORTED # define PNG_pCAL_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_sCAL # define PNG_WRITE_sCAL_SUPPORTED # ifndef PNG_sCAL_SUPPORTED # define PNG_sCAL_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_pHYs # define PNG_WRITE_pHYs_SUPPORTED # ifndef PNG_pHYs_SUPPORTED # define PNG_pHYs_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_sBIT # define PNG_WRITE_sBIT_SUPPORTED # ifndef PNG_sBIT_SUPPORTED # define PNG_sBIT_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_sPLT # define PNG_WRITE_sPLT_SUPPORTED # ifndef PNG_sPLT_SUPPORTED # define PNG_sPLT_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_sRGB # define PNG_WRITE_sRGB_SUPPORTED # ifndef PNG_sRGB_SUPPORTED # define PNG_sRGB_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_tEXt # define PNG_WRITE_tEXt_SUPPORTED # ifndef PNG_tEXt_SUPPORTED # define PNG_tEXt_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_tIME # define PNG_WRITE_tIME_SUPPORTED # ifndef PNG_tIME_SUPPORTED # define PNG_tIME_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_tRNS # define PNG_WRITE_tRNS_SUPPORTED # ifndef PNG_tRNS_SUPPORTED # define PNG_tRNS_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_zTXt # define PNG_WRITE_zTXt_SUPPORTED # ifndef PNG_zTXt_SUPPORTED # define PNG_zTXt_SUPPORTED # endif #endif #if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \ defined(PNG_WRITE_zTXt_SUPPORTED) # define PNG_WRITE_TEXT_SUPPORTED # ifndef PNG_TEXT_SUPPORTED # define PNG_TEXT_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_APNG # ifndef PNG_WRITE_APNG_SUPPORTED # define PNG_WRITE_APNG_SUPPORTED # endif # ifndef PNG_APNG_SUPPORTED # define PNG_APNG_SUPPORTED # endif #endif #ifdef PNG_WRITE_tIME_SUPPORTED # ifndef PNG_NO_CONVERT_tIME # ifndef _WIN32_WCE /* The "tm" structure is not supported on WindowsCE */ # ifndef PNG_CONVERT_tIME_SUPPORTED # define PNG_CONVERT_tIME_SUPPORTED # endif # endif # endif #endif #endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */ #ifndef PNG_NO_WRITE_FILTER # ifndef PNG_WRITE_FILTER_SUPPORTED # define PNG_WRITE_FILTER_SUPPORTED # endif #endif #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS # define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED # define PNG_UNKNOWN_CHUNKS_SUPPORTED # endif #endif #ifndef PNG_NO_HANDLE_AS_UNKNOWN # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED # endif #endif #endif /* PNG_WRITE_SUPPORTED */ /* Turn this off to disable png_read_png() and * png_write_png() and leave the row_pointers member * out of the info structure. */ #ifndef PNG_NO_INFO_IMAGE # define PNG_INFO_IMAGE_SUPPORTED #endif /* Need the time information for converting tIME chunks */ #ifdef PNG_CONVERT_tIME_SUPPORTED /* "time.h" functions are not supported on WindowsCE */ # include #endif /* Some typedefs to get us started. These should be safe on most of the * common platforms. The typedefs should be at least as large as the * numbers suggest (a png_uint_32 must be at least 32 bits long), but they * don't have to be exactly that size. Some compilers dislike passing * unsigned shorts as function parameters, so you may be better off using * unsigned int for png_uint_16. */ #if defined(INT_MAX) && (INT_MAX > 0x7ffffffeL) typedef unsigned int png_uint_32; typedef int png_int_32; #else typedef unsigned long png_uint_32; typedef long png_int_32; #endif typedef unsigned short png_uint_16; typedef short png_int_16; typedef unsigned char png_byte; #ifdef PNG_NO_SIZE_T typedef unsigned int png_size_t; #else typedef size_t png_size_t; #endif #define png_sizeof(x) (sizeof (x)) /* The following is needed for medium model support. It cannot be in the * pngpriv.h header. Needs modification for other compilers besides * MSC. Model independent support declares all arrays and pointers to be * large using the far keyword. The zlib version used must also support * model independent data. As of version zlib 1.0.4, the necessary changes * have been made in zlib. The USE_FAR_KEYWORD define triggers other * changes that are needed. (Tim Wegner) */ /* Separate compiler dependencies (problem here is that zlib.h always * defines FAR. (SJT) */ #ifdef __BORLANDC__ # if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__) # define LDATA 1 # else # define LDATA 0 # endif /* GRR: why is Cygwin in here? Cygwin is not Borland C... */ # if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__) # define PNG_MAX_MALLOC_64K # if (LDATA != 1) # ifndef FAR # define FAR __far # endif # define USE_FAR_KEYWORD # endif /* LDATA != 1 */ /* Possibly useful for moving data out of default segment. * Uncomment it if you want. Could also define FARDATA as * const if your compiler supports it. (SJT) # define FARDATA FAR */ # endif /* __WIN32__, __FLAT__, __CYGWIN__ */ #endif /* __BORLANDC__ */ /* Suggest testing for specific compiler first before testing for * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM, * making reliance oncertain keywords suspect. (SJT) */ /* MSC Medium model */ #ifdef FAR # ifdef M_I86MM # define USE_FAR_KEYWORD # define FARDATA FAR # include # endif #endif /* SJT: default case */ #ifndef FAR # define FAR #endif /* At this point FAR is always defined */ #ifndef FARDATA # define FARDATA #endif /* Typedef for floating-point numbers that are converted to fixed-point with a multiple of 100,000, e.g., int_gamma */ typedef png_int_32 png_fixed_point; /* Add typedefs for pointers */ typedef void FAR * png_voidp; typedef png_byte FAR * png_bytep; typedef png_uint_32 FAR * png_uint_32p; typedef png_int_32 FAR * png_int_32p; typedef png_uint_16 FAR * png_uint_16p; typedef png_int_16 FAR * png_int_16p; typedef PNG_CONST char FAR * png_const_charp; typedef char FAR * png_charp; typedef png_fixed_point FAR * png_fixed_point_p; #ifndef PNG_NO_STDIO typedef FILE * png_FILE_p; #endif #ifdef PNG_FLOATING_POINT_SUPPORTED typedef double FAR * png_doublep; #endif /* Pointers to pointers; i.e. arrays */ typedef png_byte FAR * FAR * png_bytepp; typedef png_uint_32 FAR * FAR * png_uint_32pp; typedef png_int_32 FAR * FAR * png_int_32pp; typedef png_uint_16 FAR * FAR * png_uint_16pp; typedef png_int_16 FAR * FAR * png_int_16pp; typedef PNG_CONST char FAR * FAR * png_const_charpp; typedef char FAR * FAR * png_charpp; typedef png_fixed_point FAR * FAR * png_fixed_point_pp; #ifdef PNG_FLOATING_POINT_SUPPORTED typedef double FAR * FAR * png_doublepp; #endif /* Pointers to pointers to pointers; i.e., pointer to array */ typedef char FAR * FAR * FAR * png_charppp; /* Define PNG_BUILD_DLL if the module being built is a Windows * LIBPNG DLL. * * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL. * It is equivalent to Microsoft predefined macro _DLL that is * automatically defined when you compile using the share * version of the CRT (C Run-Time library) * * The cygwin mods make this behavior a little different: * Define PNG_BUILD_DLL if you are building a dll for use with cygwin * Define PNG_STATIC if you are building a static library for use with cygwin, * -or- if you are building an application that you want to link to the * static library. * PNG_USE_DLL is defined by default (no user action needed) unless one of * the other flags is defined. */ #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL)) # define PNG_DLL #endif /* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall", * you may get warnings regarding the linkage of png_zalloc and png_zfree. * Don't ignore those warnings; you must also reset the default calling * convention in your compiler to match your PNGAPI, and you must build * zlib and your applications the same way you build libpng. */ #ifdef __CYGWIN__ # undef PNGAPI # define PNGAPI __cdecl # undef PNG_IMPEXP # define PNG_IMPEXP #endif #ifdef __WATCOMC__ # ifndef PNGAPI # define PNGAPI # endif #endif #if defined(__MINGW32__) && !defined(PNG_MODULEDEF) # ifndef PNG_NO_MODULEDEF # define PNG_NO_MODULEDEF # endif #endif #if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF) # define PNG_IMPEXP #endif #if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \ (( defined(_Windows) || defined(_WINDOWS) || \ defined(WIN32) || defined(_WIN32) || defined(__WIN32__) )) # ifndef PNGAPI # if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800)) # define PNGAPI __cdecl # else # define PNGAPI _cdecl # endif # endif # if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \ 0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */) # define PNG_IMPEXP # endif # ifndef PNG_IMPEXP # define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol # define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol /* Borland/Microsoft */ # if defined(_MSC_VER) || defined(__BORLANDC__) # if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500) # define PNG_EXPORT PNG_EXPORT_TYPE1 # else # define PNG_EXPORT PNG_EXPORT_TYPE2 # ifdef PNG_BUILD_DLL # define PNG_IMPEXP __export # else # define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in VC++ */ # endif /* Exists in Borland C++ for C++ classes (== huge) */ # endif # endif # ifndef PNG_IMPEXP # ifdef PNG_BUILD_DLL # define PNG_IMPEXP __declspec(dllexport) # else # define PNG_IMPEXP __declspec(dllimport) # endif # endif # endif /* PNG_IMPEXP */ #else /* !(DLL || non-cygwin WINDOWS) */ # if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) # ifndef PNGAPI # define PNGAPI _System # endif # else # if 0 /* ... other platforms, with other meanings */ # endif # endif #endif #ifndef PNGAPI # define PNGAPI #endif #ifndef PNG_IMPEXP # define PNG_IMPEXP #endif #ifdef PNG_BUILDSYMS # ifndef PNG_EXPORT # define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END # endif #endif #ifndef PNG_EXPORT # define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol #endif #define PNG_USE_LOCAL_ARRAYS /* Not used in libpng, defined for legacy apps */ /* Support for compiler specific function attributes. These are used * so that where compiler support is available incorrect use of API * functions in png.h will generate compiler warnings. * * Added at libpng-1.2.41. */ #ifndef PNG_NO_PEDANTIC_WARNINGS # ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED # define PNG_PEDANTIC_WARNINGS_SUPPORTED # endif #endif #ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED /* Support for compiler specific function attributes. These are used * so that where compiler support is available incorrect use of API * functions in png.h will generate compiler warnings. Added at libpng * version 1.2.41. */ # ifdef __GNUC__ # ifndef PNG_USE_RESULT # define PNG_USE_RESULT __attribute__((__warn_unused_result__)) # endif # ifndef PNG_NORETURN # define PNG_NORETURN __attribute__((__noreturn__)) # endif # ifndef PNG_ALLOCATED # define PNG_ALLOCATED __attribute__((__malloc__)) # endif /* This specifically protects structure members that should only be * accessed from within the library, therefore should be empty during * a library build. */ # ifndef PNG_DEPRECATED # define PNG_DEPRECATED __attribute__((__deprecated__)) # endif # ifndef PNG_DEPSTRUCT # define PNG_DEPSTRUCT __attribute__((__deprecated__)) # endif # ifndef PNG_PRIVATE # if 0 /* Doesn't work so we use deprecated instead*/ # define PNG_PRIVATE \ __attribute__((warning("This function is not exported by libpng."))) # else # define PNG_PRIVATE \ __attribute__((__deprecated__)) # endif # endif /* PNG_PRIVATE */ # endif /* __GNUC__ */ #endif /* PNG_PEDANTIC_WARNINGS */ #ifndef PNG_DEPRECATED # define PNG_DEPRECATED /* Use of this function is deprecated */ #endif #ifndef PNG_USE_RESULT # define PNG_USE_RESULT /* The result of this function must be checked */ #endif #ifndef PNG_NORETURN # define PNG_NORETURN /* This function does not return */ #endif #ifndef PNG_ALLOCATED # define PNG_ALLOCATED /* The result of the function is new memory */ #endif #ifndef PNG_DEPSTRUCT # define PNG_DEPSTRUCT /* Access to this struct member is deprecated */ #endif #ifndef PNG_PRIVATE # define PNG_PRIVATE /* This is a private libpng function */ #endif /* Users may want to use these so they are not private. Any library * functions that are passed far data must be model-independent. */ /* memory model/platform independent fns */ #ifndef PNG_ABORT # if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) # define PNG_ABORT() ExitProcess(0) # else # define PNG_ABORT() abort() # endif #endif #ifdef USE_FAR_KEYWORD /* Use this to make far-to-near assignments */ # define CHECK 1 # define NOCHECK 0 # define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) # define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) # define png_strcpy _fstrcpy # define png_strncpy _fstrncpy /* Added to v 1.2.6 */ # define png_strlen _fstrlen # define png_memcmp _fmemcmp /* SJT: added */ # define png_memcpy _fmemcpy # define png_memset _fmemset # define png_sprintf sprintf #else # if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) # /* Favor Windows over C runtime fns */ # define CVT_PTR(ptr) (ptr) # define CVT_PTR_NOCHECK(ptr) (ptr) # define png_strcpy lstrcpyA # define png_strncpy lstrcpynA # define png_strlen lstrlenA # define png_memcmp memcmp # define png_memcpy CopyMemory # define png_memset memset # define png_sprintf wsprintfA # else # define CVT_PTR(ptr) (ptr) # define CVT_PTR_NOCHECK(ptr) (ptr) # define png_strcpy strcpy # define png_strncpy strncpy /* Added to v 1.2.6 */ # define png_strlen strlen # define png_memcmp memcmp /* SJT: added */ # define png_memcpy memcpy # define png_memset memset # define png_sprintf sprintf # endif #endif #ifndef PNG_NO_SNPRINTF # ifdef _MSC_VER # define png_snprintf _snprintf /* Added to v 1.2.19 */ # define png_snprintf2 _snprintf # define png_snprintf6 _snprintf # else # define png_snprintf snprintf /* Added to v 1.2.19 */ # define png_snprintf2 snprintf # define png_snprintf6 snprintf # endif #else /* You don't have or don't want to use snprintf(). Caution: Using * sprintf instead of snprintf exposes your application to accidental * or malevolent buffer overflows. If you don't have snprintf() * as a general rule you should provide one (you can get one from * Portable OpenSSH). */ # define png_snprintf(s1,n,fmt,x1) png_sprintf(s1,fmt,x1) # define png_snprintf2(s1,n,fmt,x1,x2) png_sprintf(s1,fmt,x1,x2) # define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \ png_sprintf(s1,fmt,x1,x2,x3,x4,x5,x6) #endif /* png_alloc_size_t is guaranteed to be no smaller than png_size_t, * and no smaller than png_uint_32. Casts from png_size_t or png_uint_32 * to png_alloc_size_t are not necessary; in fact, it is recommended * not to use them at all so that the compiler can complain when something * turns out to be problematic. * Casts in the other direction (from png_alloc_size_t to png_size_t or * png_uint_32) should be explicitly applied; however, we do not expect * to encounter practical situations that require such conversions. */ #if defined(__TURBOC__) && !defined(__FLAT__) typedef unsigned long png_alloc_size_t; #else # if defined(_MSC_VER) && defined(MAXSEG_64K) typedef unsigned long png_alloc_size_t; # else /* This is an attempt to detect an old Windows system where (int) is * actually 16 bits, in that case png_malloc must have an argument with a * bigger size to accomodate the requirements of the library. */ # if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) && \ (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL) typedef DWORD png_alloc_size_t; # else typedef png_size_t png_alloc_size_t; # endif # endif #endif /* End of memory model/platform independent support */ /* Just a little check that someone hasn't tried to define something * contradictory. */ #if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K) # undef PNG_ZBUF_SIZE # define PNG_ZBUF_SIZE 65536L #endif /* Added at libpng-1.2.8 */ #endif /* PNG_VERSION_INFO_ONLY */ #endif /* PNGCONF_H */ { \ int num_tabs=l; \ char format[256]; \ snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ m,PNG_STRING_NEWLINE); \ fprintf(PNG_DEBUG_FILE,format,p1,p2); \ } # endif # endif /* __STDC __ */ #endif /* (PNG_DEBUG > 1) */ #endif /* _MSC_VER */ #endif /* (PNG_DEBUG > 0) */ #endif /* PNG_DEBUG */ #ifndef png_debug #define png_debug(l, m) #endif #ifndef png_debug1 #define png_debug1(l, m, p1) #endif #ifndef png_debug2 #define png_debug2(l, m, p1, p2) #endif /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ #ifdef __cplusplus } #endif #endif /* PNG_VERSION_INFO_ONLY */ #endif /* PNGPRIV_H */ / #define libintl_set_relocation_prefix libintl_set_relocation_prefix extern void libintl_set_relocation_prefix (const char *orig_prefix, const char *curr_prefix); #ifdef __cplusplus } #endif #endif /* libintl.h */ /* Automatically generated by gen_art_config */ #define ART_SIZEOF_CHAR 1 #define ART_SIZEOF_SHORT 2 #define ART_SIZEOF_INT 4 #define ART_SIZEOF_LONG 4 typedef unsigned char art_u8; typedef unsigned short art_u16; typedef unsigned int art_u32;  (08@HP/* Determine a canonical name for the current locale's character encoding. Copyright (C) 2000-2003 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LOCALCHARSET_H #define _LOCALCHARSET_H #ifdef __cplusplus extern "C" { #endif /* Determine the current locale's character encoding, and canonicalize it into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ extern const char * locale_charset (void); #ifdef __cplusplus } #endif #endif /* _LOCALCHARSET_H */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_ALPHAGAMMA_H__ #define __ART_ALPHAGAMMA_H__ /* Alphagamma tables */ #ifdef LIBART_COMPILATION #include "art_misc.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _ArtAlphaGamma ArtAlphaGamma; struct _ArtAlphaGamma { /*< private >*/ double gamma; int invtable_size; int table[256]; art_u8 invtable[1]; }; ArtAlphaGamma * art_alphagamma_new (double gamma); void art_alphagamma_free (ArtAlphaGamma *alphagamma); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_SVP_H__ */ r, art_u32 clear_rgb); void art_render_mask_solid (ArtRender *render, int opacity); void art_render_image_solid (ArtRender *render, ArtPixMaxDepth *color); /* The next two functions are for custom mask sources only. */ void art_render_add_mask_source (ArtRender *render, ArtMaskSource *mask_source); void art_render_invoke_callbacks (ArtRender *render, art_u8 *dest, int y); /* The following function is for custom image sources only. */ void art_render_add_image_source (ArtRender *render, ArtImageSource *image_source); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_RENDER_H__ */ /* png.h - header file for PNG reference library * * libpng version 1.4.5 - December 9, 2010 * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * * This code is released under the libpng license (See LICENSE, below) * * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger * libpng versions 0.97, January 1998, through 1.4.5 - December 9, 2010: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: * * Due to various miscommunications, unforeseen code incompatibilities * and occasional factors outside the authors' control, version numbering * on the library has not always been consistent and straightforward. * The following table summarizes matters since version 0.89c, which was * the first widely used release: * * source png.h png.h shared-lib * version string int version * ------- ------ ----- ---------- * 0.89c "1.0 beta 3" 0.89 89 1.0.89 * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] * 0.97c 0.97 97 2.0.97 * 0.98 0.98 98 2.0.98 * 0.99 0.99 98 2.0.99 * 0.99a-m 0.99 99 2.0.99 * 1.00 1.00 100 2.1.0 [100 should be 10000] * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] * 1.0.1 png.h string is 10001 2.1.0 * 1.0.1a-e identical to the 10002 from here on, the shared library * 1.0.2 source version) 10002 is 2.V where V is the source code * 1.0.2a-b 10003 version, except as noted. * 1.0.3 10003 * 1.0.3a-d 10004 * 1.0.4 10004 * 1.0.4a-f 10005 * 1.0.5 (+ 2 patches) 10005 * 1.0.5a-d 10006 * 1.0.5e-r 10100 (not source compatible) * 1.0.5s-v 10006 (not binary compatible) * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) * 1.0.6d-f 10007 (still binary incompatible) * 1.0.6g 10007 * 1.0.6h 10007 10.6h (testing xy.z so-numbering) * 1.0.6i 10007 10.6i * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) * 1.0.7 1 10007 (still compatible) * 1.0.8beta1-4 1 10008 2.1.0.8beta1-4 * 1.0.8rc1 1 10008 2.1.0.8rc1 * 1.0.8 1 10008 2.1.0.8 * 1.0.9beta1-6 1 10009 2.1.0.9beta1-6 * 1.0.9rc1 1 10009 2.1.0.9rc1 * 1.0.9beta7-10 1 10009 2.1.0.9beta7-10 * 1.0.9rc2 1 10009 2.1.0.9rc2 * 1.0.9 1 10009 2.1.0.9 * 1.0.10beta1 1 10010 2.1.0.10beta1 * 1.0.10rc1 1 10010 2.1.0.10rc1 * 1.0.10 1 10010 2.1.0.10 * 1.0.11beta1-3 1 10011 2.1.0.11beta1-3 * 1.0.11rc1 1 10011 2.1.0.11rc1 * 1.0.11 1 10011 2.1.0.11 * 1.0.12beta1-2 2 10012 2.1.0.12beta1-2 * 1.0.12rc1 2 10012 2.1.0.12rc1 * 1.0.12 2 10012 2.1.0.12 * 1.1.0a-f - 10100 2.1.1.0a-f (branch abandoned) * 1.2.0beta1-2 2 10200 2.1.2.0beta1-2 * 1.2.0beta3-5 3 10200 3.1.2.0beta3-5 * 1.2.0rc1 3 10200 3.1.2.0rc1 * 1.2.0 3 10200 3.1.2.0 * 1.2.1beta1-4 3 10201 3.1.2.1beta1-4 * 1.2.1rc1-2 3 10201 3.1.2.1rc1-2 * 1.2.1 3 10201 3.1.2.1 * 1.2.2beta1-6 12 10202 12.so.0.1.2.2beta1-6 * 1.0.13beta1 10 10013 10.so.0.1.0.13beta1 * 1.0.13rc1 10 10013 10.so.0.1.0.13rc1 * 1.2.2rc1 12 10202 12.so.0.1.2.2rc1 * 1.0.13 10 10013 10.so.0.1.0.13 * 1.2.2 12 10202 12.so.0.1.2.2 * 1.2.3rc1-6 12 10203 12.so.0.1.2.3rc1-6 * 1.2.3 12 10203 12.so.0.1.2.3 * 1.2.4beta1-3 13 10204 12.so.0.1.2.4beta1-3 * 1.0.14rc1 13 10014 10.so.0.1.0.14rc1 * 1.2.4rc1 13 10204 12.so.0.1.2.4rc1 * 1.0.14 10 10014 10.so.0.1.0.14 * 1.2.4 13 10204 12.so.0.1.2.4 * 1.2.5beta1-2 13 10205 12.so.0.1.2.5beta1-2 * 1.0.15rc1-3 10 10015 10.so.0.1.0.15rc1-3 * 1.2.5rc1-3 13 10205 12.so.0.1.2.5rc1-3 * 1.0.15 10 10015 10.so.0.1.0.15 * 1.2.5 13 10205 12.so.0.1.2.5 * 1.2.6beta1-4 13 10206 12.so.0.1.2.6beta1-4 * 1.0.16 10 10016 10.so.0.1.0.16 * 1.2.6 13 10206 12.so.0.1.2.6 * 1.2.7beta1-2 13 10207 12.so.0.1.2.7beta1-2 * 1.0.17rc1 10 10017 12.so.0.1.0.17rc1 * 1.2.7rc1 13 10207 12.so.0.1.2.7rc1 * 1.0.17 10 10017 12.so.0.1.0.17 * 1.2.7 13 10207 12.so.0.1.2.7 * 1.2.8beta1-5 13 10208 12.so.0.1.2.8beta1-5 * 1.0.18rc1-5 10 10018 12.so.0.1.0.18rc1-5 * 1.2.8rc1-5 13 10208 12.so.0.1.2.8rc1-5 * 1.0.18 10 10018 12.so.0.1.0.18 * 1.2.8 13 10208 12.so.0.1.2.8 * 1.2.9beta1-3 13 10209 12.so.0.1.2.9beta1-3 * 1.2.9beta4-11 13 10209 12.so.0.9[.0] * 1.2.9rc1 13 10209 12.so.0.9[.0] * 1.2.9 13 10209 12.so.0.9[.0] * 1.2.10beta1-7 13 10210 12.so.0.10[.0] * 1.2.10rc1-2 13 10210 12.so.0.10[.0] * 1.2.10 13 10210 12.so.0.10[.0] * 1.4.0beta1-5 14 10400 14.so.0.0[.0] * 1.2.11beta1-4 13 10211 12.so.0.11[.0] * 1.4.0beta7-8 14 10400 14.so.0.0[.0] * 1.2.11 13 10211 12.so.0.11[.0] * 1.2.12 13 10212 12.so.0.12[.0] * 1.4.0beta9-14 14 10400 14.so.0.0[.0] * 1.2.13 13 10213 12.so.0.13[.0] * 1.4.0beta15-36 14 10400 14.so.0.0[.0] * 1.4.0beta37-87 14 10400 14.so.14.0[.0] * 1.4.0rc01 14 10400 14.so.14.0[.0] * 1.4.0beta88-109 14 10400 14.so.14.0[.0] * 1.4.0rc02-08 14 10400 14.so.14.0[.0] * 1.4.0 14 10400 14.so.14.0[.0] * 1.4.1beta01-03 14 10401 14.so.14.1[.0] * 1.4.1rc01 14 10401 14.so.14.1[.0] * 1.4.1beta04-12 14 10401 14.so.14.1[.0] * 1.4.1rc02-04 14 10401 14.so.14.1[.0] * 1.4.1 14 10401 14.so.14.1[.0] * 1.4.2beta01 14 10402 14.so.14.2[.0] * 1.4.2rc02-06 14 10402 14.so.14.2[.0] * 1.4.2 14 10402 14.so.14.2[.0] * 1.4.3beta01-05 14 10403 14.so.14.3[.0] * 1.4.3rc01-03 14 10403 14.so.14.3[.0] * 1.4.3 14 10403 14.so.14.3[.0] * 1.4.4beta01-08 14 10404 14.so.14.4[.0] * 1.4.4rc01-05 14 10404 14.so.14.4[.0] * 1.4.4 14 10404 14.so.14.4[.0] * 1.4.5beta01-04 14 10405 14.so.14.5[.0] * 1.4.5rc01 14 10405 14.so.14.5[.0] * 1.4.5beta05-07 14 10405 14.so.14.5[.0] * 1.4.5rc02-03 14 10405 14.so.14.5[.0] * 1.4.5 14 10405 14.so.14.5[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be * used for changes in backward compatibility, as it is intended. The * PNG_LIBPNG_VER macro, which is not used within libpng but is available * for applications, is an unsigned integer of the form xyyzz corresponding * to the source version x.y.z (leading zeros in y and z). Beta versions * were given the previous public release number plus a letter, until * version 1.0.6j; from then on they were given the upcoming public * release number plus "betaNN" or "rcN". * * Binary incompatibility exists only when applications make direct access * to the info_ptr or png_ptr members through png.h, and the compiled * application is loaded with a different version of the library. * * DLLNUM will change each time there are forward or backward changes * in binary compatibility (e.g., when a new feature is added). * * See libpng.txt or libpng.3 for more information. The PNG specification * is available as a W3C Recommendation and as an ISO Specification, * defines should NOT be changed. */ #define PNG_INFO_gAMA 0x0001 #define PNG_INFO_sBIT 0x0002 #define PNG_INFO_cHRM 0x0004 #define PNG_INFO_PLTE 0x0008 #define PNG_INFO_tRNS 0x0010 #define PNG_INFO_bKGD 0x0020 #define PNG_INFO_hIST 0x0040 #define PNG_INFO_pHYs 0x0080 #define PNG_INFO_oFFs 0x0100 #define PNG_INFO_tIME 0x0200 #define PNG_INFO_pCAL 0x0400 #define PNG_INFO_sRGB 0x0800 /* GR-P, 0.96a */ #define PNG_INFO_iCCP 0x1000 /* ESR, 1.0.6 */ #define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */ #define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */ #define PNG_INFO_IDAT 0x8000L /* ESR, 1.0.6 */ #ifdef PNG_APNG_SUPPORTED #define PNG_INFO_acTL 0x10000L #define PNG_INFO_fcTL 0x20000L #endif /* This is used for the transformation routines, as some of them * change these values for the row. It also should enable using * the routines for other purposes. */ typedef struct png_row_info_struct { png_uint_32 width; /* width of row */ png_size_t rowbytes; /* number of bytes in row */ png_byte color_type; /* color type of row */ png_byte bit_depth; /* bit depth of row */ png_byte channels; /* number of channels (1, 2, 3, or 4) */ png_byte pixel_depth; /* bits per pixel (depth * channels) */ } png_row_info; typedef png_row_info FAR * png_row_infop; typedef png_row_info FAR * FAR * png_row_infopp; /* These are the function types for the I/O functions and for the functions * that allow the user to override the default I/O functions with his or her * own. The png_error_ptr type should match that of user-supplied warning * and error functions, while the png_rw_ptr type should match that of the * user read/write data functions. */ typedef struct png_struct_def png_struct; typedef png_struct FAR * png_structp; typedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp)); typedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t)); typedef void (PNGAPI *png_flush_ptr) PNGARG((png_structp)); typedef void (PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32, int)); typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32, int)); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop)); typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop)); typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep, png_uint_32, int)); #ifdef PNG_APNG_SUPPORTED typedef void (PNGAPI *png_progressive_frame_ptr) PNGARG((png_structp, png_uint_32)); #endif #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp, png_row_infop, png_bytep)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp)); #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp)); #endif #ifdef PNG_SETJMP_SUPPORTED /* This must match the function definition in , and the * application must include this before png.h to obtain the definition * of jmp_buf. */ typedef void (PNGAPI *png_longjmp_ptr) PNGARG((jmp_buf, int)); #endif /* Transform masks for the high-level interface */ #define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */ #define PNG_TRANSFORM_STRIP_16 0x0001 /* read only */ #define PNG_TRANSFORM_STRIP_ALPHA 0x0002 /* read only */ #define PNG_TRANSFORM_PACKING 0x0004 /* read and write */ #define PNG_TRANSFORM_PACKSWAP 0x0008 /* read and write */ #define PNG_TRANSFORM_EXPAND 0x0010 /* read only */ #define PNG_TRANSFORM_INVERT_MONO 0x0020 /* read and write */ #define PNG_TRANSFORM_SHIFT 0x0040 /* read and write */ #define PNG_TRANSFORM_BGR 0x0080 /* read and write */ #define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ #define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ #define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ #define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only */ /* Added to libpng-1.2.34 */ #define PNG_TRANSFORM_STRIP_FILLER_BEFORE PNG_TRANSFORM_STRIP_FILLER #define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */ /* Added to libpng-1.4.0 */ #define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ /* Flags for MNG supported features */ #define PNG_FLAG_MNG_EMPTY_PLTE 0x01 #define PNG_FLAG_MNG_FILTER_64 0x04 #define PNG_ALL_MNG_FEATURES 0x05 typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_alloc_size_t)); typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp)); /* The structure that holds the information to read and write PNG files. * The only people who need to care about what is inside of this are the * people who will be modifying the library for their own special needs. * It should NOT be accessed directly by an application, except to store * the jmp_buf. */ struct png_struct_def { #ifdef PNG_SETJMP_SUPPORTED jmp_buf jmpbuf PNG_DEPSTRUCT; /* used in png_error */ png_longjmp_ptr longjmp_fn PNG_DEPSTRUCT;/* setjmp non-local goto function. */ #endif png_error_ptr error_fn PNG_DEPSTRUCT; /* function for printing errors and aborting */ png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing warnings */ png_voidp error_ptr PNG_DEPSTRUCT; /* user supplied struct for error functions */ png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing output data */ png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading input data */ png_voidp io_ptr PNG_DEPSTRUCT; /* ptr to application struct for I/O functions */ #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read transform */ #endif #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write transform */ #endif /* These were added in libpng-1.0.2 */ #ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct for user transform */ png_byte user_transform_depth PNG_DEPSTRUCT; /* bit depth of user transformed pixels */ png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user transformed pixels */ #endif #endif png_uint_32 mode PNG_DEPSTRUCT; /* tells us where we are in the PNG file */ png_uint_32 flags PNG_DEPSTRUCT; /* flags indicating various things to libpng */ png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations to perform */ z_stream zstream PNG_DEPSTRUCT; /* pointer to decompression structure (below) */ png_bytep zbuf PNG_DEPSTRUCT; /* buffer for zlib */ png_size_t zbuf_size PNG_DEPSTRUCT; /* size of zbuf */ int zlib_level PNG_DEPSTRUCT; /* holds zlib compression level */ int zlib_method PNG_DEPSTRUCT; /* holds zlib compression method */ int zlib_window_bits PNG_DEPSTRUCT; /* holds zlib compression window bits */ int zlib_mem_level PNG_DEPSTRUCT; /* holds zlib compression memory level */ int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression strategy */ png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels */ png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels */ png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */ png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */ png_size_t rowbytes PNG_DEPSTRUCT; /* size of row in bytes */ #if 0 /* Replaced with the following in libpng-1.4.1 */ png_size_t irowbytes PNG_DEPSTRUCT; #endif /* Added in libpng-1.4.1 */ #ifdef PNG_USER_LIMITS_SUPPORTED /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk * can occupy when decompressed. 0 means unlimited. * We will change the typedef from png_size_t to png_alloc_size_t * in libpng-1.6.0 */ png_alloc_size_t user_chunk_malloc_max PNG_DEPSTRUCT; #endif png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced row in pixels */ png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */ png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous (unfiltered) row */ png_bytep row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */ png_bytep sub_row PNG_DEPSTRUCT; /* buffer to save "sub" row when filtering */ png_bytep up_row PNG_DEPSTRUCT; /* buffer to save "up" row when filtering */ png_bytep avg_row PNG_DEPSTRUCT; /* buffer to save "avg" row when filtering */ png_bytep paeth_row PNG_DEPSTRUCT; /* buffer to save "Paeth" row when filtering */ png_row_info row_info PNG_DEPSTRUCT; /* used for transformation routines */ png_uint_32 idat_size PNG_DEPSTRUCT; /* current IDAT size for read */ png_uint_32 crc PNG_DEPSTRUCT; /* current chunk CRC value */ png_colorp palette PNG_DEPSTRUCT; /* palette from the input file */ png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in palette */ png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparency values */ png_byte chunk_name[5] PNG_DEPSTRUCT; /* null-terminated name of current chunk */ png_byte compression PNG_DEPSTRUCT; /* file compression type (always 0) */ png_byte filter PNG_DEPSTRUCT; /* file filter type (always 0) */ png_byte interlaced PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ png_byte pass PNG_DEPSTRUCT; /* current interlace pass (0 - 6) */ png_byte do_filter PNG_DEPSTRUCT; /* row filter flags (see PNG_FILTER_ below ) */ png_byte color_type PNG_DEPSTRUCT; /* color type of file */ png_byte bit_depth PNG_DEPSTRUCT; /* bit depth of file */ png_byte usr_bit_depth PNG_DEPSTRUCT; /* bit depth of users row */ png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ png_byte channels PNG_DEPSTRUCT; /* number of channels in file */ png_byte usr_channels PNG_DEPSTRUCT; /* channels at start of write */ png_byte sig_bytes PNG_DEPSTRUCT; /* magic bytes read/written from start of file */ #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) png_uint_16 filler PNG_DEPSTRUCT; /* filler bytes for pixel expansion */ #endif #ifdef PNG_bKGD_SUPPORTED png_byte background_gamma_type PNG_DEPSTRUCT; # ifdef PNG_FLOATING_POINT_SUPPORTED float background_gamma PNG_DEPSTRUCT; # endif png_color_16 background PNG_DEPSTRUCT; /* background color in screen gamma space */ #ifdef PNG_READ_GAMMA_SUPPORTED png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized to gamma 1.0 */ #endif #endif /* PNG_bKGD_SUPPORTED */ #ifdef PNG_WRITE_FLUSH_SUPPORTED png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing output */ png_uint_32 flush_dist PNG_DEPSTRUCT; /* how many rows apart to flush, 0 - no flush */ png_uint_32 flush_rows PNG_DEPSTRUCT; /* number of rows written since last flush */ #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) int gamma_shift PNG_DEPSTRUCT; /* number of "insignificant" bits 16-bit gamma */ #ifdef PNG_FLOATING_POINT_SUPPORTED float gamma PNG_DEPSTRUCT; /* file gamma value */ float screen_gamma PNG_DEPSTRUCT; /* screen gamma value (display_exponent) */ #endif #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit depth files */ png_bytep gamma_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ png_bytep gamma_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit depth files */ png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in each available channel */ #endif #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) png_color_8 shift PNG_DEPSTRUCT; /* shift for significant bit tranformation */ #endif #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted files */ png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for non-paletted files */ #endif png_read_status_ptr read_row_fn PNG_DEPSTRUCT; /* called after each row is decoded */ png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each row is encoded */ #ifdef PNG_PROGRESSIVE_READ_SUPPORTED png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header data fully read */ png_progressive_row_ptr row_fn PNG_DEPSTRUCT; /* called after each prog. row is decoded */ png_progressive_end_ptr end_fn PNG_DEPSTRUCT; /* called after image is complete */ png_bytep save_buffer_ptr PNG_DEPSTRUCT; /* current location in save_buffer */ png_bytep save_buffer PNG_DEPSTRUCT; /* buffer for previously read data */ png_bytep current_buffer_ptr PNG_DEPSTRUCT; /* current location in current_buffer */ png_bytep current_buffer PNG_DEPSTRUCT; /* buffer for recently used data */ png_uint_32 push_length PNG_DEPSTRUCT; /* size of current input chunk */ png_uint_32 skip_length PNG_DEPSTRUCT; /* bytes to skip in input data */ png_size_t save_buffer_size PNG_DEPSTRUCT; /* amount of data now in save_buffer */ png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of save_buffer */ png_size_t buffer_size PNG_DEPSTRUCT; /* total amount of available input data */ png_size_t current_buffer_size PNG_DEPSTRUCT; /* amount of data now in current_buffer */ int process_mode PNG_DEPSTRUCT; /* what push library is currently doing */ int cur_palette PNG_DEPSTRUCT; /* current push library palette index */ # ifdef PNG_TEXT_SUPPORTED png_size_t current_text_size PNG_DEPSTRUCT; /* current size of text input data */ png_size_t current_text_left PNG_DEPSTRUCT; /* how much text left to read in input */ png_charp current_text PNG_DEPSTRUCT; /* current text chunk buffer */ png_charp current_text_ptr PNG_DEPSTRUCT; /* current location in current_text */ # endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */ #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ #if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) /* For the Borland special 64K segment handler */ png_bytepp offset_table_ptr PNG_DEPSTRUCT; png_bytep offset_table PNG_DEPSTRUCT; png_uint_16 offset_table_number PNG_DEPSTRUCT; png_uint_16 offset_table_count PNG_DEPSTRUCT; png_uint_16 offset_table_count_free PNG_DEPSTRUCT; #endif #ifdef PNG_READ_QUANTIZE_SUPPORTED png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for quantizing */ png_bytep quantize_index PNG_DEPSTRUCT; /* index translation for palette files */ #endif #if defined(PNG_READ_QUANTIZE_SUPPORTED) || defined(PNG_hIST_SUPPORTED) png_uint_16p hist PNG_DEPSTRUCT; /* histogram */ #endif #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row filter selection */ png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights for previous rows */ png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of previous row(s) */ png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous line(s) */ png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for previous line(s) */ png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter calculation cost */ png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter calculation cost */ #endif #ifdef PNG_TIME_RFC1123_SUPPORTED png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 time text */ #endif /* New members added in libpng-1.0.6 */ png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */ #ifdef PNG_USER_CHUNKS_SUPPORTED png_voidp user_chunk_ptr PNG_DEPSTRUCT; png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read chunk handler */ #endif #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED int num_chunk_list PNG_DEPSTRUCT; png_bytep chunk_list PNG_DEPSTRUCT; #endif /* New members added in libpng-1.0.3 */ #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED png_byte rgb_to_gray_status PNG_DEPSTRUCT; /* These were changed from png_byte in libpng-1.0.6 */ png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT; png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT; png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT; #endif /* New member added in libpng-1.0.4 (renamed in 1.0.9) */ #if defined(PNG_MNG_FEATURES_SUPPORTED) || \ defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) /* Changed from png_byte to png_uint_32 at version 1.2.0 */ png_uint_32 mng_features_permitted PNG_DEPSTRUCT; #endif /* New member added in libpng-1.0.7 */ #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) png_fixed_point int_gamma PNG_DEPSTRUCT; #endif /* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ #ifdef PNG_MNG_FEATURES_SUPPORTED png_byte filter_type PNG_DEPSTRUCT; #endif /* New members added in libpng-1.2.0 */ /* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ #ifdef PNG_USER_MEM_SUPPORTED png_voidp mem_ptr PNG_DEPSTRUCT; /* user supplied struct for mem functions */ png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for allocating memory */ png_free_ptr free_fn PNG_DEPSTRUCT; /* function for freeing memory */ #endif /* New member added in libpng-1.0.13 and 1.2.0 */ png_bytep big_row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */ #ifdef PNG_READ_QUANTIZE_SUPPORTED /* The following three members were added at version 1.0.14 and 1.2.4 */ png_bytep quantize_sort PNG_DEPSTRUCT; /* working sort array */ png_bytep index_to_palette PNG_DEPSTRUCT; /* where the original index currently is in the palette */ png_bytep palette_to_index PNG_DEPSTRUCT; /* which original index points to this palette color */ #endif /* New members added in libpng-1.0.16 and 1.2.6 */ png_byte compression_type PNG_DEPSTRUCT; #ifdef PNG_USER_LIMITS_SUPPORTED png_uint_32 user_width_max PNG_DEPSTRUCT; png_uint_32 user_height_max PNG_DEPSTRUCT; /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown * chunks that can be stored (0 means unlimited). */ png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT; #endif #ifdef PNG_APNG_SUPPORTED png_uint_32 apng_flags PNG_DEPSTRUCT; png_uint_32 next_seq_num PNG_DEPSTRUCT; /* next fcTL/fdAT chunk sequence number */ png_uint_32 first_frame_width PNG_DEPSTRUCT; png_uint_32 first_frame_height PNG_DEPSTRUCT; #ifdef PNG_READ_APNG_SUPPORTED png_uint_32 num_frames_read PNG_DEPSTRUCT; /* incremented after all image data of */ /* a frame is read */ #ifdef PNG_PROGRESSIVE_READ_SUPPORTED png_progressive_frame_ptr frame_info_fn PNG_DEPSTRUCT; /* frame info read callback */ png_progressive_frame_ptr frame_end_fn PNG_DEPSTRUCT; /* frame data read callback */ #endif #endif #ifdef PNG_WRITE_APNG_SUPPORTED png_uint_32 num_frames_to_write PNG_DEPSTRUCT; png_uint_32 num_frames_written PNG_DEPSTRUCT; #endif /* dispose_op flags from inside fcTL */ #define PNG_DISPOSE_OP_NONE 0x00 #define PNG_DISPOSE_OP_BACKGROUND 0x01 #define PNG_DISPOSE_OP_PREVIOUS 0x02 /* blend_op flags from inside fcTL */ #define PNG_BLEND_OP_SOURCE 0x00 #define PNG_BLEND_OP_OVER 0x01 #endif /* PNG_APNG_SUPPORTED */ /* New member added in libpng-1.0.25 and 1.2.17 */ #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED /* Storage for unknown chunk that the library doesn't recognize. */ png_unknown_chunk unknown_chunk PNG_DEPSTRUCT; #endif /* New members added in libpng-1.2.26 */ png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT; png_uint_32 old_prev_row_size PNG_DEPSTRUCT; /* New member added in libpng-1.2.30 */ png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */ #ifdef PNG_IO_STATE_SUPPORTED /* New member added in libpng-1.4.0 */ png_uint_32 io_state PNG_DEPSTRUCT; #endif }; /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ typedef png_structp version_1_4_5; typedef png_struct FAR * FAR * png_structpp; /* Here are the function definitions most commonly used. This is not * the place to find out how to use libpng. See libpng.txt for the * full explanation, see example.c for the summary. This just provides * a simple one line description of the use of each function. */ /* Returns the version number of the library */ PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void)); /* Tell lib we have already handled the first magic bytes. * Handling more than 8 bytes from the beginning of the file is an error. */ PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr, int num_bytes)); /* Check sig[start] through sig[start + num_to_check - 1] to see if it's a * PNG file. Returns zero if the supplied bytes match the 8-byte PNG * signature, and non-zero otherwise. Having num_to_check == 0 or * start > 7 will always fail (ie return non-zero). */ PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start, png_size_t num_to_check)); /* Simple signature checking function. This is the same as calling * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). */ #define png_check_sig(sig,n) !png_sig_cmp((sig), 0, (n)) /* Allocate and initialize png_ptr struct for reading, and any other memory. */ PNG_EXPORT(png_structp,png_create_read_struct) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; /* Allocate and initialize png_ptr struct for writing, and any other memory */ PNG_EXPORT(png_structp,png_create_write_struct) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; PNG_EXPORT(png_size_t,png_get_compression_buffer_size) PNGARG((png_structp png_ptr)); PNG_EXPORT(void,png_set_compression_buffer_size) PNGARG((png_structp png_ptr, png_size_t size)); /* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp * match up. */ #ifdef PNG_SETJMP_SUPPORTED /* This function returns the jmp_buf built in to *png_ptr. It must be * supplied with an appropriate 'longjmp' function to use on that jmp_buf * unless the default error function is overridden in which case NULL is * acceptable. The size of the jmp_buf is checked against the actual size * allocated by the library - the call will return NULL on a mismatch * indicating an ABI mismatch. */ PNG_EXPORT(jmp_buf*, png_set_longjmp_fn) PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); # define png_jmpbuf(png_ptr) \ (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf))) #else # define png_jmpbuf(png_ptr) \ (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) #endif #ifdef PNG_READ_SUPPORTED /* Reset the compression stream */ PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr)); #endif /* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ #ifdef PNG_USER_MEM_SUPPORTED PNG_EXPORT(png_structp,png_create_read_struct_2) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; PNG_EXPORT(png_structp,png_create_write_struct_2) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED; #endif /* Write the PNG file signature. */ PNG_EXPORT(void,png_write_sig) PNGARG((png_structp png_ptr)); /* Write a PNG chunk - size, type, (optional) data, CRC. */ PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr, png_bytep chunk_name, png_bytep data, png_size_t length)); /* Write the start of a PNG chunk - length and chunk name. */ PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr, png_bytep chunk_name, png_uint_32 length)); /* Write the data of a PNG chunk started with png_write_chunk_start(). */ PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr, png_bytep data, png_size_t length)); /* Finish a chunk started with png_write_chunk_start() (includes CRC). */ PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr)); /* Allocate and initialize the info structure */ PNG_EXPORT(png_infop,png_create_info_struct) PNGARG((png_structp png_ptr)) PNG_ALLOCATED; PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr, png_size_t png_info_struct_size)); /* Writes all the PNG information before the image. */ PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the information before the actual image data. */ PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif #ifdef PNG_TIME_RFC1123_SUPPORTED PNG_EXPORT(png_charp,png_convert_to_rfc1123) PNGARG((png_structp png_ptr, png_timep ptime)); #endif #ifdef PNG_CONVERT_tIME_SUPPORTED /* Convert from a struct tm to png_time */ PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime, struct tm FAR * ttime)); /* Convert from time_t to png_time. Uses gmtime() */ PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime, time_t ttime)); #endif /* PNG_CONVERT_tIME_SUPPORTED */ #ifdef PNG_READ_EXPAND_SUPPORTED /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr)); PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp png_ptr)); PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr)); PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) /* Use blue, green, red order for pixels. */ PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED /* Expand the grayscale to 24-bit RGB if necessary. */ PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED /* Reduce RGB to grayscale. */ #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr, int error_action, double red, double green )); #endif PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr, int error_action, png_fixed_point red, png_fixed_point green )); PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp png_ptr)); #endif PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth, png_colorp palette)); #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) /* Add a filler byte to 8-bit Gray or 24-bit RGB images. */ PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr, png_uint_32 filler, int flags)); /* The values of the PNG_FILLER_ defines should NOT be changed */ #define PNG_FILLER_BEFORE 0 #define PNG_FILLER_AFTER 1 /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */ PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr, png_uint_32 filler, int flags)); #endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */ #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) /* Swap bytes in 16-bit depth files. */ PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) /* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ defined(PNG_WRITE_PACKSWAP_SUPPORTED) /* Swap packing order of pixels in bytes. */ PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) /* Converts files to legal bit depths. */ PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr, png_color_8p true_bits)); #endif #if defined(PNG_READ_INTERLACING_SUPPORTED) || \ defined(PNG_WRITE_INTERLACING_SUPPORTED) /* Have the code handle the interlacing. Returns the number of passes. */ PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) /* Invert monochrome files */ PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_BACKGROUND_SUPPORTED /* Handle alpha and tRNS by replacing with a background color. */ #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr, png_color_16p background_color, int background_gamma_code, int need_expand, double background_gamma)); #endif #define PNG_BACKGROUND_GAMMA_UNKNOWN 0 #define PNG_BACKGROUND_GAMMA_SCREEN 1 #define PNG_BACKGROUND_GAMMA_FILE 2 #define PNG_BACKGROUND_GAMMA_UNIQUE 3 #endif #ifdef PNG_READ_16_TO_8_SUPPORTED /* Strip the second byte of information from a 16-bit depth file. */ PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_QUANTIZE_SUPPORTED /* Turn on quantizing, and reduce the palette to the number of colors * available. Prior to libpng-1.4.2, this was png_set_dither(). */ PNG_EXPORT(void,png_set_quantize) PNGARG((png_structp png_ptr, png_colorp palette, int num_palette, int maximum_colors, png_uint_16p histogram, int full_quantize)); #endif /* This migration aid will be removed from libpng-1.5.0 */ #define png_set_dither png_set_quantize #ifdef PNG_READ_GAMMA_SUPPORTED /* Handle gamma correction. Screen_gamma=(display_exponent) */ #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr, double screen_gamma, double default_file_gamma)); #endif #endif #ifdef PNG_WRITE_FLUSH_SUPPORTED /* Set how many lines between output flushes - 0 for no flushing */ PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows)); /* Flush the current PNG output buffer */ PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr)); #endif /* Optional update palette with requested transformations */ PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr)); /* Optional call to update the users info structure */ PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read one or more rows of image data. */ PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr, png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)); #endif #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read a row of data. */ PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr, png_bytep row, png_bytep display_row)); #endif #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the whole image into memory at once. */ PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr, png_bytepp image)); #endif /* Write a row of image data */ PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr, png_bytep row)); /* Write a few rows of image data */ PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr, png_bytepp row, png_uint_32 num_rows)); /* Write the image data */ PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr, png_bytepp image)); #ifdef PNG_WRITE_APNG_SUPPORTED extern PNG_EXPORT (void,png_write_frame_head) PNGARG((png_structp png_ptr, png_infop png_info, png_bytepp row_pointers, png_uint_32 width, png_uint_32 height, png_uint_32 x_offset, png_uint_32 y_offset, png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op, png_byte blend_op)); extern PNG_EXPORT (void,png_write_frame_tail) PNGARG((png_structp png_ptr, png_infop png_info)); #endif /* Write the end of the PNG file. */ PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read the end of the PNG file. */ PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif /* Free any memory associated with the png_info_struct */ PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr, png_infopp info_ptr_ptr)); /* Free any memory associated with the png_struct and the png_info_structs */ PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); /* Free any memory associated with the png_struct and the png_info_structs */ PNG_EXPORT(void,png_destroy_write_struct) PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)); /* Set the libpng method of handling chunk CRC errors */ PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr, int crit_action, int ancil_action)); /* Values for png_set_crc_action() to say how to handle CRC errors in * ancillary and critical chunks, and whether to use the data contained * therein. Note that it is impossible to "discard" data in a critical * chunk. For versions prior to 0.90, the action was always error/quit, * whereas in version 0.90 and later, the action for CRC errors in ancillary * chunks is warn/discard. These values should NOT be changed. * * value action:critical action:ancillary */ #define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */ #define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */ #define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */ #define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */ #define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */ #define PNG_CRC_NO_CHANGE 5 /* use current value use current value */ /* These functions give the user control over the scan-line filtering in * libpng and the compression methods used by zlib. These functions are * mainly useful for testing, as the defaults should work with most users. * Those users who are tight on memory or want faster performance at the * expense of compression can modify them. See the compression library * header file (zlib.h) for an explination of the compression functions. */ /* Set the filtering method(s) used by libpng. Currently, the only valid * value for "method" is 0. */ PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method, int filters)); /* Flags for png_set_filter() to say which filters to use. The flags * are chosen so that they don't conflict with real filter types * below, in case they are supplied instead of the #defined constants. * These values should NOT be changed. */ #define PNG_NO_FILTERS 0x00 #define PNG_FILTER_NONE 0x08 #define PNG_FILTER_SUB 0x10 #define PNG_FILTER_UP 0x20 #define PNG_FILTER_AVG 0x40 #define PNG_FILTER_PAETH 0x80 #define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \ PNG_FILTER_AVG | PNG_FILTER_PAETH) /* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. * These defines should NOT be changed. */ #define PNG_FILTER_VALUE_NONE 0 #define PNG_FILTER_VALUE_SUB 1 #define PNG_FILTER_VALUE_UP 2 #define PNG_FILTER_VALUE_AVG 3 #define PNG_FILTER_VALUE_PAETH 4 #define PNG_FILTER_VALUE_LAST 5 #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* EXPERIMENTAL */ /* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_ * defines, either the default (minimum-sum-of-absolute-differences), or * the experimental method (weighted-minimum-sum-of-absolute-differences). * * Weights are factors >= 1.0, indicating how important it is to keep the * filter type consistent between rows. Larger numbers mean the current * filter is that many times as likely to be the same as the "num_weights" * previous filters. This is cumulative for each previous row with a weight. * There needs to be "num_weights" values in "filter_weights", or it can be * NULL if the weights aren't being specified. Weights have no influence on * the selection of the first row filter. Well chosen weights can (in theory) * improve the compression for a given image. * * Costs are factors >= 1.0 indicating the relative decoding costs of a * filter type. Higher costs indicate more decoding expense, and are * therefore less likely to be selected over a filter with lower computational * costs. There needs to be a value in "filter_costs" for each valid filter * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't * setting the costs. Costs try to improve the speed of decompression without * unduly increasing the compressed image size. * * A negative weight or cost indicates the default value is to be used, and * values in the range [0.0, 1.0) indicate the value is to remain unchanged. * The default values for both weights and costs are currently 1.0, but may * change if good general weighting/cost heuristics can be found. If both * the weights and costs are set to 1.0, this degenerates the WEIGHTED method * to the UNWEIGHTED method, but with added encoding time/computation. */ #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr, int heuristic_method, int num_weights, png_doublep filter_weights, png_doublep filter_costs)); #endif #endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ /* Heuristic used for row filter selection. These defines should NOT be * changed. */ #define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ #define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ #define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ #define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ /* Set the library compression level. Currently, valid values range from * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 * (0 - no compression, 9 - "maximal" compression). Note that tests have * shown that zlib compression levels 3-6 usually perform as well as level 9 * for PNG images, and do considerably fewer caclulations. In the future, * these values may not correspond directly to the zlib compression levels. */ PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr, int level)); PNG_EXPORT(void,png_set_compression_mem_level) PNGARG((png_structp png_ptr, int mem_level)); PNG_EXPORT(void,png_set_compression_strategy) PNGARG((png_structp png_ptr, int strategy)); PNG_EXPORT(void,png_set_compression_window_bits) PNGARG((png_structp png_ptr, int window_bits)); PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr, int method)); /* These next functions are called for input/output, memory, and error * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, * and call standard C I/O routines such as fread(), fwrite(), and * fprintf(). These functions can be made to use other I/O routines * at run time for those applications that need to handle I/O in a * different manner by calling png_set_???_fn(). See libpng.txt for * more information. */ #ifdef PNG_STDIO_SUPPORTED /* Initialize the input/output for the PNG file to the default functions. */ PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp)); #endif /* Replace the (error and abort), and warning functions with user * supplied functions. If no messages are to be printed you must still * write and use replacement functions. The replacement error_fn should * still do a longjmp to the last setjmp location if you are using this * method of error handling. If error_fn or warning_fn is NULL, the * default function will be used. */ PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); /* Return the user pointer associated with the error functions */ PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr)); /* Replace the default data output functions with a user supplied one(s). * If buffered output is not used, then output_flush_fn can be set to NULL. * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time * output_flush_fn will be ignored (and thus can be NULL). * It is probably a mistake to use NULL for output_flush_fn if * write_data_fn is not also NULL unless you have built libpng with * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's * default flush function, which uses the standard *FILE structure, will * be used. */ PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr, png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); /* Replace the default data input function with a user supplied one. */ PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn)); /* Return the user pointer associated with the I/O functions */ PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr)); PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr, png_read_status_ptr read_row_fn)); PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr, png_write_status_ptr write_row_fn)); #ifdef PNG_USER_MEM_SUPPORTED /* Replace the default memory allocation functions with user supplied one(s). */ PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)); /* Return the user pointer associated with the memory functions */ PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp png_ptr, png_user_transform_ptr read_user_transform_fn)); #endif #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp png_ptr, png_user_transform_ptr write_user_transform_fn)); #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp png_ptr, png_voidp user_transform_ptr, int user_transform_depth, int user_transform_channels)); /* Return the user pointer associated with the user transform functions */ PNG_EXPORT(png_voidp,png_get_user_transform_ptr) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr, png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_PROGRESSIVE_READ_SUPPORTED /* Sets the function callbacks for the push reader, and a pointer to a * user-defined structure available to the callback functions. */ PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr, png_voidp progressive_ptr, png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); #ifdef PNG_READ_APNG_SUPPORTED extern PNG_EXPORT(void,png_set_progressive_frame_fn) PNGARG((png_structp png_ptr, png_progressive_frame_ptr frame_info_fn, png_progressive_frame_ptr frame_end_fn)); #endif /* Returns the user pointer associated with the push read functions */ PNG_EXPORT(png_voidp,png_get_progressive_ptr) PNGARG((png_structp png_ptr)); /* Function to be called when data becomes available */ PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr, png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)); /* Function that combines rows. Not very much different than the * png_combine_row() call. Is this even used????? */ PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr, png_bytep old_row, png_bytep new_row)); #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr, png_alloc_size_t size)) PNG_ALLOCATED; /* Added at libpng version 1.4.0 */ PNG_EXPORT(png_voidp,png_calloc) PNGARG((png_structp png_ptr, png_alloc_size_t size)) PNG_ALLOCATED; /* Added at libpng version 1.2.4 */ PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr, png_alloc_size_t size)) PNG_ALLOCATED; /* Frees a pointer allocated by png_malloc() */ PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr)); /* Free data that was allocated internally */ PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num)); /* Reassign responsibility for freeing existing data, whether allocated * by libpng or by the application */ PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr, png_infop info_ptr, int freer, png_uint_32 mask)); /* Assignments for png_data_freer */ #define PNG_DESTROY_WILL_FREE_DATA 1 #define PNG_SET_WILL_FREE_DATA 1 #define PNG_USER_WILL_FREE_DATA 2 /* Flags for png_ptr->free_me and info_ptr->free_me */ #define PNG_FREE_HIST 0x0008 #define PNG_FREE_ICCP 0x0010 #define PNG_FREE_SPLT 0x0020 #define PNG_FREE_ROWS 0x0040 #define PNG_FREE_PCAL 0x0080 #define PNG_FREE_SCAL 0x0100 #define PNG_FREE_UNKN 0x0200 #define PNG_FREE_LIST 0x0400 #define PNG_FREE_PLTE 0x1000 #define PNG_FREE_TRNS 0x2000 #define PNG_FREE_TEXT 0x4000 #define PNG_FREE_ALL 0x7fff #define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ #ifdef PNG_USER_MEM_SUPPORTED PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr, png_alloc_size_t size)) PNG_ALLOCATED; PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr, png_voidp ptr)); #endif #ifndef PNG_NO_ERROR_TEXT /* Fatal error in PNG image of libpng - can't continue */ PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr, png_const_charp error_message)) PNG_NORETURN; /* The same, but the chunk name is prepended to the error string. */ PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr, png_const_charp error_message)) PNG_NORETURN; #else /* Fatal error in PNG image of libpng - can't continue */ PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN; #endif /* Non-fatal error in libpng. Can continue, but may have a problem. */ PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr, png_const_charp warning_message)); /* Non-fatal error in libpng, chunk name is prepended to message. */ PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr, png_const_charp warning_message)); #ifdef PNG_BENIGN_ERRORS_SUPPORTED /* Benign error in libpng. Can continue, but may have a problem. * User can choose whether to handle as a fatal error or as a warning. */ PNG_EXPORT(void,png_benign_error) PNGARG((png_structp png_ptr, png_const_charp warning_message)); /* Same, chunk name is prepended to message. */ PNG_EXPORT(void,png_chunk_benign_error) PNGARG((png_structp png_ptr, png_const_charp warning_message)); PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp png_ptr, int allowed)); #endif /* The png_set_ functions are for storing values in the png_info_struct. * Similarly, the png_get_ calls are used to read values from the * png_info_struct, either storing the parameters in the passed variables, or * setting pointers into the png_info_struct where the data is stored. The * png_get_ functions return a non-zero value if the data was available * in info_ptr, or return zero and do not change any of the parameters if the * data was not available. * * These functions should be used instead of directly accessing png_info * to avoid problems with future changes in the size and internal layout of * png_info_struct. */ /* Returns "flag" if chunk data is valid in info_ptr. */ PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)); /* Returns number of bytes needed to hold a transformed row. */ PNG_EXPORT(png_size_t,png_get_rowbytes) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_INFO_IMAGE_SUPPORTED /* Returns row_pointers, which is an array of pointers to scanlines that was * returned from png_read_png(). */ PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Set row_pointers, which is an array of pointers to scanlines for use * by png_write_png(). */ PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)); #endif /* Returns number of color channels in image. */ PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_EASY_ACCESS_SUPPORTED /* Returns image width in pixels. */ PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image height in pixels. */ PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image bit_depth. */ PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image color_type. */ PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image filter_type. */ PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image interlace_type. */ PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image compression_type. */ PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns image resolution in pixels per meter, from pHYs chunk data. */ PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Returns pixel aspect ratio, computed from pHYs chunk data. */ #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif /* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif /* PNG_EASY_ACCESS_SUPPORTED */ /* Returns pointer to signature string read from PNG header */ PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_bKGD_SUPPORTED PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr, png_infop info_ptr, png_color_16p *background)); #endif #ifdef PNG_bKGD_SUPPORTED PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr, png_infop info_ptr, png_color_16p background)); #endif #ifdef PNG_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr, png_infop info_ptr, double *white_x, double *white_y, double *red_x, double *red_y, double *green_x, double *green_y, double *blue_x, double *blue_y)); #endif #ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr, png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y, png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point *int_blue_x, png_fixed_point *int_blue_y)); #endif #endif #ifdef PNG_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr, png_infop info_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y)); #endif #ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr, png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, png_fixed_point int_blue_y)); #endif #endif #ifdef PNG_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr, png_infop info_ptr, double *file_gamma)); #endif PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr, png_infop info_ptr, png_fixed_point *int_file_gamma)); #endif #ifdef PNG_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr, png_infop info_ptr, double file_gamma)); #endif PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr, png_infop info_ptr, png_fixed_point int_file_gamma)); #endif #ifdef PNG_hIST_SUPPORTED PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)); #endif #ifdef PNG_hIST_SUPPORTED PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)); #endif PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method)); PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_method, int compression_method, int filter_method)); #ifdef PNG_oFFs_SUPPORTED PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr, png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)); #endif #ifdef PNG_oFFs_SUPPORTED PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr, png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, int unit_type)); #endif #ifdef PNG_pCAL_SUPPORTED PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr, png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, png_charp *units, png_charpp *params)); #endif #ifdef PNG_pCAL_SUPPORTED PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr, png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)); #endif #ifdef PNG_pHYs_SUPPORTED PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); #endif #ifdef PNG_pHYs_SUPPORTED PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); #endif PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette)); PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr, png_infop info_ptr, png_colorp palette, int num_palette)); #ifdef PNG_sBIT_SUPPORTED PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)); #endif #ifdef PNG_sBIT_SUPPORTED PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr, png_infop info_ptr, png_color_8p sig_bit)); #endif #ifdef PNG_sRGB_SUPPORTED PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr, png_infop info_ptr, int *intent)); #endif #ifdef PNG_sRGB_SUPPORTED PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr, png_infop info_ptr, int intent)); PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr, png_infop info_ptr, int intent)); #endif #ifdef PNG_iCCP_SUPPORTED PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr, png_infop info_ptr, png_charpp name, int *compression_type, png_charpp profile, png_uint_32 *proflen)); /* Note to maintainer: profile should be png_bytepp */ #endif #ifdef PNG_iCCP_SUPPORTED PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr, png_infop info_ptr, png_charp name, int compression_type, png_charp profile, png_uint_32 proflen)); /* Note to maintainer: profile should be png_bytep */ #endif #ifdef PNG_sPLT_SUPPORTED PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr, png_infop info_ptr, png_sPLT_tpp entries)); #endif #ifdef PNG_sPLT_SUPPORTED PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr, png_infop info_ptr, png_sPLT_tp entries, int nentries)); #endif #ifdef PNG_TEXT_SUPPORTED /* png_get_text also returns the number of text chunks in *num_text */ PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, int *num_text)); #endif /* Note while png_set_text() will accept a structure whose text, * language, and translated keywords are NULL pointers, the structure * returned by png_get_text will always contain regular * zero-terminated C strings. They might be empty strings but * they will never be NULL pointers. */ #ifdef PNG_TEXT_SUPPORTED PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text)); #endif #ifdef PNG_tIME_SUPPORTED PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)); #endif #ifdef PNG_tIME_SUPPORTED PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr, png_infop info_ptr, png_timep mod_time)); #endif #ifdef PNG_tRNS_SUPPORTED PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr, png_infop info_ptr, png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)); #endif #ifdef PNG_tRNS_SUPPORTED PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr, png_infop info_ptr, png_bytep trans_alpha, int num_trans, png_color_16p trans_color)); #endif #ifdef PNG_tRNS_SUPPORTED #endif #ifdef PNG_sCAL_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr, png_infop info_ptr, int *unit, double *width, double *height)); #else #ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr, png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight)); #endif #endif #endif /* PNG_sCAL_SUPPORTED */ #ifdef PNG_sCAL_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr, png_infop info_ptr, int unit, double width, double height)); #else #ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr, png_infop info_ptr, int unit, png_charp swidth, png_charp sheight)); #endif #endif #endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */ #ifdef PNG_APNG_SUPPORTED extern PNG_EXPORT(png_uint_32,png_get_acTL) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 *num_frames, png_uint_32 *num_plays)); extern PNG_EXPORT(png_uint_32,png_set_acTL) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 num_frames, png_uint_32 num_plays)); extern PNG_EXPORT(png_uint_32,png_get_num_frames) PNGARG((png_structp png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_uint_32,png_get_num_plays) PNGARG((png_structp png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_uint_32,png_get_next_frame_fcTL) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, png_uint_32 *x_offset, png_uint_32 *y_offset, png_uint_16 *delay_num, png_uint_16 *delay_den, png_byte *dispose_op, png_byte *blend_op)); extern PNG_EXPORT(png_uint_32,png_set_next_frame_fcTL) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 width, png_uint_32 height, png_uint_32 x_offset, png_uint_32 y_offset, png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op, png_byte blend_op)); extern PNG_EXPORT(png_uint_32,png_get_next_frame_width) PNGARG((png_structp png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_uint_32,png_get_next_frame_height) PNGARG((png_structp png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_uint_32,png_get_next_frame_x_offset) PNGARG((png_structp png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_uint_32,png_get_next_frame_y_offset) PNGARG((png_structp png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_uint_16,png_get_next_frame_delay_num) PNGARG((png_structp png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_uint_16,png_get_next_frame_delay_den) PNGARG((png_structp png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_byte,png_get_next_frame_dispose_op) PNGARG((png_structp png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_byte,png_get_next_frame_blend_op) PNGARG((png_structp png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_byte,png_get_first_frame_is_hidden) PNGARG((png_structp png_ptr, png_infop info_ptr)); extern PNG_EXPORT(png_uint_32,png_set_first_frame_is_hidden) PNGARG((png_structp png_ptr, png_infop info_ptr, png_byte is_hidden)); #endif /* PNG_APNG_SUPPORTED */ #ifdef PNG_READ_APNG_SUPPORTED extern PNG_EXPORT(void,png_read_frame_head) PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED /* Provide a list of chunks and how they are to be handled, if the built-in handling or default unknown chunk handling is not desired. Any chunks not listed will be handled in the default manner. The IHDR and IEND chunks must not be listed. keep = 0: follow default behaviour = 1: do not keep = 2: keep only if safe-to-copy = 3: keep even if unsafe-to-copy */ PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp png_ptr, int keep, png_bytep chunk_list, int num_chunks)); PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep chunk_name)); #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr, png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)); PNG_EXPORT(void, png_set_unknown_chunk_location) PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location)); PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp png_ptr, png_infop info_ptr, png_unknown_chunkpp entries)); #endif /* Png_free_data() will turn off the "valid" flag for anything it frees. * If you need to turn it off for a chunk that your application has freed, * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); */ PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr, png_infop info_ptr, int mask)); #ifdef PNG_INFO_IMAGE_SUPPORTED /* The "params" pointer is currently not used and is for future expansion. */ PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr, png_infop info_ptr, int transforms, png_voidp params)); PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr, png_infop info_ptr, int transforms, png_voidp params)); #endif PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr)); PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr)); PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr)); PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr)); #ifdef PNG_MNG_FEATURES_SUPPORTED PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp png_ptr, png_uint_32 mng_features_permitted)); #endif /* For use in png_set_keep_unknown, added to version 1.2.6 */ #define PNG_HANDLE_CHUNK_AS_DEFAULT 0 #define PNG_HANDLE_CHUNK_NEVER 1 #define PNG_HANDLE_CHUNK_IF_SAFE 2 #define PNG_HANDLE_CHUNK_ALWAYS 3 /* Strip the prepended error numbers ("#nnn ") from error and warning * messages before passing them to the error or warning handler. */ #ifdef PNG_ERROR_NUMBERS_SUPPORTED PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp png_ptr, png_uint_32 strip_mode)); #endif /* Added in libpng-1.2.6 */ #ifdef PNG_SET_USER_LIMITS_SUPPORTED PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max)); PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp png_ptr)); PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp png_ptr)); /* Added in libpng-1.4.0 */ PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp png_ptr, png_uint_32 user_chunk_cache_max)); PNG_EXPORT(png_uint_32,png_get_chunk_cache_max) PNGARG((png_structp png_ptr)); /* Added in libpng-1.4.1 */ PNG_EXPORT(void,png_set_chunk_malloc_max) PNGARG((png_structp png_ptr, png_alloc_size_t user_chunk_cache_max)); PNG_EXPORT(png_alloc_size_t,png_get_chunk_malloc_max) PNGARG((png_structp png_ptr)); #endif #if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED) PNG_EXPORT(png_uint_32,png_get_pixels_per_inch) PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXPORT(png_uint_32,png_get_x_pixels_per_inch) PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXPORT(png_uint_32,png_get_y_pixels_per_inch) PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXPORT(float,png_get_x_offset_inches) PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXPORT(float,png_get_y_offset_inches) PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_pHYs_SUPPORTED PNG_EXPORT(png_uint_32,png_get_pHYs_dpi) PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); #endif /* PNG_pHYs_SUPPORTED */ #endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */ /* Added in libpng-1.4.0 */ #ifdef PNG_IO_STATE_SUPPORTED PNG_EXPORT(png_uint_32,png_get_io_state) PNGARG((png_structp png_ptr)); PNG_EXPORT(png_bytep,png_get_io_chunk_name) PNGARG((png_structp png_ptr)); /* The flags returned by png_get_io_state() are the following: */ #define PNG_IO_NONE 0x0000 /* no I/O at this moment */ #define PNG_IO_READING 0x0001 /* currently reading */ #define PNG_IO_WRITING 0x0002 /* currently writing */ #define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */ #define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */ #define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */ #define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */ #define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */ #define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */ #endif /* ?PNG_IO_STATE_SUPPORTED */ /* Maintainer: Put new public prototypes here ^, in libpng.3, and project * defs */ #ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED /* With these routines we avoid an integer divide, which will be slower on * most machines. However, it does take more operations than the corresponding * divide method, so it may be slower on a few RISC systems. There are two * shifts (by 8 or 16 bits) and an addition, versus a single integer divide. * * Note that the rounding factors are NOT supposed to be the same! 128 and * 32768 are correct for the NODIV code; 127 and 32767 are correct for the * standard method. * * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] */ /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ # define png_composite(composite, fg, alpha, bg) \ { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ * (png_uint_16)(alpha) \ + (png_uint_16)(bg)*(png_uint_16)(255 \ - (png_uint_16)(alpha)) + (png_uint_16)128); \ (composite) = (png_byte)((temp + (temp >> 8)) >> 8); } # define png_composite_16(composite, fg, alpha, bg) \ { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ * (png_uint_32)(alpha) \ + (png_uint_32)(bg)*(png_uint_32)(65535L \ - (png_uint_32)(alpha)) + (png_uint_32)32768L); \ (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); } #else /* Standard method using integer division */ # define png_composite(composite, fg, alpha, bg) \ (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \ (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ (png_uint_16)127) / 255) # define png_composite_16(composite, fg, alpha, bg) \ (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \ (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \ (png_uint_32)32767) / (png_uint_32)65535L) #endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */ #ifdef PNG_USE_READ_MACROS /* Inline macros to do direct reads of bytes from the input buffer. * The png_get_int_32() routine assumes we are using two's complement * format for negative values, which is almost certainly true. */ # define png_get_uint_32(buf) \ (((png_uint_32)(*(buf)) << 24) + \ ((png_uint_32)(*((buf) + 1)) << 16) + \ ((png_uint_32)(*((buf) + 2)) << 8) + \ ((png_uint_32)(*((buf) + 3)))) /* The following definition introduces an API incompatibility (but not * an ABI incompatibility) with libpng-1.4.0 through 1.4.4. Prior to * libpng-1.4.5 the macro, which is used by default, returned (incorrectly) * a (png_uint_32), while the function, if used instead, correctly returned * a (png_uint_16). * * Libpng versions 1.0.x and 1.2.x only used a function so are not affected * by this potential API incompatibility between macros. */ # define png_get_uint_16(buf) \ ((png_uint_16) \ (((unsigned int)(*(buf)) << 8) + \ ((unsigned int)(*((buf) + 1))))) # define png_get_int_32(buf) \ ((png_int_32)((*(buf) & 0x80) \ ? -((png_int_32)((png_get_uint_32(buf) ^ 0xffffffffL) + 1)) \ : (png_int_32)png_get_uint_32(buf))) #else PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf)); PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf)); #ifdef PNG_GET_INT_32_SUPPORTED PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf)); #endif #endif PNG_EXPORT(png_uint_32,png_get_uint_31) PNGARG((png_structp png_ptr, png_bytep buf)); /* No png_get_int_16 -- may be added if there's a real need for it. */ /* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ PNG_EXPORT(void,png_save_uint_32) PNGARG((png_bytep buf, png_uint_32 i)); PNG_EXPORT(void,png_save_int_32) PNGARG((png_bytep buf, png_int_32 i)); /* Place a 16-bit number into a buffer in PNG byte order. * The parameter is declared unsigned int, not png_uint_16, * just to avoid potential problems on pre-ANSI C compilers. */ PNG_EXPORT(void,png_save_uint_16) PNGARG((png_bytep buf, unsigned int i)); /* No png_save_int_16 -- may be added if there's a real need for it. */ /* ************************************************************************* */ /* Various modes of operation. Note that after an init, mode is set to * zero automatically when the structure is created. */ #define PNG_HAVE_IHDR 0x01 #define PNG_HAVE_PLTE 0x02 #define PNG_HAVE_IDAT 0x04 #define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */ #define PNG_HAVE_IEND 0x10 #define PNG_HAVE_gAMA 0x20 #define PNG_HAVE_cHRM 0x40 #ifdef __cplusplus } #endif #endif /* PNG_VERSION_INFO_ONLY */ /* Do not put anything past this line */ #endif /* PNG_H */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_AFFINE_H__ #define __ART_AFFINE_H__ #ifdef LIBART_COMPILATION #include "art_point.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void art_affine_point (ArtPoint *dst, const ArtPoint *src, const double affine[6]); void art_affine_invert (double dst_affine[6], const double src_affine[6]); /* flip the matrix, FALSE, FALSE is a simple copy operation, and TRUE, TRUE equals a rotation by 180 degrees */ void art_affine_flip (double dst_affine[6], const double src_affine[6], int horz, int vert); void art_affine_to_string (char str[128], const double src[6]); void art_affine_multiply (double dst[6], const double src1[6], const double src2[6]); /* set up the identity matrix */ void art_affine_identity (double dst[6]); /* set up a scaling matrix */ void art_affine_scale (double dst[6], double sx, double sy); /* set up a rotation matrix; theta is given in degrees */ void art_affine_rotate (double dst[6], double theta); /* set up a shearing matrix; theta is given in degrees */ void art_affine_shear (double dst[6], double theta); /* set up a translation matrix */ void art_affine_translate (double dst[6], double tx, double ty); /* find the affine's "expansion factor", i.e. the scale amount */ double art_affine_expansion (const double src[6]); /* Determine whether the affine transformation is rectilinear, i.e. whether a rectangle aligned to the grid is transformed into another rectangle aligned to the grid. */ int art_affine_rectilinear (const double src[6]); /* Determine whether two affine transformations are equal within grid allignment */ int art_affine_equal (double matrix1[6], double matrix2[6]); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_AFFINE_H__ */ #ifndef LIBART_FEATURES_H #define LIBART_FEATURES_H 1 #define LIBART_MAJOR_VERSION (2) #define LIBART_MINOR_VERSION (3) #define LIBART_MICRO_VERSION (21) #define LIBART_VERSION "2.3.21" #ifdef _WIN32 # ifdef LIBART_COMPILATION # define LIBART_VAR __declspec(dllexport) # else # define LIBART_VAR extern __declspec(dllimport) # endif #else # define LIBART_VAR extern #endif LIBART_VAR const unsigned int libart_major_version, libart_minor_version, libart_micro_version; LIBART_VAR const char *libart_version; void libart_preinit(void *app, void *modinfo); void libart_postinit(void *app, void *modinfo); #endif /* pngpriv.h - private declarations for use inside libpng * * libpng version 1.4.5 - December 9, 2010 * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2010 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer * and license in png.h */ /* The symbols declared in this file (including the functions declared * as PNG_EXTERN) are PRIVATE. They are not part of the libpng public * interface, and are not recommended for use by regular applications. * Some of them may become public in the future; others may stay private, * change in an incompatible way, or even disappear. * Although the libpng users are not forbidden to include this header, * they should be well aware of the issues that may arise from doing so. */ #ifndef PNGPRIV_H #define PNGPRIV_H #ifndef PNG_VERSION_INFO_ONLY #include #ifndef PNG_EXTERN /* The functions exported by PNG_EXTERN are internal functions, which * aren't usually used outside the library (as far as I know), so it is * debatable if they should be exported at all. In the future, when it * is possible to have run-time registry of chunk-handling functions, * some of these will be made available again. # define PNG_EXTERN extern */ # define PNG_EXTERN #endif /* Other defines specific to compilers can go here. Try to keep * them inside an appropriate ifdef/endif pair for portability. */ #ifdef PNG_FLOATING_POINT_SUPPORTED # ifdef MACOS /* We need to check that hasn't already been included earlier * as it seems it doesn't agree with , yet we should really use * if possible. */ # if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) # include # endif # else # include # endif # if defined(_AMIGA) && defined(__SASC) && defined(_M68881) /* Amiga SAS/C: We must include builtin FPU functions when compiling using * MATH=68881 */ # include # endif #endif /* Codewarrior on NT has linking problems without this. */ #if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__) # define PNG_ALWAYS_EXTERN #endif /* This provides the non-ANSI (far) memory allocation routines. */ #if defined(__TURBOC__) && defined(__MSDOS__) # include # include #endif #if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \ defined(_WIN32) || defined(__WIN32__) # include /* defines _WINDOWS_ macro */ #endif /* Various modes of operation. Note that after an init, mode is set to * zero automatically when the structure is created. */ #define PNG_HAVE_IHDR 0x01 #define PNG_HAVE_PLTE 0x02 #define PNG_HAVE_IDAT 0x04 #define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */ #define PNG_HAVE_IEND 0x10 #define PNG_HAVE_gAMA 0x20 #define PNG_HAVE_cHRM 0x40 #define PNG_HAVE_sRGB 0x80 #define PNG_HAVE_CHUNK_HEADER 0x100 #define PNG_WROTE_tIME 0x200 #define PNG_WROTE_INFO_BEFORE_PLTE 0x400 #define PNG_BACKGROUND_IS_GRAY 0x800 #define PNG_HAVE_PNG_SIGNATURE 0x1000 #define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */ #ifdef PNG_APNG_SUPPORTED #define PNG_HAVE_acTL 0x4000 #define PNG_HAVE_fcTL 0x8000L #endif /* Flags for the transformations the PNG library does on the image data */ #define PNG_BGR 0x0001 #define PNG_INTERLACE 0x0002 #define PNG_PACK 0x0004 #define PNG_SHIFT 0x0008 #define PNG_SWAP_BYTES 0x0010 #define PNG_INVERT_MONO 0x0020 #define PNG_QUANTIZE 0x0040 /* formerly PNG_DITHER */ #define PNG_BACKGROUND 0x0080 #define PNG_BACKGROUND_EXPAND 0x0100 /* 0x0200 unused */ #define PNG_16_TO_8 0x0400 #define PNG_RGBA 0x0800 #define PNG_EXPAND 0x1000 #define PNG_GAMMA 0x2000 #define PNG_GRAY_TO_RGB 0x4000 #define PNG_FILLER 0x8000L #define PNG_PACKSWAP 0x10000L #define PNG_SWAP_ALPHA 0x20000L #define PNG_STRIP_ALPHA 0x40000L #define PNG_INVERT_ALPHA 0x80000L #define PNG_USER_TRANSFORM 0x100000L #define PNG_RGB_TO_GRAY_ERR 0x200000L #define PNG_RGB_TO_GRAY_WARN 0x400000L #define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */ /* 0x800000L Unused */ #define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */ #define PNG_EXPAND_tRNS 0x2000000L /* Added to libpng-1.2.9 */ /* 0x4000000L unused */ /* 0x8000000L unused */ /* 0x10000000L unused */ /* 0x20000000L unused */ /* 0x40000000L unused */ /* Flags for png_create_struct */ #define PNG_STRUCT_PNG 0x0001 #define PNG_STRUCT_INFO 0x0002 /* Scaling factor for filter heuristic weighting calculations */ #define PNG_WEIGHT_SHIFT 8 #define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT)) #define PNG_COST_SHIFT 3 #define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT)) /* Flags for the png_ptr->flags rather than declaring a byte for each one */ #define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001 #define PNG_FLAG_ZLIB_CUSTOM_LEVEL 0x0002 #define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL 0x0004 #define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS 0x0008 #define PNG_FLAG_ZLIB_CUSTOM_METHOD 0x0010 #define PNG_FLAG_ZLIB_FINISHED 0x0020 #define PNG_FLAG_ROW_INIT 0x0040 #define PNG_FLAG_FILLER_AFTER 0x0080 #define PNG_FLAG_CRC_ANCILLARY_USE 0x0100 #define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200 #define PNG_FLAG_CRC_CRITICAL_USE 0x0400 #define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800 /* 0x1000 unused */ /* 0x2000 unused */ /* 0x4000 unused */ #define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000L #define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000L #define PNG_FLAG_LIBRARY_MISMATCH 0x20000L #define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L #define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L #define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L #define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */ #define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */ #define PNG_FLAG_BENIGN_ERRORS_WARN 0x800000L /* Added to libpng-1.4.0 */ /* 0x1000000L unused */ /* 0x2000000L unused */ /* 0x4000000L unused */ /* 0x8000000L unused */ /* 0x10000000L unused */ /* 0x20000000L unused */ /* 0x40000000L unused */ #define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ PNG_FLAG_CRC_ANCILLARY_NOWARN) #define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \ PNG_FLAG_CRC_CRITICAL_IGNORE) #define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \ PNG_FLAG_CRC_CRITICAL_MASK) /* Save typing and make code easier to understand */ #define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \ abs((int)((c1).green) - (int)((c2).green)) + \ abs((int)((c1).blue) - (int)((c2).blue))) /* Added to libpng-1.2.6 JB */ #define PNG_ROWBYTES(pixel_bits, width) \ ((pixel_bits) >= 8 ? \ ((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \ (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) ) /* PNG_OUT_OF_RANGE returns true if value is outside the range * ideal-delta..ideal+delta. Each argument is evaluated twice. * "ideal" and "delta" should be constants, normally simple * integers, "value" a variable. Added to libpng-1.2.6 JB */ #define PNG_OUT_OF_RANGE(value, ideal, delta) \ ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) ) /* Constant strings for known chunk types. If you need to add a chunk, * define the name here, and add an invocation of the macro wherever it's * needed. */ #define PNG_IHDR PNG_CONST png_byte png_IHDR[5] = { 73, 72, 68, 82, '\0'} #define PNG_IDAT PNG_CONST png_byte png_IDAT[5] = { 73, 68, 65, 84, '\0'} #define PNG_IEND PNG_CONST png_byte png_IEND[5] = { 73, 69, 78, 68, '\0'} #define PNG_PLTE PNG_CONST png_byte png_PLTE[5] = { 80, 76, 84, 69, '\0'} #define PNG_bKGD PNG_CONST png_byte png_bKGD[5] = { 98, 75, 71, 68, '\0'} #define PNG_cHRM PNG_CONST png_byte png_cHRM[5] = { 99, 72, 82, 77, '\0'} #define PNG_gAMA PNG_CONST png_byte png_gAMA[5] = {103, 65, 77, 65, '\0'} #define PNG_hIST PNG_CONST png_byte png_hIST[5] = {104, 73, 83, 84, '\0'} #define PNG_iCCP PNG_CONST png_byte png_iCCP[5] = {105, 67, 67, 80, '\0'} #define PNG_iTXt PNG_CONST png_byte png_iTXt[5] = {105, 84, 88, 116, '\0'} #define PNG_oFFs PNG_CONST png_byte png_oFFs[5] = {111, 70, 70, 115, '\0'} #define PNG_pCAL PNG_CONST png_byte png_pCAL[5] = {112, 67, 65, 76, '\0'} #define PNG_sCAL PNG_CONST png_byte png_sCAL[5] = {115, 67, 65, 76, '\0'} #define PNG_pHYs PNG_CONST png_byte png_pHYs[5] = {112, 72, 89, 115, '\0'} #define PNG_sBIT PNG_CONST png_byte png_sBIT[5] = {115, 66, 73, 84, '\0'} #define PNG_sPLT PNG_CONST png_byte png_sPLT[5] = {115, 80, 76, 84, '\0'} #define PNG_sRGB PNG_CONST png_byte png_sRGB[5] = {115, 82, 71, 66, '\0'} #define PNG_sTER PNG_CONST png_byte png_sTER[5] = {115, 84, 69, 82, '\0'} #define PNG_tEXt PNG_CONST png_byte png_tEXt[5] = {116, 69, 88, 116, '\0'} #define PNG_tIME PNG_CONST png_byte png_tIME[5] = {116, 73, 77, 69, '\0'} #define PNG_tRNS PNG_CONST png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'} #define PNG_zTXt PNG_CONST png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'} #ifdef PNG_APNG_SUPPORTED #define PNG_acTL PNG_CONST png_byte png_acTL[5] = { 97, 99, 84, 76, '\0'} #define PNG_fcTL PNG_CONST png_byte png_fcTL[5] = {102, 99, 84, 76, '\0'} #define PNG_fdAT PNG_CONST png_byte png_fdAT[5] = {102, 100, 65, 84, '\0'} /* For png_struct.apng_flags: */ #define PNG_FIRST_FRAME_HIDDEN 0x0001 #endif /* Inhibit C++ name-mangling for libpng functions but not for system calls. */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* These functions are used internally in the code. They generally * shouldn't be used unless you are writing code to add or replace some * functionality in libpng. More information about most functions can * be found in the files where the functions are located. */ /* Allocate memory for an internal libpng struct */ PNG_EXTERN png_voidp png_create_struct PNGARG((int type)); /* Free memory from internal libpng struct */ PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)); PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)); PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr, png_free_ptr free_fn, png_voidp mem_ptr)); /* Free any memory that info_ptr points to and reset struct. */ PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Function to allocate memory for zlib. PNGAPI is disallowed. */ PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size)); /* Function to free memory for zlib. PNGAPI is disallowed. */ PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)); /* Next four functions are used internally as callbacks. PNGAPI is required * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3. */ PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr, png_bytep data, png_size_t length)); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr, png_bytep buffer, png_size_t length)); #endif PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr, png_bytep data, png_size_t length)); #ifdef PNG_WRITE_FLUSH_SUPPORTED #ifdef PNG_STDIO_SUPPORTED PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr)); #endif #endif /* Reset the CRC variable */ PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)); /* Write the "data" buffer to whatever output you are using */ PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data, png_size_t length)); /* Read and check the PNG file signature */ PNG_EXTERN void png_read_sig PNGARG((png_structp png_ptr, png_infop info_ptr)); /* Read the chunk header (length + type name) */ PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr)); /* Read data from whatever input you are using into the "data" buffer */ PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data, png_size_t length)); /* Read bytes into buf, and update png_ptr->crc */ PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, png_size_t length)); /* Decompress data in a chunk that uses compression */ #if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \ defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr, int comp_type, png_size_t chunklength, png_size_t prefix_length, png_size_t *data_length)); #endif /* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip)); /* Read the CRC from the file and compare it to the libpng calculated CRC */ PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)); /* Calculate the CRC over a section of data. Note that we are only * passing a maximum of 64K on systems that have this as a memory limit, * since this is the maximum buffer size we can specify. */ PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, png_size_t length)); #ifdef PNG_WRITE_FLUSH_SUPPORTED PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); #endif /* Write various chunks */ /* Write the IHDR chunk, and update the png_struct with the necessary * information. */ PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int compression_method, int filter_method, int interlace_method)); PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)); PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data, png_size_t length)); PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)); #ifdef PNG_WRITE_gAMA_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); #endif #ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point file_gamma)); #endif #endif #ifdef PNG_WRITE_sBIT_SUPPORTED PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit, int color_type)); #endif #ifdef PNG_WRITE_cHRM_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr, double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y)); #endif PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, png_fixed_point int_blue_y)); #endif #ifdef PNG_WRITE_sRGB_SUPPORTED PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr, int intent)); #endif #ifdef PNG_WRITE_iCCP_SUPPORTED PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr, png_charp name, int compression_type, png_charp profile, int proflen)); /* Note to maintainer: profile should be png_bytep */ #endif #ifdef PNG_WRITE_sPLT_SUPPORTED PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr, png_sPLT_tp palette)); #endif #ifdef PNG_WRITE_tRNS_SUPPORTED PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans, png_color_16p values, int number, int color_type)); #endif #ifdef PNG_WRITE_bKGD_SUPPORTED PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr, png_color_16p values, int color_type)); #endif #ifdef PNG_WRITE_hIST_SUPPORTED PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist, int num_hist)); #endif #if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, png_charp key, png_charpp new_key)); #endif #ifdef PNG_WRITE_tEXt_SUPPORTED PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key, png_charp text, png_size_t text_len)); #endif #ifdef PNG_WRITE_zTXt_SUPPORTED PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key, png_charp text, png_size_t text_len, int compression)); #endif #ifdef PNG_WRITE_iTXt_SUPPORTED PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr, int compression, png_charp key, png_charp lang, png_charp lang_key, png_charp text)); #endif #ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */ PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, int num_text)); #endif #ifdef PNG_WRITE_oFFs_SUPPORTED PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset, int unit_type)); #endif #ifdef PNG_WRITE_pCAL_SUPPORTED PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)); #endif #ifdef PNG_WRITE_pHYs_SUPPORTED PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr, png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, int unit_type)); #endif #ifdef PNG_WRITE_tIME_SUPPORTED PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr, png_timep mod_time)); #endif #ifdef PNG_WRITE_sCAL_SUPPORTED #if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr, int unit, double width, double height)); #else #ifdef PNG_FIXED_POINT_SUPPORTED PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr, int unit, png_charp width, png_charp height)); #endif #endif #endif #ifdef PNG_WRITE_APNG_SUPPORTED PNG_EXTERN void png_write_acTL PNGARG((png_structp png_ptr, png_uint_32 num_frames, png_uint_32 num_plays)); PNG_EXTERN void png_write_fcTL PNGARG((png_structp png_ptr, png_uint_32 width, png_uint_32 height, png_uint_32 x_offset, png_uint_32 y_offset, png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op, png_byte blend_op)); #endif /* Called when finished processing a row of data */ PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)); /* Internal use only. Called before first row of data */ PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)); #ifdef PNG_READ_GAMMA_SUPPORTED PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr, png_byte bit_depth)); #endif /* Combine a row of data, dealing with alpha, etc. if requested */ PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row, int mask)); #ifdef PNG_READ_INTERLACING_SUPPORTED /* Expand an interlaced row */ /* OLD pre-1.0.9 interface: PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info, png_bytep row, int pass, png_uint_32 transformations)); */ PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)); #endif /* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */ #ifdef PNG_WRITE_INTERLACING_SUPPORTED /* Grab pixels out of a row for an interlaced pass */ PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info, png_bytep row, int pass)); #endif /* Unfilter a row */ PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr, png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter)); /* Choose the best filter to use and filter the row data */ PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, png_row_infop row_info)); /* Write out the filtered row. */ PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr, png_bytep filtered_row)); /* Finish a row while reading, dealing with interlacing passes, etc. */ PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); /* Initialize the row buffers, etc. */ PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)); /* Optional call to update the users info structure */ PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, png_infop info_ptr)); #ifdef PNG_READ_APNG_SUPPORTED /* Private, reset some things to become ready for reading next frame */ PNG_EXTERN void png_read_reset PNGARG((png_structp png_ptr)); PNG_EXTERN void png_read_reinit PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXTERN void png_progressive_read_reset PNGARG((png_structp png_ptr)); #endif #ifdef PNG_WRITE_APNG_SUPPORTED /* Private, reset some things to become ready for writing next frame */ PNG_EXTERN void png_write_reset PNGARG((png_structp png_ptr)); PNG_EXTERN void png_write_reinit PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 width, png_uint_32 height)); #endif /* These are the functions that do the transformations */ #ifdef PNG_READ_FILLER_SUPPORTED PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info, png_bytep row, png_uint_32 filler, png_uint_32 flags)); #endif #ifdef PNG_READ_SWAP_ALPHA_SUPPORTED PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_READ_INVERT_ALPHA_SUPPORTED PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, png_bytep row)); #endif #if defined(PNG_WRITE_FILLER_SUPPORTED) || \ defined(PNG_READ_STRIP_ALPHA_SUPPORTED) PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, png_bytep row, png_uint_32 flags)); #endif #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); #endif #if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ defined(PNG_WRITE_PACKSWAP_SUPPORTED) PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_READ_PACK_SUPPORTED PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_READ_SHIFT_SUPPORTED PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row, png_color_8p sig_bits)); #endif #if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_READ_16_TO_8_SUPPORTED PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_READ_QUANTIZE_SUPPORTED PNG_EXTERN void png_do_quantize PNGARG((png_row_infop row_info, png_bytep row, png_bytep palette_lookup, png_bytep quantize_lookup)); # ifdef PNG_CORRECT_PALETTE_SUPPORTED PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr, png_colorp palette, int num_palette)); # endif #endif #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_WRITE_PACK_SUPPORTED PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)); #endif #ifdef PNG_WRITE_SHIFT_SUPPORTED PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row, png_color_8p bit_depth)); #endif #ifdef PNG_READ_BACKGROUND_SUPPORTED #ifdef PNG_READ_GAMMA_SUPPORTED PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, png_color_16p trans_color, png_color_16p background, png_color_16p background_1, png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1, png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1, png_uint_16pp gamma_16_to_1, int gamma_shift)); #else PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row, png_color_16p trans_color, png_color_16p background)); #endif #endif #ifdef PNG_READ_GAMMA_SUPPORTED PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row, png_bytep gamma_table, png_uint_16pp gamma_16_table, int gamma_shift)); #endif #ifdef PNG_READ_EXPAND_SUPPORTED PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info, png_bytep row, png_colorp palette, png_bytep trans, int num_trans)); PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, png_bytep row, png_color_16p trans_value)); #endif /* The following decodes the appropriate chunks, and does error correction, * then calls the appropriate callback for the chunk if it is valid. */ /* Decode the IHDR chunk */ PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #ifdef PNG_READ_bKGD_SUPPORTED PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_cHRM_SUPPORTED PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_gAMA_SUPPORTED PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_hIST_SUPPORTED PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_iCCP_SUPPORTED PNG_EXTERN void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif /* PNG_READ_iCCP_SUPPORTED */ #ifdef PNG_READ_iTXt_SUPPORTED PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_oFFs_SUPPORTED PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_pCAL_SUPPORTED PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_pHYs_SUPPORTED PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_sBIT_SUPPORTED PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_sCAL_SUPPORTED PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_sPLT_SUPPORTED PNG_EXTERN void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif /* PNG_READ_sPLT_SUPPORTED */ #ifdef PNG_READ_sRGB_SUPPORTED PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_tEXt_SUPPORTED PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_tIME_SUPPORTED PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_tRNS_SUPPORTED PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_zTXt_SUPPORTED PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); #endif #ifdef PNG_READ_APNG_SUPPORTED PNG_EXTERN void png_handle_acTL PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_handle_fcTL PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_have_info PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXTERN void png_handle_fdAT PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_ensure_sequence_number PNGARG((png_structp png_ptr, png_uint_32 length)); PNG_EXTERN void png_ensure_fcTL_is_valid PNGARG((png_structp png_ptr, png_uint_32 width, png_uint_32 height, png_uint_32 x_offset, png_uint_32 y_offset, png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op, png_byte blend_op)); #endif PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, png_bytep chunk_name)); /* Handle the transformations for reading and writing */ PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr)); PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr)); PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr)); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)); PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr, png_uint_32 length)); PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)); PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)); PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr, png_bytep buffer, png_size_t buffer_length)); PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)); PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr, png_bytep buffer, png_size_t buffer_length)); PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)); PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row)); PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr, png_infop info_ptr)); PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr)); #ifdef PNG_READ_tEXt_SUPPORTED PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif #ifdef PNG_READ_zTXt_SUPPORTED PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif #ifdef PNG_READ_iTXt_SUPPORTED PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr, png_uint_32 length)); PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr)); #endif #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ #ifdef PNG_MNG_FEATURES_SUPPORTED PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info, png_bytep row)); PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info, png_bytep row)); #endif /* Added at libpng version 1.4.0 */ #ifdef PNG_cHRM_SUPPORTED PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y, png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x, png_fixed_point int_blue_y)); #endif #ifdef PNG_cHRM_SUPPORTED #ifdef PNG_CHECK_cHRM_SUPPORTED /* Added at libpng version 1.2.34 and 1.4.0 */ PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2, unsigned long *hi_product, unsigned long *lo_product)); #endif #endif /* Added at libpng version 1.4.0 */ PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_type, int compression_type, int filter_type)); /* Free all memory used by the read (old method - NOT DLL EXPORTED) */ PNG_EXTERN void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr)); /* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */ PNG_EXTERN void png_write_destroy PNGARG((png_structp png_ptr)); #ifdef USE_FAR_KEYWORD /* memory model conversion function */ PNG_EXTERN void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr, int check)); #endif /* USE_FAR_KEYWORD */ /* Define PNG_DEBUG at compile time for debugging information. Higher * numbers for PNG_DEBUG mean more debugging information. This has * only been added since version 0.95 so it is not implemented throughout * libpng yet, but more support will be added as needed. */ #ifdef PNG_DEBUG #if (PNG_DEBUG > 0) #if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER) #include #if (PNG_DEBUG > 1) #ifndef _DEBUG # define _DEBUG #endif #ifndef png_debug #define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE) #endif #ifndef png_debug1 #define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1) #endif #ifndef png_debug2 #define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2) #endif #endif #else /* PNG_DEBUG_FILE || !_MSC_VER */ #ifndef PNG_DEBUG_FILE #define PNG_DEBUG_FILE stderr #endif /* PNG_DEBUG_FILE */ #if (PNG_DEBUG > 1) /* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on * non-ISO compilers */ # ifdef __STDC__ # ifndef png_debug # define png_debug(l,m) \ { \ int num_tabs=l; \ fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \ } # endif # ifndef png_debug1 # define png_debug1(l,m,p1) \ { \ int num_tabs=l; \ fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \ } # endif # ifndef png_debug2 # define png_debug2(l,m,p1,p2) \ { \ int num_tabs=l; \ fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \ } # endif # else /* __STDC __ */ # ifndef png_debug # define png_debug(l,m) \ { \ int num_tabs=l; \ char format[256]; \ snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ m,PNG_STRING_NEWLINE); \ fprintf(PNG_DEBUG_FILE,format); \ } # endif # ifndef png_debug1 # define png_debug1(l,m,p1) \ { \ int num_tabs=l; \ char format[256]; \ snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ m,PNG_STRING_NEWLINE); \ fprintf(PNG_DEBUG_FILE,format,p1); \ } # endif # ifndef png_debug2 # define png_debug2(l,m,p1,p2) \ /* Copyright (C) 1999-2003, 2005-2006, 2008-2009 Free Software Foundation, Inc. This file is part of the GNU LIBICONV Library. The GNU LIBICONV Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU LIBICONV Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU LIBICONV Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* When installed, this file is called "iconv.h". */ #ifndef _LIBICONV_H #define _LIBICONV_H #define _LIBICONV_VERSION 0x010D /* version number: (major<<8) + minor */ extern int _libiconv_version; /* Likewise */ /* We would like to #include any system header file which could define iconv_t, 1. in order to eliminate the risk that the user gets compilation errors because some other system header file includes /usr/include/iconv.h which defines iconv_t or declares iconv after this file, 2. when compiling for LIBICONV_PLUG, we need the proper iconv_t type in order to produce binary compatible code. But gcc's #include_next is not portable. Thus, once libiconv's iconv.h has been installed in /usr/local/include, there is no way any more to include the original /usr/include/iconv.h. We simply have to get away without it. Ad 1. The risk that a system header file does #include "iconv.h" or #include_next "iconv.h" is small. They all do #include . Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It has to be a scalar type because (iconv_t)(-1) is a possible return value from iconv_open().) */ /* Define iconv_t ourselves. */ #undef iconv_t #define iconv_t libiconv_t typedef void* iconv_t; /* Get size_t declaration. Get wchar_t declaration if it exists. */ #include /* Get errno declaration and values. */ #include /* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS, have EILSEQ in a different header. On these systems, define EILSEQ ourselves. */ #ifndef EILSEQ #define EILSEQ #endif #ifdef __cplusplus extern "C" { #endif /* Allocates descriptor for code conversion from encoding ‘fromcode’ to encoding ‘tocode’. */ #ifndef LIBICONV_PLUG #define iconv_open libiconv_open #endif extern iconv_t iconv_open (const char* tocode, const char* fromcode); /* Converts, using conversion descriptor ‘cd’, at most ‘*inbytesleft’ bytes starting at ‘*inbuf’, writing at most ‘*outbytesleft’ bytes starting at ‘*outbuf’. Decrements ‘*inbytesleft’ and increments ‘*inbuf’ by the same amount. Decrements ‘*outbytesleft’ and increments ‘*outbuf’ by the same amount. */ #ifndef LIBICONV_PLUG #define iconv libiconv #endif extern size_t iconv (iconv_t cd, const char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft); /* Frees resources allocated for conversion descriptor ‘cd’. */ #ifndef LIBICONV_PLUG #define iconv_close libiconv_close #endif extern int iconv_close (iconv_t cd); #ifndef LIBICONV_PLUG /* Nonstandard extensions. */ #if 1 #if 0 /* Tru64 with Desktop Toolkit C has a bug: must be included before . BSD/OS 4.0.1 has a bug: , and must be included before . */ #include #include #include #endif #include #endif /* A type that holds all memory needed by a conversion descriptor. A pointer to such an object can be used as an iconv_t. */ typedef struct { void* dummy1[28]; #if 1 mbstate_t dummy2; #endif } iconv_allocation_t; /* Allocates descriptor for code conversion from encoding ‘fromcode’ to encoding ‘tocode’ into preallocated memory. Returns an error indicator (0 or -1 with errno set). */ #define iconv_open_into libiconv_open_into extern int iconv_open_into (const char* tocode, const char* fromcode, iconv_allocation_t* resultp); /* Control of attributes. */ #define iconvctl libiconvctl extern int iconvctl (iconv_t cd, int request, void* argument); /* Hook performed after every successful conversion of a Unicode character. */ typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data); /* Hook performed after every successful conversion of a wide character. */ typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data); /* Set of hooks. */ struct iconv_hooks { iconv_unicode_char_hook uc_hook; iconv_wide_char_hook wc_hook; void* data; }; /* Fallback function. Invoked when a small number of bytes could not be converted to a Unicode character. This function should process all bytes from inbuf and may produce replacement Unicode characters by calling the write_replacement callback repeatedly. */ typedef void (*iconv_unicode_mb_to_uc_fallback) (const char* inbuf, size_t inbufsize, void (*write_replacement) (const unsigned int *buf, size_t buflen, void* callback_arg), void* callback_arg, void* data); /* Fallback function. Invoked when a Unicode character could not be converted to the target encoding. This function should process the character and may produce replacement bytes (in the target encoding) by calling the write_replacement callback repeatedly. */ typedef void (*iconv_unicode_uc_to_mb_fallback) (unsigned int code, void (*write_replacement) (const char *buf, size_t buflen, void* callback_arg), void* callback_arg, void* data); #if 1 /* Fallback function. Invoked when a number of bytes could not be converted to a wide character. This function should process all bytes from inbuf and may produce replacement wide characters by calling the write_replacement callback repeatedly. */ typedef void (*iconv_wchar_mb_to_wc_fallback) (const char* inbuf, size_t inbufsize, void (*write_replacement) (const wchar_t *buf, size_t buflen, void* callback_arg), void* callback_arg, void* data); /* Fallback function. Invoked when a wide character could not be converted to the target encoding. This function should process the character and may produce replacement bytes (in the target encoding) by calling the write_replacement callback repeatedly. */ typedef void (*iconv_wchar_wc_to_mb_fallback) (wchar_t code, void (*write_replacement) (const char *buf, size_t buflen, void* callback_arg), void* callback_arg, void* data); #else /* If the wchar_t type does not exist, these two fallback functions are never invoked. Their argument list therefore does not matter. */ typedef void (*iconv_wchar_mb_to_wc_fallback) (); typedef void (*iconv_wchar_wc_to_mb_fallback) (); #endif /* Set of fallbacks. */ struct iconv_fallbacks { iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback; iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback; iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback; iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback; void* data; }; /* Requests for iconvctl. */ #define ICONV_TRIVIALP 0 /* int *argument */ #define ICONV_GET_TRANSLITERATE 1 /* int *argument */ #define ICONV_SET_TRANSLITERATE 2 /* const int *argument */ #define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */ #define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */ #define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */ #define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */ /* Listing of locale independent encodings. */ #define iconvlist libiconvlist extern void iconvlist (int (*do_one) (unsigned int namescount, const char * const * names, void* data), void* data); /* Canonicalize an encoding name. The result is either a canonical encoding name, or name itself. */ extern const char * iconv_canonicalize (const char * name); /* Support for relocatable packages. */ /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ extern void libiconv_set_relocation_prefix (const char *orig_prefix, const char *curr_prefix); #endif #ifdef __cplusplus } #endif #endif /* _LIBICONV_H */ /* Copyright (C) 2003 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. The GNU CHARSET Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU CHARSET Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU CHARSET Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBCHARSET_H #define _LIBCHARSET_H #include #ifdef __cplusplus extern "C" { #endif /* Support for relocatable packages. */ /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */ extern void libcharset_set_relocation_prefix (const char *orig_prefix, const char *curr_prefix); #ifdef __cplusplus } #endif #endif /* _LIBCHARSET_H */  . .. libart_lgpl/* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_BPATH_H__ #define __ART_BPATH_H__ #ifdef LIBART_COMPILATION #include "art_misc.h" #include "art_point.h" #include "art_pathcode.h" #else #include #include #include #endif /* Basic data structures and constructors for bezier paths */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _ArtBpath ArtBpath; struct _ArtBpath { /*< public >*/ ArtPathcode code; double x1; double y1; double x2; double y2; double x3; double y3; }; ArtBpath * art_bpath_affine_transform (const ArtBpath *src, const double matrix[6]); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_BPATH_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_PATHCODE_H__ #define __ART_PATHCODE_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef enum { ART_MOVETO, ART_MOVETO_OPEN, ART_CURVETO, ART_LINETO, ART_END } ArtPathcode; #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_PATHCODE_H__ */ K . ..Lfreetype>/* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_FILTERLEVEL_H__ #define __ART_FILTERLEVEL_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef enum { ART_FILTER_NEAREST, ART_FILTER_TILES, ART_FILTER_BILINEAR, ART_FILTER_HYPER } ArtFilterLevel; /* NEAREST is nearest neighbor. It is the fastest and lowest quality. TILES is an accurate simulation of the PostScript image operator without any interpolation enabled; each pixel is rendered as a tiny parallelogram of solid color, the edges of which are implemented with antialiasing. It resembles nearest neighbor for enlargement, and bilinear for reduction. BILINEAR is bilinear interpolation. For enlargement, it is equivalent to point-sampling the ideal bilinear-interpolated image. For reduction, it is equivalent to laying down small tiles and integrating over the coverage area. HYPER is the highest quality reconstruction function. It is derived from the hyperbolic filters in Wolberg's "Digital Image Warping," and is formally defined as the hyperbolic-filter sampling the ideal hyperbolic-filter interpolated image (the filter is designed to be idempotent for 1:1 pixel mapping). It is the slowest and highest quality. Note: at this stage of implementation, most filter modes are likely not to be implemented. Note: cubic filtering is missing from this list, because there isn't much point - hyper is just as fast to implement and slightly better in quality. */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_PATHCODE_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* Render a sorted vector path into a graymap. */ #ifndef __ART_GRAY_SVP_H__ #define __ART_GRAY_SVP_H__ #ifdef LIBART_COMPILATION #include "art_misc.h" #include "art_svp.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void art_gray_svp_aa (const ArtSVP *svp, int x0, int y0, int x1, int y1, art_u8 *buf, int rowstride); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_GRAY_SVP_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* Simple macros to set up storage allocation and basic types for libart functions. */ #ifndef __ART_MISC_H__ #define __ART_MISC_H__ #include /* for malloc, etc. */ /* The art_config.h file is automatically generated by gen_art_config.c and contains definitions of ART_SIZEOF_{CHAR,SHORT,INT,LONG} and art_u{8,16,32}. */ #ifdef LIBART_COMPILATION #include "art_config.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif void *art_alloc(size_t size); void art_free(void *ptr); void *art_realloc(void *ptr, size_t size); #ifdef __cplusplus } #endif /* __cplusplus */ /* These aren't, strictly speaking, configuration macros, but they're damn handy to have around, and may be worth playing with for debugging. */ #define art_new(type, n) ((type *)art_alloc ((n) * sizeof(type))) #define art_renew(p, type, n) ((type *)art_realloc (p, (n) * sizeof(type))) /* This one must be used carefully - in particular, p and max should be variables. They can also be pstruct->el lvalues. */ #define art_expand(p, type, max) do { if(max) { p = art_renew (p, type, max <<= 1); } else { max = 1; p = art_new(type, 1); } } while (0) typedef int art_boolean; #define ART_FALSE 0 #define ART_TRUE 1 /* define pi */ #ifndef M_PI #define M_PI 3.14159265358979323846 #endif /* M_PI */ #ifndef M_SQRT2 #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ #endif /* M_SQRT2 */ /* Provide macros to feature the GCC function attribute. */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)) #define ART_GNUC_PRINTF( format_idx, arg_idx ) \ __attribute__((__format__ (__printf__, format_idx, arg_idx))) #define ART_GNUC_NORETURN \ __attribute__((__noreturn__)) #else /* !__GNUC__ */ #define ART_GNUC_PRINTF( format_idx, arg_idx ) #define ART_GNUC_NORETURN #endif /* !__GNUC__ */ #ifdef __cplusplus extern "C" { #endif void ART_GNUC_NORETURN art_die (const char *fmt, ...) ART_GNUC_PRINTF (1, 2); void art_warn (const char *fmt, ...) ART_GNUC_PRINTF (1, 2); void art_dprint (const char *fmt, ...) ART_GNUC_PRINTF (1, 2); #ifdef __cplusplus } #endif #define ART_USE_NEW_INTERSECTOR #endif /* __ART_MISC_H__ */ * The vector angle. * */ FT_EXPORT( void ) FT_Vector_From_Polar( FT_Vector* vec, FT_Fixed length, FT_Angle angle ); /* */ FT_END_HEADER #endif /* __FTTRIGON_H__ */ /* END */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_PIXBUF_H__ #define __ART_PIXBUF_H__ /* A generic data structure for holding a buffer of pixels. One way to think about this module is as a virtualization over specific pixel buffer formats. */ #ifdef LIBART_COMPILATION #include "art_misc.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif typedef void (*ArtDestroyNotify) (void *func_data, void *data); typedef struct _ArtPixBuf ArtPixBuf; typedef enum { ART_PIX_RGB /* gray, cmyk, lab, ... ? */ } ArtPixFormat; /* The pixel buffer consists of width * height pixels, each of which has n_channels samples. It is stored in simple packed format. */ struct _ArtPixBuf { /*< public >*/ ArtPixFormat format; int n_channels; int has_alpha; int bits_per_sample; art_u8 *pixels; int width; int height; int rowstride; void *destroy_data; ArtDestroyNotify destroy; }; /* allocate an ArtPixBuf from art_alloc()ed pixels (automated destruction) */ ArtPixBuf * art_pixbuf_new_rgb (art_u8 *pixels, int width, int height, int rowstride); ArtPixBuf * art_pixbuf_new_rgba (art_u8 *pixels, int width, int height, int rowstride); /* allocate an ArtPixBuf from constant pixels (no destruction) */ ArtPixBuf * art_pixbuf_new_const_rgb (const art_u8 *pixels, int width, int height, int rowstride); ArtPixBuf * art_pixbuf_new_const_rgba (const art_u8 *pixels, int width, int height, int rowstride); /* allocate an ArtPixBuf and notify creator upon destruction */ ArtPixBuf * art_pixbuf_new_rgb_dnotify (art_u8 *pixels, int width, int height, int rowstride, void *dfunc_data, ArtDestroyNotify dfunc); ArtPixBuf * art_pixbuf_new_rgba_dnotify (art_u8 *pixels, int width, int height, int rowstride, void *dfunc_data, ArtDestroyNotify dfunc); /* free an ArtPixBuf with destroy notification */ void art_pixbuf_free (ArtPixBuf *pixbuf); /* deprecated function, use the _dnotify variants for allocation instead */ void art_pixbuf_free_shallow (ArtPixBuf *pixbuf); ArtPixBuf * art_pixbuf_duplicate (const ArtPixBuf *pixbuf); #ifdef __cplusplus } #endif #endif ot * irregular for OpenType fonts to have more than 4 subtables, * because variation selector subtables are available for Apple * and Microsoft platforms. */ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS #define FT_MAX_CHARMAP_CACHEABLE 15 #endif /* * This macro is defined if either unpatented or native TrueType * hinting is requested by the definitions above. */ #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #define TT_USE_BYTECODE_INTERPRETER #undef TT_CONFIG_OPTION_UNPATENTED_HINTING #elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING #define TT_USE_BYTECODE_INTERPRETER #endif FT_END_HEADER #endif /* __FTOPTION_H__ */ /* END */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_POINT_H__ #define __ART_POINT_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _ArtPoint ArtPoint; struct _ArtPoint { /*< public >*/ double x, y; }; #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_POINT_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_RECT_H__ #define __ART_RECT_H__ #ifdef __cplusplus extern "C" { #endif typedef struct _ArtDRect ArtDRect; typedef struct _ArtIRect ArtIRect; struct _ArtDRect { /*< public >*/ double x0, y0, x1, y1; }; struct _ArtIRect { /*< public >*/ int x0, y0, x1, y1; }; /* Make a copy of the rectangle. */ void art_irect_copy (ArtIRect *dest, const ArtIRect *src); /* Find the smallest rectangle that includes both source rectangles. */ void art_irect_union (ArtIRect *dest, const ArtIRect *src1, const ArtIRect *src2); /* Return the intersection of the two rectangles */ void art_irect_intersect (ArtIRect *dest, const ArtIRect *src1, const ArtIRect *src2); /* Return true if the rectangle is empty. */ int art_irect_empty (const ArtIRect *src); /* Make a copy of the rectangle. */ void art_drect_copy (ArtDRect *dest, const ArtDRect *src); /* Find the smallest rectangle that includes both source rectangles. */ void art_drect_union (ArtDRect *dest, const ArtDRect *src1, const ArtDRect *src2); /* Return the intersection of the two rectangles */ void art_drect_intersect (ArtDRect *dest, const ArtDRect *src1, const ArtDRect *src2); /* Return true if the rectangle is empty. */ int art_drect_empty (const ArtDRect *src); void art_drect_affine_transform (ArtDRect *dst, const ArtDRect *src, const double matrix[6]); void art_drect_to_irect (ArtIRect *dst, ArtDRect *src); #ifdef __cplusplus } #endif #endif /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_RECT_SVP_H__ #define __ART_RECT_SVP_H__ /* Find the bounding box of a sorted vector path. */ #ifdef LIBART_COMPILATION #include "art_svp.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void art_drect_svp (ArtDRect *bbox, const ArtSVP *svp); /* Compute the bounding box of the svp and union it in to the existing bounding box. */ void art_drect_svp_union (ArtDRect *bbox, const ArtSVP *svp); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_RECT_SVP_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_RECT_UTA_H__ #define __ART_RECT_UTA_H__ #ifdef LIBART_COMPILATION #include "art_rect.h" #include "art_uta.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ ArtIRect * art_rect_list_from_uta (ArtUta *uta, int max_width, int max_height, int *p_nrects); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_RECT_UTA_H__ */ */ /* */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Outline_Get_BBox( FT_Outline* outline, FT_BBox *abbox ); /* */ FT_END_HEADER #endif /* __FTBBOX_H__ */ /* END */ /* Local Variables: */ /* coding: utf-8 */ /* End: */ /* * art_render.h: Modular rendering architecture. * * Libart_LGPL - library of basic graphic primitives * Copyright (C) 2000 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_RENDER_H__ #define __ART_RENDER_H__ #ifdef LIBART_COMPILATION #include "art_alphagamma.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Render object */ #ifndef ART_MAX_DEPTH #define ART_MAX_DEPTH 16 #endif #if ART_MAX_DEPTH == 16 typedef art_u16 ArtPixMaxDepth; #define ART_PIX_MAX_FROM_8(x) ((x) | ((x) << 8)) #define ART_PIX_8_FROM_MAX(x) (((x) + 0x80 - (((x) + 0x80) >> 8)) >> 8) #else #if ART_MAX_DEPTH == 8 typedef art_u8 ArtPixMaxDepth; #define ART_PIX_MAX_FROM_8(x) (x) #define ART_PIX_8_FROM_MAX(x) (x) #else #error ART_MAX_DEPTH must be either 8 or 16 #endif #endif #define ART_MAX_CHAN 16 typedef struct _ArtRender ArtRender; typedef struct _ArtRenderCallback ArtRenderCallback; typedef struct _ArtRenderMaskRun ArtRenderMaskRun; typedef struct _ArtImageSource ArtImageSource; typedef struct _ArtMaskSource ArtMaskSource; typedef enum { ART_ALPHA_NONE = 0, ART_ALPHA_SEPARATE = 1, ART_ALPHA_PREMUL = 2 } ArtAlphaType; typedef enum { ART_COMPOSITE_NORMAL, ART_COMPOSITE_MULTIPLY, /* todo: more */ ART_COMPOSITE_CUSTOM } ArtCompositingMode; typedef enum { ART_IMAGE_SOURCE_CAN_CLEAR = 1, ART_IMAGE_SOURCE_CAN_COMPOSITE = 2 } ArtImageSourceFlags; struct _ArtRenderMaskRun { int x; int alpha; }; struct _ArtRenderCallback { void (*render) (ArtRenderCallback *self, ArtRender *render, art_u8 *dest, int y); void (*done) (ArtRenderCallback *self, ArtRender *render); }; struct _ArtImageSource { ArtRenderCallback super; void (*negotiate) (ArtImageSource *self, ArtRender *render, ArtImageSourceFlags *p_flags, int *p_buf_depth, ArtAlphaType *p_alpha_type); }; struct _ArtMaskSource { ArtRenderCallback super; int (*can_drive) (ArtMaskSource *self, ArtRender *render); /* For each mask source, ::prepare() is invoked if it is not a driver, or ::invoke_driver() if it is. */ void (*invoke_driver) (ArtMaskSource *self, ArtRender *render); void (*prepare) (ArtMaskSource *self, ArtRender *render, art_boolean first); }; struct _ArtRender { /* parameters of destination image */ int x0, y0; int x1, y1; art_u8 *pixels; int rowstride; int n_chan; int depth; ArtAlphaType alpha_type; art_boolean clear; ArtPixMaxDepth clear_color[ART_MAX_CHAN + 1]; art_u32 opacity; /* [0..0x10000] */ ArtCompositingMode compositing_mode; ArtAlphaGamma *alphagamma; art_u8 *alpha_buf; /* parameters of intermediate buffer */ int buf_depth; ArtAlphaType buf_alpha; art_u8 *image_buf; /* driving alpha scanline data */ /* A "run" is a contiguous sequence of x values with the same alpha value. */ int n_run; ArtRenderMaskRun *run; /* A "span" is a contiguous sequence of x values with non-zero alpha. */ int n_span; int *span_x; art_boolean need_span; }; ArtRender * art_render_new (int x0, int y0, int x1, int y1, art_u8 *pixels, int rowstride, int n_chan, int depth, ArtAlphaType alpha_type, ArtAlphaGamma *alphagamma); void art_render_invoke (ArtRender *render); void art_render_clear (ArtRender *render, const ArtPixMaxDepth *clear_color); void art_render_clear_rgb (ArtRender *rende/* * art_render_gradient.h: Gradient image source for modular rendering. * * Libart_LGPL - library of basic graphic primitives * Copyright (C) 2000 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Authors: Raph Levien * Alexander Larsson */ #ifndef __ART_RENDER_GRADIENT_H__ #define __ART_RENDER_GRADIENT_H__ #ifdef LIBART_COMPILATION #include "art_filterlevel.h" #include "art_render.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _ArtGradientLinear ArtGradientLinear; typedef struct _ArtGradientRadial ArtGradientRadial; typedef struct _ArtGradientStop ArtGradientStop; typedef enum { ART_GRADIENT_PAD, ART_GRADIENT_REFLECT, ART_GRADIENT_REPEAT } ArtGradientSpread; struct _ArtGradientLinear { double a; double b; double c; ArtGradientSpread spread; int n_stops; ArtGradientStop *stops; }; struct _ArtGradientRadial { double affine[6]; /* transforms user coordinates to unit circle */ double fx, fy; /* focal point in unit circle coords */ int n_stops; ArtGradientStop *stops; }; struct _ArtGradientStop { double offset; ArtPixMaxDepth color[ART_MAX_CHAN + 1]; }; void art_render_gradient_linear (ArtRender *render, const ArtGradientLinear *gradient, ArtFilterLevel level); void art_render_gradient_radial (ArtRender *render, const ArtGradientRadial *gradient, ArtFilterLevel level); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_RENDER_GRADIENT_H__ */ /* * art_render_mask.h: Alpha mask source for modular rendering. * * Libart_LGPL - library of basic graphic primitives * Copyright (C) 2000 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Authors: Raph Levien */ #ifndef __ART_RENDER_MASK_H__ #define __ART_RENDER_MASK_H__ #ifdef LIBART_COMPILATION #include "art_render.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void art_render_mask (ArtRender *render, int x0, int y0, int x1, int y1, const art_u8 *mask_buf, int rowstride); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_RENDER_MASK_H__ */ /* * art_render_svp.h: SVP mask source for modular rendering. * * Libart_LGPL - library of basic graphic primitives * Copyright (C) 2000 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * Authors: Raph Levien */ #ifndef __ART_RENDER_SVP_H__ #define __ART_RENDER_SVP_H__ #ifdef LIBART_COMPILATION #include "art_render.h" #include "art_svp.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void art_render_svp (ArtRender *render, const ArtSVP *svp); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_RENDER_SVP_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_RGB_H__ #define __ART_RGB_H__ #ifdef LIBART_COMPILATION #include "art_misc.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif void art_rgb_fill_run (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int n); void art_rgb_run_alpha (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int alpha, int n); #ifdef __cplusplus } #endif #endif */ /* */ /* @FT_New_Face_From_FSRef is identical to @FT_New_Face except */ /* it accepts an FSRef instead of a path. */ /* */ FT_EXPORT( FT_Error ) FT_New_Face_From_FSRef( FT_Library library, const FSRef *ref, FT_Long face_index, FT_Face *aface ) FT_DEPRECATED_ATTRIBUTE; /* */ FT_END_HEADER #endif /* __FTMAC_H__ */ /* END */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_RGB_A_AFFINE_H__ #define __ART_RGB_A_AFFINE_H__ /* This module handles compositing of affine-transformed alpha only images over rgb pixel buffers. */ #ifdef LIBART_COMPILATION #include "art_filterlevel.h" #include "art_alphagamma.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif void art_rgb_a_affine (art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride, const art_u8 *src, int src_width, int src_height, int src_rowstride, art_u32 rgb, const double affine[6], ArtFilterLevel level, ArtAlphaGamma *alphagamma); #ifdef __cplusplus } #endif #endif /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_RGB_SVP_H__ #define __ART_RGB_SVP_H__ /* Render a sorted vector path into an RGB buffer. */ #ifdef LIBART_COMPILATION #include "art_alphagamma.h" #include "art_svp.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void art_rgb_svp_aa (const ArtSVP *svp, int x0, int y0, int x1, int y1, art_u32 fg_color, art_u32 bg_color, art_u8 *buf, int rowstride, ArtAlphaGamma *alphagamma); void art_rgb_svp_alpha (const ArtSVP *svp, int x0, int y0, int x1, int y1, art_u32 rgba, art_u8 *buf, int rowstride, ArtAlphaGamma *alphagamma); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_RGB_SVP_H__ */ M .L ..N ftconfig.h>O ftheader.h>P ftmodule.h>Q ftoption.h>R ftstdlib.h> */ /* face :: */ /* Input face handle. */ /* */ /* */ /* Font format string. NULL in case of error. */ /* */ FT_EXPORT( const char* ) FT_Get_X11_Font_Format( FT_Face face ); /* */ FT_END_HEADER #endif /* __FTXF86_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_RGB_AFFINE_H__ #define __ART_RGB_AFFINE_H__ /* This module handles compositing of affine-transformed rgb images over rgb pixel buffers. */ #ifdef LIBART_COMPILATION #include "art_filterlevel.h" #include "art_alphagamma.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif void art_rgb_affine (art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride, const art_u8 *src, int src_width, int src_height, int src_rowstride, const double affine[6], ArtFilterLevel level, ArtAlphaGamma *alphagamma); #ifdef __cplusplus } #endif #endif /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_RGB_RGBA_AFFINE_H__ #define __ART_RGB_RGBA_AFFINE_H__ /* This module handles compositing of affine-transformed rgba images over rgb pixel buffers. */ #ifdef LIBART_COMPILATION #include "art_filterlevel.h" #include "art_alphagamma.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif void art_rgb_rgba_affine (art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride, const art_u8 *src, int src_width, int src_height, int src_rowstride, const double affine[6], ArtFilterLevel level, ArtAlphaGamma *alphagamma); #ifdef __cplusplus } #endif #endif /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_RGB_BITMAP_AFFINE_H__ #define __ART_RGB_BITMAP_AFFINE_H__ /* This module handles compositing of affine-transformed bitmap images over rgb pixel buffers. */ #ifdef LIBART_COMPILATION #include "art_filterlevel.h" #include "art_alphagamma.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif void art_rgb_bitmap_affine (art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride, const art_u8 *src, int src_width, int src_height, int src_rowstride, art_u32 rgba, const double affine[6], ArtFilterLevel level, ArtAlphaGamma *alphagamma); #ifdef __cplusplus } #endif #endif /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_RGB_PIXBUF_AFFINE_H__ #define __ART_RGB_PIXBUF_AFFINE_H__ /* This module handles compositing of affine-transformed generic pixbuf images over rgb pixel buffers. */ #ifdef LIBART_COMPILATION #include "art_filterlevel.h" #include "art_alphagamma.h" #include "art_pixbuf.h" #else #include #include #include #endif #ifdef __cplusplus extern "C" { #endif void art_rgb_pixbuf_affine (art_u8 *dst, int x0, int y0, int x1, int y1, int dst_rowstride, const ArtPixBuf *pixbuf, const double affine[6], ArtFilterLevel level, ArtAlphaGamma *alphagamma); #ifdef __cplusplus } #endif #endif /* * art_rgba.h: Functions for manipulating RGBA pixel data. * * Libart_LGPL - library of basic graphic primitives * Copyright (C) 2000 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_RGBA_H__ #define __ART_RGBA_H__ #ifdef LIBART_COMPILATION #include "art_misc.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void art_rgba_rgba_composite (art_u8 *dst, const art_u8 *src, int n); void art_rgba_fill_run (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int n); void art_rgba_run_alpha (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int alpha, int n); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_SVP_H__ #define __ART_SVP_H__ /* Basic data structures and constructors for sorted vector paths */ #ifdef LIBART_COMPILATION #include "art_rect.h" #include "art_point.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _ArtSVP ArtSVP; typedef struct _ArtSVPSeg ArtSVPSeg; struct _ArtSVPSeg { int n_points; int dir; /* == 0 for "up", 1 for "down" */ ArtDRect bbox; ArtPoint *points; }; struct _ArtSVP { int n_segs; ArtSVPSeg segs[1]; }; int art_svp_add_segment (ArtSVP **p_vp, int *pn_segs_max, int **pn_points_max, int n_points, int dir, ArtPoint *points, ArtDRect *bbox); void art_svp_free (ArtSVP *svp); int art_svp_seg_compare (const void *s1, const void *s2); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_SVP_H__ */ _BUILD_LIBRARY #define FT_INTERNAL_INTERNAL_H #include FT_INTERNAL_INTERNAL_H #endif /* FT2_BUILD_LIBRARY */ #endif /* __FT2_BUILD_H__ */ /* END */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 2001 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_SVP_INTERSECT_H__ #define __ART_SVP_INTERSECT_H__ /* The funky new SVP intersector. */ #ifdef LIBART_COMPILATION #include "art_svp.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifndef ART_WIND_RULE_DEFINED #define ART_WIND_RULE_DEFINED typedef enum { ART_WIND_RULE_NONZERO, ART_WIND_RULE_INTERSECT, ART_WIND_RULE_ODDEVEN, ART_WIND_RULE_POSITIVE } ArtWindRule; #endif typedef struct _ArtSvpWriter ArtSvpWriter; struct _ArtSvpWriter { int (*add_segment) (ArtSvpWriter *self, int wind_left, int delta_wind, double x, double y); void (*add_point) (ArtSvpWriter *self, int seg_id, double x, double y); void (*close_segment) (ArtSvpWriter *self, int seg_id); }; ArtSvpWriter * art_svp_writer_rewind_new (ArtWindRule rule); ArtSVP * art_svp_writer_rewind_reap (ArtSvpWriter *self); int art_svp_seg_compare (const void *s1, const void *s2); void art_svp_intersector (const ArtSVP *in, ArtSvpWriter *out); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_SVP_INTERSECT_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_SVP_OPS_H__ #define __ART_SVP_OPS_H__ #ifdef LIBART_COMPILATION #include "art_svp.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Vector path set operations, over sorted vpaths. */ ArtSVP *art_svp_union (const ArtSVP *svp1, const ArtSVP *svp2); ArtSVP *art_svp_intersect (const ArtSVP *svp1, const ArtSVP *svp2); ArtSVP *art_svp_diff (const ArtSVP *svp1, const ArtSVP *svp2); ArtSVP *art_svp_minus (const ArtSVP *svp1, const ArtSVP *svp2); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_SVP_OPS_H__ */ T_ClassicKern_Validate. * * @note: * This function must be used to free the buffer allocated by * @FT_ClassicKern_Validate only. */ FT_EXPORT( void ) FT_ClassicKern_Free( FT_Face face, FT_Bytes table ); /* */ FT_END_HEADER #endif /* __FTGXVAL_H__ */ /* END */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1999 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_SVP_POINT_H__ #define __ART_SVP_POINT_H__ /* Determine whether a point is inside, or near, an svp. */ #ifdef LIBART_COMPILATION #include "art_svp.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ int art_svp_point_wind (ArtSVP *svp, double x, double y); double art_svp_point_dist (ArtSVP *svp, double x, double y); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_SVP_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_SVP_RENDER_AA_H__ #define __ART_SVP_RENDER_AA_H__ /* The spiffy antialiased renderer for sorted vector paths. */ #ifdef LIBART_COMPILATION #include "art_svp.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _ArtSVPRenderAAStep ArtSVPRenderAAStep; typedef struct _ArtSVPRenderAAIter ArtSVPRenderAAIter; struct _ArtSVPRenderAAStep { int x; int delta; /* stored with 16 fractional bits */ }; ArtSVPRenderAAIter * art_svp_render_aa_iter (const ArtSVP *svp, int x0, int y0, int x1, int y1); void art_svp_render_aa_iter_step (ArtSVPRenderAAIter *iter, int *p_start, ArtSVPRenderAAStep **p_steps, int *p_n_steps); void art_svp_render_aa_iter_done (ArtSVPRenderAAIter *iter); void art_svp_render_aa (const ArtSVP *svp, int x0, int y0, int x1, int y1, void (*callback) (void *callback_data, int y, int start, ArtSVPRenderAAStep *steps, int n_steps), void *callback_data); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_SVP_RENDER_AA_H__ */ h zlib support. */ FT_EXPORT( FT_Error ) FT_Stream_OpenGzip( FT_Stream stream, FT_Stream source ); /* */ FT_END_HEADER #endif /* __FTGZIP_H__ */ /* END */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_SVP_VPATH_H__ #define __ART_SVP_VPATH_H__ #ifdef LIBART_COMPILATION #include "art_svp.h" #include "art_vpath.h" #else #include #include #endif /* Sort vector paths into sorted vector paths. */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ ArtSVP * art_svp_from_vpath (ArtVpath *vpath); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_SVP_VPATH_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_SVP_VPATH_STROKE_H__ #define __ART_SVP_VPATH_STROKE_H__ /* Sort vector paths into sorted vector paths. */ #ifdef LIBART_COMPILATION #include "art_svp.h" #include "art_vpath.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef enum { ART_PATH_STROKE_JOIN_MITER, ART_PATH_STROKE_JOIN_ROUND, ART_PATH_STROKE_JOIN_BEVEL } ArtPathStrokeJoinType; typedef enum { ART_PATH_STROKE_CAP_BUTT, ART_PATH_STROKE_CAP_ROUND, ART_PATH_STROKE_CAP_SQUARE } ArtPathStrokeCapType; ArtSVP * art_svp_vpath_stroke (ArtVpath *vpath, ArtPathStrokeJoinType join, ArtPathStrokeCapType cap, double line_width, double miter_limit, double flatness); /* This version may have winding numbers exceeding 1. */ ArtVpath * art_svp_vpath_stroke_raw (ArtVpath *vpath, ArtPathStrokeJoinType join, ArtPathStrokeCapType cap, double line_width, double miter_limit, double flatness); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_SVP_VPATH_STROKE_H__ */ ted. */ /* */ FT_EXPORT( void ) FT_List_Finalize( FT_List list, FT_List_Destructor destroy, FT_Memory memory, void* user ); /* */ FT_END_HEADER #endif /* __FTLIST_H__ */ /* END */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_SVP_WIND_H__ #define __ART_SVP_WIND_H__ /* Primitive intersection and winding number operations on sorted vector paths. */ #ifdef LIBART_COMPILATION #include "art_svp.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifndef ART_WIND_RULE_DEFINED #define ART_WIND_RULE_DEFINED typedef enum { ART_WIND_RULE_NONZERO, ART_WIND_RULE_INTERSECT, ART_WIND_RULE_ODDEVEN, ART_WIND_RULE_POSITIVE } ArtWindRule; #endif ArtSVP * art_svp_uncross (ArtSVP *vp); ArtSVP * art_svp_rewind_uncrossed (ArtSVP *vp, ArtWindRule rule); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_SVP_WIND_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_UTA_H__ #define __ART_UTA_H__ /* Basic data structures and constructors for microtile arrays */ #ifdef LIBART_COMPILATION #include "art_misc.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef art_u32 ArtUtaBbox; typedef struct _ArtUta ArtUta; #define ART_UTA_BBOX_CONS(x0, y0, x1, y1) (((x0) << 24) | ((y0) << 16) | \ ((x1) << 8) | (y1)) #define ART_UTA_BBOX_X0(ub) ((ub) >> 24) #define ART_UTA_BBOX_Y0(ub) (((ub) >> 16) & 0xff) #define ART_UTA_BBOX_X1(ub) (((ub) >> 8) & 0xff) #define ART_UTA_BBOX_Y1(ub) ((ub) & 0xff) #define ART_UTILE_SHIFT 5 #define ART_UTILE_SIZE (1 << ART_UTILE_SHIFT) /* Coordinates are shifted right by ART_UTILE_SHIFT wrt the real coordinates. */ struct _ArtUta { int x0; int y0; int width; int height; ArtUtaBbox *utiles; }; ArtUta * art_uta_new (int x0, int y0, int x1, int y1); ArtUta * art_uta_new_coords (int x0, int y0, int x1, int y1); void art_uta_free (ArtUta *uta); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_UTA_H__ */ ORT( FT_Error ) FT_Stream_OpenLZW( FT_Stream stream, FT_Stream source ); /* */ FT_END_HEADER #endif /* __FTLZW_H__ */ /* END */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_UTA_OPS_H__ #define __ART_UTA_OPS_H__ /* Basic operations on microtile arrays */ #ifdef LIBART_COMPILATION #include "art_uta.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ ArtUta * art_uta_union (ArtUta *uta1, ArtUta *uta2); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_UTA_OPS_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_UTA_RECT_H__ #define __ART_UTA_RECT_H__ #ifdef LIBART_COMPILATION #include "art_rect.h" #include "art_uta.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ ArtUta * art_uta_from_irect (ArtIRect *bbox); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_UTA_RECT_H__ */ ' ) #define TTAG_PCLT FT_MAKE_TAG( 'P', 'C', 'L', 'T' ) #define TTAG_POST FT_MAKE_TAG( 'P', 'O', 'S', 'T' ) #define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' ) #define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' ) #define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' ) #define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' ) #define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' ) #define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' ) #define TTAG_true FT_MAKE_TAG( 't', 'r', 'u', 'e' ) #define TTAG_ttc FT_MAKE_TAG( 't', 't', 'c', ' ' ) #define TTAG_ttcf FT_MAKE_TAG( 't', 't', 'c', 'f' ) #define TTAG_TYP1 FT_MAKE_TAG( 'T', 'Y', 'P', '1' ) #define TTAG_typ1 FT_MAKE_TAG( 't', 'y', 'p', '1' ) #define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' ) #define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' ) #define TTAG_vmtx FT_MAKE_TAG( 'v', 'm', 't', 'x' ) FT_END_HEADER #endif /* __TTAGS_H__ */ /* END */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_UTA_SVP_H__ #define __ART_UTA_SVP_H__ /* Basic data structures and constructors for microtile arrays */ #ifdef LIBART_COMPILATION #include "art_svp.h" #include "art_uta.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ ArtUta * art_uta_from_svp (const ArtSVP *svp); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_UTA_SVP_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_UTA_VPATH_H__ #define __ART_UTA_VPATH_H__ /* Basic data structures and constructors for microtile arrays */ #ifdef LIBART_COMPILATION #include "art_uta.h" #include "art_vpath.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ ArtUta * art_uta_from_vpath (const ArtVpath *vec); /* This is a private function: */ void art_uta_add_line (ArtUta *uta, double x0, double y0, double x1, double y1, int *rbuf, int rbuf_rowstride); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_UTA_VPATH_H__ */ # This file contains a table of character encoding aliases, # suitable for operating system 'freebsd8.1'. # It was automatically generated from config.charset. # Packages using this file: US-ASCII ASCII ISO8859-1 ISO-8859-1 ISO_8859-1 ISO-8859-1 ISO8859-2 ISO-8859-2 ISO_8859-2 ISO-8859-2 ISO8859-4 ISO-8859-4 ISO_8859-4 ISO-8859-4 ISO8859-5 ISO-8859-5 ISO_8859-5 ISO-8859-5 ISO8859-7 ISO-8859-7 ISO_8859-7 ISO-8859-7 ISO8859-9 ISO-8859-9 ISO_8859-9 ISO-8859-9 ISO8859-13 ISO-8859-13 ISO_8859-13 ISO-8859-13 ISO8859-15 ISO-8859-15 ISO_8859-15 ISO-8859-15 eucCN GB2312 eucJP EUC-JP eucKR EUC-KR Big5 BIG5 SJIS SHIFT_JIS Shift_JIS SHIFT_JIS /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_VPATH_H__ #define __ART_VPATH_H__ #ifdef LIBART_COMPILATION #include "art_rect.h" #include "art_pathcode.h" #else #include #include #endif /* Basic data structures and constructors for simple vector paths */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _ArtVpath ArtVpath; /* CURVETO is not allowed! */ struct _ArtVpath { ArtPathcode code; double x; double y; }; /* Some of the functions need to go into their own modules */ void art_vpath_add_point (ArtVpath **p_vpath, int *pn_points, int *pn_points_max, ArtPathcode code, double x, double y); ArtVpath * art_vpath_new_circle (double x, double y, double r); ArtVpath * art_vpath_affine_transform (const ArtVpath *src, const double matrix[6]); void art_vpath_bbox_drect (const ArtVpath *vec, ArtDRect *drect); void art_vpath_bbox_irect (const ArtVpath *vec, ArtIRect *irect); ArtVpath * art_vpath_perturb (ArtVpath *src); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_VPATH_H__ */ /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_VPATH_BPATH_H__ #define __ART_VPATH_BPATH_H__ #ifdef LIBART_COMPILATION #include "art_bpath.h" #include "art_vpath.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ ArtPoint *art_bezier_to_vec (double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3, ArtPoint *p, int level); ArtVpath *art_bez_path_to_vec (const ArtBpath *bez, double flatness); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_VPATH_BPATH_H__ */ | . ..}buffer.h>~dict.hfspred.h>popen.hmem.h . .. art_affine.hart_alphagamma.h> art_bpath.h art_config.hart_filterlevel.h> art_gray_svp.h! art_misc.h>"art_pathcode.h# art_pixbuf.h$ art_point.h% art_rect.h>&art_rect_svp.h'art_rect_uta.h( art_render.h) art_render_gradient.h*art_render_mask.h>+art_render_svp.h>, art_rgb.h>-art_rgb_a_affine.h>. art_rgb_svp.h/art_rgb_affine.h>0 art_rgb_bitmap_affine.h1 art_rgb_pixbuf_affine.h2 art_rgb_rgba_affine.h3 art_rgba.h>4 art_svp.h>5art_svp_intersect.h6 art_svp_ops.h7art_svp_point.h8art_svp_render_aa.h9art_svp_vpath.h: art_svp_vpath_stroke.h;art_svp_wind.h< art_uta.h>= art_uta_ops.h>art_uta_rect.h? art_uta_svp.h@art_uta_vpath.hA art_vpath.hBart_vpath_bpath.h>Cart_vpath_dash.h>Dart_vpath_svp.hElibart-features.h>Flibart.h>/* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1999 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_VPATH_DASH_H__ #define __ART_VPATH_DASH_H__ /* Apply a dash style to a vector path. */ #ifdef LIBART_COMPILATION #include "art_vpath.h" #else #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _ArtVpathDash ArtVpathDash; struct _ArtVpathDash { double offset; int n_dash; double *dash; }; ArtVpath * art_vpath_dash (const ArtVpath *vpath, const ArtVpathDash *dash); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_VPATH_DASH_H__ */ dd #include "autosprintf.h" using gnu::autosprintf; to your source code. The include file defines the class `autosprintf', in a namespace called `gnu'. The `using' statement makes it possible to use the class without the (otherwise natural) `gnu::' prefix. When linking your program, you need to link with `libasprintf', because that's where the class is defined. In projects using GNU `autoconf', this means adding `AC_LIB_LINKFLAGS([asprintf])' to `configure.in' or `configure.ac', and using the @LIBASPRINTF@ Makefile variable that it provides.  Tag Table: Node: Top1348 Node: Introduction1708 Node: Class autosprintf2859 Node: Using autosprintf3869  End Tag Table /* Libart_LGPL - library of basic graphic primitives * Copyright (C) 1998 Raph Levien * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __ART_VPATH_SVP_H__ #define __ART_VPATH_SVP_H__ /* "Unsort" a sorted vector path into an ordinary vector path. */ #ifdef LIBART_COMPILATION #include "art_svp.h" #include "art_vpath.h" #else #include #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ ArtVpath *art_vpath_from_svp (const ArtSVP *svp); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ART_VPATH_SVP_H__ */ #ifndef LIBART_H #define LIBART_H 1 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif ...7L9/* Class autosprintf - formatted output to an ostream. Copyright (C) 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _AUTOSPRINTF_H #define _AUTOSPRINTF_H #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif #endif #include #include namespace gnu { /* A temporary object, usually allocated on the stack, representing the result of an asprintf() call. */ class autosprintf { public: /* Constructor: takes a format string and the printf arguments. */ autosprintf (const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); /* Copy constructor. */ autosprintf (const autosprintf& src); /* Destructor: frees the temporarily allocated string. */ ~autosprintf (); /* Conversion to string. */ operator char * () const; operator std::string () const; /* Output to an ostream. */ friend inline std::ostream& operator<< (std::ostream& stream, const autosprintf& tmp) { stream << (tmp.str ? tmp.str : "(error in autosprintf)"); return stream; } private: char *str; }; } #endif /* _AUTOSPRINTF_H */ /* This is a generated file. */ FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) FT_USE_MODULE( FT_Module_Class, autofit_module_class ) FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) FT_USE_MODULE( FT_Module_Class, psaux_module_class ) FT_USE_MODULE( FT_Module_Class, psnames_module_class ) /* EOF */ /* Public API for GNU gettext PO files - contained in libgettextpo. Copyright (C) 2003-2008, 2010 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _GETTEXT_PO_H #define _GETTEXT_PO_H 1 #include #ifdef __cplusplus extern "C" { #endif /* =========================== Meta Information ============================ */ /* Version number: (major<<16) + (minor<<8) + subminor */ #define LIBGETTEXTPO_VERSION 0x001201 extern int libgettextpo_version; /* ================================= Types ================================= */ /* A po_file_t represents the contents of a PO file. */ typedef struct po_file *po_file_t; /* A po_message_iterator_t represents an iterator through a domain of a PO file. */ typedef struct po_message_iterator *po_message_iterator_t; /* A po_message_t represents a message in a PO file. */ typedef struct po_message *po_message_t; /* A po_filepos_t represents a string's position within a source file. */ typedef struct po_filepos *po_filepos_t; /* A po_error_handler handles error situations. */ struct po_error_handler { /* Signal an error. The error message is built from FORMAT and the following arguments. ERRNUM, if nonzero, is an errno value. Must increment the error_message_count variable declared in error.h. Must not return if STATUS is nonzero. */ void (*error) (int status, int errnum, const char *format, ...) #if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__ __attribute__ ((__format__ (__printf__, 3, 4))) #endif ; /* Signal an error. The error message is built from FORMAT and the following arguments. The error location is at FILENAME line LINENO. ERRNUM, if nonzero, is an errno value. Must increment the error_message_count variable declared in error.h. Must not return if STATUS is nonzero. */ void (*error_at_line) (int status, int errnum, const char *filename, unsigned int lineno, const char *format, ...) #if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3) && !__STRICT_ANSI__ __attribute__ ((__format__ (__printf__, 5, 6))) #endif ; /* Signal a multiline warning. The PREFIX applies to all lines of the MESSAGE. Free the PREFIX and MESSAGE when done. */ void (*multiline_warning) (char *prefix, char *message); /* Signal a multiline error. The PREFIX applies to all lines of the MESSAGE. Free the PREFIX and MESSAGE when done. Must increment the error_message_count variable declared in error.h if PREFIX is non-NULL. */ void (*multiline_error) (char *prefix, char *message); }; typedef const struct po_error_handler *po_error_handler_t; /* A po_xerror_handler handles warnings, error and fatal error situations. */ #define PO_SEVERITY_WARNING 0 /* just a warning, tell the user */ #define PO_SEVERITY_ERROR 1 /* an error, the operation cannot complete */ #define PO_SEVERITY_FATAL_ERROR 2 /* an error, the operation must be aborted */ struct po_xerror_handler { /* Signal a problem of the given severity. MESSAGE and/or FILENAME + LINENO indicate where the problem occurred. If FILENAME is NULL, FILENAME and LINENO and COLUMN should be ignored. If LINENO is (size_t)(-1), LINENO and COLUMN should be ignored. If COLUMN is (size_t)(-1), it should be ignored. MESSAGE_TEXT is the problem description (if MULTILINE_P is true, multiple lines of text, each terminated with a newline, otherwise usually a single line). Must not return if SEVERITY is PO_SEVERITY_FATAL_ERROR. */ void (*xerror) (int severity, po_message_t message, const char *filename, size_t lineno, size_t column, int multiline_p, const char *message_text); /* Signal a problem that refers to two messages. Similar to two calls to xerror. If possible, a "..." can be appended to MESSAGE_TEXT1 and prepended to MESSAGE_TEXT2. */ void (*xerror2) (int severity, po_message_t message1, const char *filename1, size_t lineno1, size_t column1, int multiline_p1, const char *message_text1, po_message_t message2, const char *filename2, size_t lineno2, size_t column2, int multiline_p2, const char *message_text2); }; typedef const struct po_xerror_handler *po_xerror_handler_t; /* Memory allocation: The memory allocations performed by these functions use xmalloc(), therefore will cause a program exit if memory is exhausted. The memory allocated by po_file_read, and implicitly returned through the po_message_* functions, lasts until freed with po_file_free. */ /* ============================= po_file_t API ============================= */ /* Create an empty PO file representation in memory. */ extern po_file_t po_file_create (void); /* Read a PO file into memory. Return its contents. Upon failure, return NULL and set errno. */ #define po_file_read po_file_read_v3 extern po_file_t po_file_read (const char *filename, po_xerror_handler_t handler); /* Write an in-memory PO file to a file. Upon failure, return NULL and set errno. */ #define po_file_write po_file_write_v2 extern po_file_t po_file_write (po_file_t file, const char *filename, po_xerror_handler_t handler); /* Free a PO file from memory. */ extern void po_file_free (po_file_t file); /* Return the names of the domains covered by a PO file in memory. */ extern const char * const * po_file_domains (po_file_t file); /* =========================== Header entry API ============================ */ /* Return the header entry of a domain of a PO file in memory. The domain NULL denotes the default domain. Return NULL if there is no header entry. */ extern const char * po_file_domain_header (po_file_t file, const char *domain); /* Return the value of a field in a header entry. The return value is either a freshly allocated string, to be freed by the caller, or NULL. */ extern char * po_header_field (const char *header, const char *field); /* Return the header entry with a given field set to a given value. The field is added if necessary. The return value is a freshly allocated string. */ extern char * po_header_set_field (const char *header, const char *field, const char *value); /* ======================= po_message_iterator_t API ======================= */ /* Create an iterator for traversing a domain of a PO file in memory. The domain NULL denotes the default domain. */ extern po_message_iterator_t po_message_iterator (po_file_t file, const char *domain); /* Free an iterator. */ extern void po_message_iterator_free (po_message_iterator_t iterator); /* Return the next message, and advance the iterator. Return NULL at the end of the message list. */ extern po_message_t po_next_message (po_message_iterator_t iterator); /* Insert a message in a PO file in memory, in the domain and at the position indicated by the iterator. The iterator thereby advances past the freshly inserted message. */ extern void po_message_insert (po_message_iterator_t iterator, po_message_t message); /* =========================== po_message_t API ============================ */ /* Return a freshly constructed message. To finish initializing the message, you must set the msgid and msgstr. */ extern po_message_t po_message_create (void); /* Return the context of a message, or NULL for a message not restricted to a context. */ extern const char * po_message_msgctxt (po_message_t message); /* Change the context of a message. NULL means a message not restricted to a context. */ extern void po_message_set_msgctxt (po_message_t message, const char *msgctxt); /* Return the msgid (untranslated English string) of a message. */ extern const char * po_message_msgid (po_message_t message); /* Change the msgid (untranslated English string) of a message. */ extern void po_message_set_msgid (po_message_t message, const char *msgid); /* Return the msgid_plural (untranslated English plural string) of a message, or NULL for a message without plural. */ extern const char * po_message_msgid_plural (po_message_t message); /* Change the msgid_plural (untranslated English plural string) of a message. NULL means a message without plural. */ extern void po_message_set_msgid_plural (po_message_t message, const char *msgid_plural); /* Return the msgstr (translation) of a message. Return the empty string for an untranslated message. */ extern const char * po_message_msgstr (po_message_t message); /* Change the msgstr (translation) of a message. Use an empty string to denote an untranslated message. */ extern void po_message_set_msgstr (po_message_t message, const char *msgstr); /* Return the msgstr[index] for a message with plural handling, or NULL when the index is out of range or for a message without plural. */ extern const char * po_message_msgstr_plural (po_message_t message, int index); /* Change the msgstr[index] for a message with plural handling. Use a NULL value at the end to reduce the number of plural forms. */ extern void po_message_set_msgstr_plural (po_message_t message, int index, const char *msgstr); /* Return the comments for a message. */ extern const char * po_message_comments (po_message_t message); /* Change the comments for a message. comments should be a multiline string, ending in a newline, or empty. */ extern void po_message_set_comments (po_message_t message, const char *comments); /* Return the extracted comments for a message. */ extern const char * po_message_extracted_comments (po_message_t message); /* Change the extracted comments for a message. comments should be a multiline string, ending in a newline, or empty. */ extern void po_message_set_extracted_comments (po_message_t message, const char *comments); /* Return the i-th file position for a message, or NULL if i is out of range. */ extern po_filepos_t po_message_filepos (po_message_t message, int i); /* Remove the i-th file position from a message. The indices of all following file positions for the message are decremented by one. */ extern void po_message_remove_filepos (po_message_t message, int i); /* Add a file position to a message, if it is not already present for the message. file is the file name. start_line is the line number where the string starts, or (size_t)(-1) if no line number is available. */ extern void po_message_add_filepos (po_message_t message, const char *file, size_t start_line); /* Return the previous context of a message, or NULL for none. */ extern const char * po_message_prev_msgctxt (po_message_t message); /* Change the previous context of a message. NULL is allowed. */ extern void po_message_set_prev_msgctxt (po_message_t message, const char *prev_msgctxt); /* Return the previous msgid (untranslated English string) of a message, or NULL for none. */ extern const char * po_message_prev_msgid (po_message_t message); /* Change the previous msgid (untranslated English string) of a message. NULL is allowed. */ extern void po_message_set_prev_msgid (po_message_t message, const char *prev_msgid); /* Return the previous msgid_plural (untranslated English plural string) of a message, or NULL for none. */ extern const char * po_message_prev_msgid_plural (po_message_t message); /* Change the previous msgid_plural (untranslated English plural string) of a message. NULL is allowed. */ extern void po_message_set_prev_msgid_plural (po_message_t message, const char *prev_msgid_plural); /* Return true if the message is marked obsolete. */ extern int po_message_is_obsolete (po_message_t message); /* Change the obsolete mark of a message. */ extern void po_message_set_obsolete (po_message_t message, int obsolete); /* Return true if the message is marked fuzzy. */ extern int po_message_is_fuzzy (po_message_t message); /* Change the fuzzy mark of a message. */ extern void po_message_set_fuzzy (po_message_t message, int fuzzy); /* Return true if the message is marked as being a format string of the given type (e.g. "c-format"). */ extern int po_message_is_format (po_message_t message, const char *format_type); /* Change the format string mark for a given type of a message. */ extern void po_message_set_format (po_message_t message, const char *format_type, /*bool*/int value); /* If a numeric range of a message is set, return true and store the minimum and maximum value in *MINP and *MAXP. */ extern int po_message_is_range (po_message_t message, int *minp, int *maxp); /* Change the numeric range of a message. MIN and MAX must be non-negative, with MIN < MAX. Use MIN = MAX = -1 to remove the numeric range of a message. */ extern void po_message_set_range (po_message_t message, int min, int max); /* =========================== po_filepos_t API ============================ */ /* Return the file name. */ extern const char * po_filepos_file (po_filepos_t filepos); /* Return the line number where the string starts, or (size_t)(-1) if no line number is available. */ extern size_t po_filepos_start_line (po_filepos_t filepos); /* ============================ Format type API ============================= */ /* Return a NULL terminated array of the supported format types. */ extern const char * const * po_format_list (void); /* Return the pretty name associated with a format type. For example, for "csharp-format", return "C#". Return NULL if the argument is not a supported format type. */ extern const char * po_format_pretty_name (const char *format_type); /* ============================= Checking API ============================== */ /* Test whether an entire file PO file is valid, like msgfmt does it. If it is invalid, pass the reasons to the handler. */ extern void po_file_check_all (po_file_t file, po_xerror_handler_t handler); /* Test a single message, to be inserted in a PO file in memory, like msgfmt does it. If it is invalid, pass the reasons to the handler. The iterator is not modified by this call; it only specifies the file and the domain. */ extern void po_message_check_all (po_message_t message, po_message_iterator_t iterator, po_xerror_handler_t handler); /* Test whether the message translation is a valid format string if the message is marked as being a format string. If it is invalid, pass the reasons to the handler. */ #define po_message_check_format po_message_check_format_v2 extern void po_message_check_format (po_message_t message, po_xerror_handler_t handler); #ifdef __cplusplus } #endif #endif /* _GETTEXT_PO_H */ . ..dfui.hdump.hlang.hsystem.h>/* Message catalogs for internationalization. Copyright (C) 1995-1997, 2000-2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBINTL_H #define _LIBINTL_H 1 #include #if (defined __APPLE__ && defined __MACH__) && 0 # include #endif /* The LC_MESSAGES locale category is the category used by the functions gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. On systems that don't define it, use an arbitrary value instead. On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) then includes (i.e. this file!) and then only defines LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES in this case. */ #if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) # define LC_MESSAGES 1729 #endif /* We define an additional symbol to signal that we use the GNU implementation of gettext. */ #define __USE_GNU_GETTEXT 1 /* Provide information about the supported file formats. Returns the maximum minor revision number supported for a given major revision. */ #define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ ((major) == 0 || (major) == 1 ? 1 : -1) /* Resolve a platform specific conflict on DJGPP. GNU gettext takes precedence over _conio_gettext. */ #ifdef __DJGPP__ # undef gettext #endif #ifdef __cplusplus extern "C" { #endif /* Version number: (major<<16) + (minor<<8) + subminor */ #define LIBINTL_VERSION 0x001201 extern int libintl_version; /* We redirect the functions to those prefixed with "libintl_". This is necessary, because some systems define gettext/textdomain/... in the C library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). If we used the unprefixed names, there would be cases where the definition in the C library would override the one in the libintl.so shared library. Recall that on ELF systems, the symbols are looked up in the following order: 1. in the executable, 2. in the shared libraries specified on the link command line, in order, 3. in the dependencies of the shared libraries specified on the link command line, 4. in the dlopen()ed shared libraries, in the order in which they were dlopen()ed. The definition in the C library would override the one in libintl.so if either * -lc is given on the link command line and -lintl isn't, or * -lc is given on the link command line before -lintl, or * libintl.so is a dependency of a dlopen()ed shared library but not linked to the executable at link time. Since Solaris gettext() behaves differently than GNU gettext(), this would be unacceptable. The redirection happens by default through macros in C, so that &gettext is independent of the compilation unit, but through inline functions in C++, in order not to interfere with the name mangling of class fields or class methods called 'gettext'. */ /* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. If he doesn't, we choose the method. A third possible method is _INTL_REDIRECT_ASM, supported only by GCC. */ #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) # if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) # define _INTL_REDIRECT_ASM # else # ifdef __cplusplus # define _INTL_REDIRECT_INLINE # else # define _INTL_REDIRECT_MACROS # endif # endif #endif /* Auxiliary macros. */ #ifdef _INTL_REDIRECT_ASM # define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) # define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring # define _INTL_STRINGIFY(prefix) #prefix #else # define _INTL_ASM(cname) #endif /* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return its n-th argument literally. This enables GCC to warn for example about printf (gettext ("foo %y")). */ #if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus) # define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) #else # define _INTL_MAY_RETURN_STRING_ARG(n) #endif /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_gettext (const char *__msgid) _INTL_MAY_RETURN_STRING_ARG (1); static inline char *gettext (const char *__msgid) { return libintl_gettext (__msgid); } #else #ifdef _INTL_REDIRECT_MACROS # define gettext libintl_gettext #endif extern char *gettext (const char *__msgid) _INTL_ASM (libintl_gettext) _INTL_MAY_RETURN_STRING_ARG (1); #endif /* Look up MSGID in the DOMAINNAME message catalog for the current LC_MESSAGES locale. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dgettext (const char *__domainname, const char *__msgid) _INTL_MAY_RETURN_STRING_ARG (2); static inline char *dgettext (const char *__domainname, const char *__msgid) { return libintl_dgettext (__domainname, __msgid); } #else #ifdef _INTL_REDIRECT_MACROS # define dgettext libintl_dgettext #endif extern char *dgettext (const char *__domainname, const char *__msgid) _INTL_ASM (libintl_dgettext) _INTL_MAY_RETURN_STRING_ARG (2); #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, int __category) _INTL_MAY_RETURN_STRING_ARG (2); static inline char *dcgettext (const char *__domainname, const char *__msgid, int __category) { return libintl_dcgettext (__domainname, __msgid, __category); } #else #ifdef _INTL_REDIRECT_MACROS # define dcgettext libintl_dcgettext #endif extern char *dcgettext (const char *__domainname, const char *__msgid, int __category) _INTL_ASM (libintl_dcgettext) _INTL_MAY_RETURN_STRING_ARG (2); #endif /* Similar to `gettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); static inline char *ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) { return libintl_ngettext (__msgid1, __msgid2, __n); } #else #ifdef _INTL_REDIRECT_MACROS # define ngettext libintl_ngettext #endif extern char *ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_ASM (libintl_ngettext) _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); #endif /* Similar to `dgettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); static inline char *dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) { return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); } #else #ifdef _INTL_REDIRECT_MACROS # define dngettext libintl_dngettext #endif extern char *dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_ASM (libintl_dngettext) _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); #endif /* Similar to `dcgettext' but select the plural form corresponding to the number N. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); static inline char *dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) { return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); } #else #ifdef _INTL_REDIRECT_MACROS # define dcngettext libintl_dcngettext #endif extern char *dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) _INTL_ASM (libintl_dcngettext) _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); #endif /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_textdomain (const char *__domainname); static inline char *textdomain (const char *__domainname) { return libintl_textdomain (__domainname); } #else #ifdef _INTL_REDIRECT_MACROS # define textdomain libintl_textdomain #endif extern char *textdomain (const char *__domainname) _INTL_ASM (libintl_textdomain); #endif /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_bindtextdomain (const char *__domainname, const char *__dirname); static inline char *bindtextdomain (const char *__domainname, const char *__dirname) { return libintl_bindtextdomain (__domainname, __dirname); } #else #ifdef _INTL_REDIRECT_MACROS # define bindtextdomain libintl_bindtextdomain #endif extern char *bindtextdomain (const char *__domainname, const char *__dirname) _INTL_ASM (libintl_bindtextdomain); #endif /* Specify the character encoding in which the messages from the DOMAINNAME message catalog will be returned. */ #ifdef _INTL_REDIRECT_INLINE extern char *libintl_bind_textdomain_codeset (const char *__domainname, const char *__codeset); static inline char *bind_textdomain_codeset (const char *__domainname, const char *__codeset) { return libintl_bind_textdomain_codeset (__domainname, __codeset); } #else #ifdef _INTL_REDIRECT_MACROS # define bind_textdomain_codeset libintl_bind_textdomain_codeset #endif extern char *bind_textdomain_codeset (const char *__domainname, const char *__codeset) _INTL_ASM (libintl_bind_textdomain_codeset); #endif /* Support for format strings with positions in *printf(), following the POSIX/XSI specification. Note: These replacements for the *printf() functions are visible only in source files that #include or #include "gettext.h". Packages that use *printf() in source files that don't refer to _() or gettext() but for which the format string could be the return value of _() or gettext() need to add this #include. Oh well. */ #if !1 #include #include /* Get va_list. */ #if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER # include #else # include #endif #if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */ #undef fprintf #define fprintf libintl_fprintf extern int fprintf (FILE *, const char *, ...); #endif #if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */ #undef vfprintf #define vfprintf libintl_vfprintf extern int vfprintf (FILE *, const char *, va_list); #endif #if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */ #undef printf #if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ /* Don't break __attribute__((format(printf,M,N))). This redefinition is only possible because the libc in NetBSD, Cygwin, mingw does not have a function __printf__. Alternatively, we could have done this redirection only when compiling with __GNUC__, together with a symbol redirection: extern int printf (const char *, ...) __asm__ (#__USER_LABEL_PREFIX__ "libintl_printf"); But doing it now would introduce a binary incompatibility with already distributed versions of libintl on these systems. */ # define libintl_printf __printf__ #endif #define printf libintl_printf extern int printf (const char *, ...); #endif #if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */ #undef vprintf #define vprintf libintl_vprintf extern int vprintf (const char *, va_list); #endif #if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */ #undef sprintf #define sprintf libintl_sprintf extern int sprintf (char *, const char *, ...); #endif #if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */ #undef vsprintf #define vsprintf libintl_vsprintf extern int vsprintf (char *, const char *, va_list); #endif #if 1 #if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */ #undef snprintf #define snprintf libintl_snprintf extern int snprintf (char *, size_t, const char *, ...); #endif #if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */ #undef vsnprintf #define vsnprintf libintl_vsnprintf extern int vsnprintf (char *, size_t, const char *, va_list); #endif #endif #if 1 #if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */ #undef asprintf #define asprintf libintl_asprintf extern int asprintf (char **, const char *, ...); #endif #if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */ #undef vasprintf #define vasprintf libintl_vasprintf extern int vasprintf (char **, const char *, va_list); #endif #endif #if 0 #undef fwprintf #define fwprintf libintl_fwprintf extern int fwprintf (FILE *, const wchar_t *, ...); #undef vfwprintf #define vfwprintf libintl_vfwprintf extern int vfwprintf (FILE *, const wchar_t *, va_list); #undef wprintf #define wprintf libintl_wprintf extern int wprintf (const wchar_t *, ...); #undef vwprintf #define vwprintf libintl_vwprintf extern int vwprintf (const wchar_t *, va_list); #undef swprintf #define swprintf libintl_swprintf extern int swprintf (wchar_t *, size_t, const wchar_t *, ...); #undef vswprintf #define vswprintf libintl_vswprintf extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); #endif #endif /* Support for the locale chosen by the user. */ #if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ #undef setlocale #define setlocale libintl_setlocale extern char *setlocale (int, const char *); #if 0 #undef newlocale #define newlocale libintl_newlocale extern locale_t newlocale (int, const char *, locale_t); #endif #endif /* Support for relocatable packages. */ /* Sets the original and the current installation prefix of the package. Relocation simply replaces a pathname starting with the original prefix by the corresponding pathname with the current prefix instead. Both prefixes should be directory names without trailing slash (i.e. use "" instead of "/"). */***************************************************************************/ /* */ /* ft2build.h */ /* */ /* Build macros of the FreeType 2 library. */ /* */ /* Copyright 1996-2001, 2003, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /* */ /* This is a Unix-specific version of that should be used */ /* exclusively *after* installation of the library. */ /* */ /* It assumes that `/usr/local/include/freetype2' (or whatever is */ /* returned by the `freetype-config --cflags' or `pkg-config --cflags' */ /* command) is in your compilation include path. */ /* */ /* We don't need to do anything special in this release. However, for */ /* a future FreeType 2 release, the following installation changes will */ /* be performed: */ /* */ /* - The contents of `freetype-2.x/include/freetype' will be installed */ /* to `/usr/local/include/freetype2' instead of */ /* `/usr/local/include/freetype2/freetype'. */ /* */ /* - This file will #include , instead */ /* of . */ /* */ /* - The contents of `ftheader.h' will be processed with `sed' to */ /* replace all `' with `'. */ /* */ /* - Adding `/usr/local/include/freetype2' to your compilation include */ /* path will not be necessary anymore. */ /* */ /* These changes will be transparent to client applications which use */ /* freetype-config (or pkg-config). No modifications will be necessary */ /* to compile with the new scheme. */ /* */ /*************************************************************************/ #ifndef __FT2_BUILD_UNIX_H__ #define __FT2_BUILD_UNIX_H__ /* `/include/freetype2' must be in your current inclusion path */ #include #endif /* __FT2_BUILD_UNIX_H__ */ /* END */ /* ftconfig.h. Generated from ftconfig.in by configure. */ /***************************************************************************/ /* */ /* ftconfig.in */ /* */ /* UNIX-specific configuration file (specification only). */ /* */ /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /* */ /* This header file contains a number of macro definitions that are used */ /* by the rest of the engine. Most of the macros here are automatically */ /* determined at compile time, and you should not need to change it to */ /* port FreeType, except to compile the library with a non-ANSI */ /* compiler. */ /* */ /* Note however that if some specific modifications are needed, we */ /* advise you to place a modified copy in your build directory. */ /* */ /* The build directory is usually `freetype/builds/', and */ /* contains system-specific files that are always included first when */ /* building the library. */ /* */ /*************************************************************************/ #ifndef __FTCONFIG_H__ #define __FTCONFIG_H__ #include #include FT_CONFIG_OPTIONS_H #include FT_CONFIG_STANDARD_LIBRARY_H FT_BEGIN_HEADER /*************************************************************************/ /* */ /* PLATFORM-SPECIFIC CONFIGURATION MACROS */ /* */ /* These macros can be toggled to suit a specific system. The current */ /* ones are defaults used to compile FreeType in an ANSI C environment */ /* (16bit compilers are also supported). Copy this file to your own */ /* `freetype/builds/' directory, and edit it to port the engine. */ /* */ /*************************************************************************/ #define HAVE_UNISTD_H 1 #define HAVE_FCNTL_H 1 #define HAVE_STDINT_H 1 /* There are systems (like the Texas Instruments 'C54x) where a `char' */ /* has 16 bits. ANSI C says that sizeof(char) is always 1. Since an */ /* `int' has 16 bits also for this system, sizeof(int) gives 1 which */ /* is probably unexpected. */ /* */ /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */ /* `char' type. */ #ifndef FT_CHAR_BIT #define FT_CHAR_BIT CHAR_BIT #endif /* #undef FT_USE_AUTOCONF_SIZEOF_TYPES */ #ifdef FT_USE_AUTOCONF_SIZEOF_TYPES #define SIZEOF_INT 4 #define SIZEOF_LONG 8 #define FT_SIZEOF_INT SIZEOF_INT #define FT_SIZEOF_LONG SIZEOF_LONG #else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */ /* Following cpp computation of the bit length of int and long */ /* is copied from default include/freetype/config/ftconfig.h. */ /* If any improvement is required for this file, it should be */ /* applied to the original header file for the builders that */ /* does not use configure script. */ /* The size of an `int' type. */ #if FT_UINT_MAX == 0xFFFFUL #define FT_SIZEOF_INT (16 / FT_CHAR_BIT) #elif FT_UINT_MAX == 0xFFFFFFFFUL #define FT_SIZEOF_INT (32 / FT_CHAR_BIT) #elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL #define FT_SIZEOF_INT (64 / FT_CHAR_BIT) #else #error "Unsupported size of `int' type!" #endif /* The size of a `long' type. A five-byte `long' (as used e.g. on the */ /* DM642) is recognized but avoided. */ #if FT_ULONG_MAX == 0xFFFFFFFFUL #define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL #define FT_SIZEOF_LONG (32 / FT_CHAR_BIT) #elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL #define FT_SIZEOF_LONG (64 / FT_CHAR_BIT) #else #error "Unsupported size of `long' type!" #endif #endif /* !FT_USE_AUTOCONF_SIZEOF_TYPES */ /* Preferred alignment of data */ #define FT_ALIGNMENT 8 /* FT_UNUSED is a macro used to indicate that a given parameter is not */ /* used -- this is only used to get rid of unpleasant compiler warnings */ #ifndef FT_UNUSED #define FT_UNUSED( arg ) ( (arg) = (arg) ) #endif /*************************************************************************/ /* */ /* AUTOMATIC CONFIGURATION MACROS */ /* */ /* These macros are computed from the ones defined above. Don't touch */ /* their definition, unless you know precisely what you are doing. No */ /* porter should need to mess with them. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* Mac support */ /* */ /* This is the only necessary change, so it is defined here instead */ /* providing a new configuration file. */ /* */ #if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \ ( defined( __MWERKS__ ) && defined( macintosh ) ) /* no Carbon frameworks for 64bit 10.4.x */ #include "AvailabilityMacros.h" #if defined( __LP64__ ) && \ ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) #define DARWIN_NO_CARBON 1 #else #define FT_MACINTOSH 1 #endif #elif defined( __SC__ ) || defined( __MRC__ ) /* Classic MacOS compilers */ #include "ConditionalMacros.h" #if TARGET_OS_MAC #define FT_MACINTOSH 1 #endif #endif /* Fix compiler warning with sgi compiler */ #if defined( __sgi ) && !defined( __GNUC__ ) #if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 ) #pragma set woff 3505 #endif #endif /*************************************************************************/ /* */ /* IntN types */ /* */ /* Used to guarantee the size of some specific integers. */ /* */ typedef signed short FT_Int16; typedef unsigned short FT_UInt16; #if FT_SIZEOF_INT == 4 typedef signed int FT_Int32; typedef unsigned int FT_UInt32; #elif FT_SIZEOF_LONG == 4 typedef signed long FT_Int32; typedef unsigned long FT_UInt32; #else #error "no 32bit type found -- please check your configuration files" #endif /* look up an integer type that is at least 32 bits */ #if FT_SIZEOF_INT >= 4 typedef int FT_Fast; typedef unsigned int FT_UFast; #elif FT_SIZEOF_LONG >= 4 typedef long FT_Fast; typedef unsigned long FT_UFast; #endif /* determine whether we have a 64-bit int type for platforms without */ /* Autoconf */ #if FT_SIZEOF_LONG == 8 /* FT_LONG64 must be defined if a 64-bit type is available */ #define FT_LONG64 #define FT_INT64 long #elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */ /* this compiler provides the __int64 type */ #define FT_LONG64 #define FT_INT64 __int64 #elif defined( __BORLANDC__ ) /* Borland C++ */ /* XXXX: We should probably check the value of __BORLANDC__ in order */ /* to test the compiler version. */ /* this compiler provides the __int64 type */ #define FT_LONG64 #define FT_INT64 __int64 #elif defined( __WATCOMC__ ) /* Watcom C++ */ /* Watcom doesn't provide 64-bit data types */ #elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */ #define FT_LONG64 #define FT_INT64 long long int #elif defined( __GNUC__ ) /* GCC provides the `long long' type */ #define FT_LONG64 #define FT_INT64 long long int #endif /* FT_SIZEOF_LONG == 8 */ /*************************************************************************/ /* */ /* A 64-bit data type will create compilation problems if you compile */ /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */ /* is defined. You can however ignore this rule by defining the */ /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ /* */ #if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) #ifdef __STDC__ /* Undefine the 64-bit macros in strict ANSI compilation mode. */ /* Since `#undef' doesn't survive in configuration header files */ /* we use the postprocessing facility of AC_CONFIG_HEADERS to */ /* replace the leading `/' with `#'. */ #undef FT_LONG64 #undef FT_INT64 #endif /* __STDC__ */ #endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ #define FT_BEGIN_STMNT do { #define FT_END_STMNT } while ( 0 ) #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT #ifndef FT_CONFIG_OPTION_NO_ASSEMBLER /* Provide assembler fragments for performance-critical functions. */ /* These must be defined `static __inline__' with GCC. */ #ifdef __GNUC__ #if defined( __arm__ ) && !defined( __thumb__ ) #define FT_MULFIX_ASSEMBLER FT_MulFix_arm static __inline__ FT_Int32 FT_MulFix_arm( FT_Int32 a, FT_Int32 b ) { register FT_Int32 t, t2; __asm__ __volatile__ ( "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ "adds %1, %1, %0\n\t" /* %1 += %0 */ "adc %2, %2, #0\n\t" /* %2 += carry */ "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ "orr %0, %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ : "=r"(a), "=&r"(t2), "=&r"(t) : "r"(a), "r"(b) ); return a; } #endif /* __arm__ && !__thumb__ */ #if defined( __i386__ ) #define FT_MULFIX_ASSEMBLER FT_MulFix_i386 static __inline__ FT_Int32 FT_MulFix_i386( FT_Int32 a, FT_Int32 b ) { register FT_Int32 result; __asm__ __volatile__ ( "imul %%edx\n" "movl %%edx, %%ecx\n" "sarl $31, %%ecx\n" "addl $0x8000, %%ecx\n" "addl %%ecx, %%eax\n" "adcl $0, %%edx\n" "shrl $16, %%eax\n" "shll $16, %%edx\n" "addl %%edx, %%eax\n" : "=a"(result), "+d"(b) : "a"(a) : "%ecx" ); return result; } #endif /* i386 */ #endif /* __GNUC__ */ #endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ #ifdef FT_CONFIG_OPTION_INLINE_MULFIX #ifdef FT_MULFIX_ASSEMBLER #define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER #endif #endif #ifdef FT_MAKE_OPTION_SINGLE_OBJECT #define FT_LOCAL( x ) static x #define FT_LOCAL_DEF( x ) static x #else #ifdef __cplusplus #define FT_LOCAL( x ) extern "C" x #define FT_LOCAL_DEF( x ) extern "C" x #else #define FT_LOCAL( x ) extern x #define FT_LOCAL_DEF( x ) x #endif #endif /* FT_MAKE_OPTION_SINGLE_OBJECT */ #ifndef FT_BASE #ifdef __cplusplus #define FT_BASE( x ) extern "C" x #else #define FT_BASE( x ) extern x #endif #endif /* !FT_BASE */ #ifndef FT_BASE_DEF #ifdef __cplusplus #define FT_BASE_DEF( x ) x #else #define FT_BASE_DEF( x ) x #endif #endif /* !FT_BASE_DEF */ #ifndef FT_EXPORT #ifdef __cplusplus #define FT_EXPORT( x ) extern "C" x #else #define FT_EXPORT( x ) extern x #endif #endif /* !FT_EXPORT */ #ifndef FT_EXPORT_DEF #ifdef __cplusplus #define FT_EXPORT_DEF( x ) extern "C" x #else #define FT_EXPORT_DEF( x ) extern x #endif #endif /* !FT_EXPORT_DEF */ #ifndef FT_EXPORT_VAR #ifdef __cplusplus #define FT_EXPORT_VAR( x ) extern "C" x #else #define FT_EXPORT_VAR( x ) extern x #endif #endif /* !FT_EXPORT_VAR */ /* The following macros are needed to compile the library with a */ /* C++ compiler and with 16bit compilers. */ /* */ /* This is special. Within C++, you must specify `extern "C"' for */ /* functions which are used via function pointers, and you also */ /* must do that for structures which contain function pointers to */ /* assure C linkage -- it's not possible to have (local) anonymous */ /* functions which are accessed by (global) function pointers. */ /* */ /* */ /* FT_CALLBACK_DEF is used to _define_ a callback function. */ /* */ /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */ /* contains pointers to callback functions. */ /* */ /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */ /* that contains pointers to callback functions. */ /* */ /* */ /* Some 16bit compilers have to redefine these macros to insert */ /* the infamous `_cdecl' or `__fastcall' declarations. */ /* */ #ifndef FT_CALLBACK_DEF #ifdef __cplusplus #define FT_CALLBACK_DEF( x ) extern "C" x #else #define FT_CALLBACK_DEF( x ) static x #endif #endif /* FT_CALLBACK_DEF */ #ifndef FT_CALLBACK_TABLE #ifdef __cplusplus #define FT_CALLBACK_TABLE extern "C" #define FT_CALLBACK_TABLE_DEF extern "C" #else #define FT_CALLBACK_TABLE extern #define FT_CALLBACK_TABLE_DEF /* nothing */ #endif #endif /* FT_CALLBACK_TABLE */ FT_END_HEADER #endif /* __FTCONFIG_H__ */ /* END */ /***************************************************************************/ /* */ /* ftheader.h */ /* */ /* Build macros of the FreeType 2 library. */ /* */ /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FT_HEADER_H__ #define __FT_HEADER_H__ /*@***********************************************************************/ /* */ /* */ /* FT_BEGIN_HEADER */ /* */ /* */ /* This macro is used in association with @FT_END_HEADER in header */ /* files to ensure that the declarations within are properly */ /* encapsulated in an `extern "C" { .. }' block when included from a */ /* C++ compiler. */ /* */ #ifdef __cplusplus #define FT_BEGIN_HEADER extern "C" { #else #define FT_BEGIN_HEADER /* nothing */ #endif /*@***********************************************************************/ /* */ /* */ /* FT_END_HEADER */ /* */ /* */ /* This macro is used in association with @FT_BEGIN_HEADER in header */ /* files to ensure that the declarations within are properly */ /* encapsulated in an `extern "C" { .. }' block when included from a */ /* C++ compiler. */ /* */ #ifdef __cplusplus #define FT_END_HEADER } #else #define FT_END_HEADER /* nothing */ #endif /*************************************************************************/ /* */ /* Aliases for the FreeType 2 public and configuration files. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /*
*/ /* header_file_macros */ /* */ /* */ /* Header File Macros */ /* */ /* <Abstract> */ /* Macro definitions used to #include specific header files. */ /* */ /* <Description> */ /* The following macros are defined to the name of specific */ /* FreeType~2 header files. They can be used directly in #include */ /* statements as in: */ /* */ /* { */ /* #include FT_FREETYPE_H */ /* #include FT_MULTIPLE_MASTERS_H */ /* #include FT_GLYPH_H */ /* } */ /* */ /* There are several reasons why we are now using macros to name */ /* public header files. The first one is that such macros are not */ /* limited to the infamous 8.3~naming rule required by DOS (and */ /* `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h'). */ /* */ /* The second reason is that it allows for more flexibility in the */ /* way FreeType~2 is installed on a given system. */ /* */ /*************************************************************************/ /* configuration files */ /************************************************************************* * * @macro: * FT_CONFIG_CONFIG_H * * @description: * A macro used in #include statements to name the file containing * FreeType~2 configuration data. * */ #ifndef FT_CONFIG_CONFIG_H #define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h> #endif /************************************************************************* * * @macro: * FT_CONFIG_STANDARD_LIBRARY_H * * @description: * A macro used in #include statements to name the file containing * FreeType~2 interface to the standard C library functions. * */ #ifndef FT_CONFIG_STANDARD_LIBRARY_H #define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h> #endif /************************************************************************* * * @macro: * FT_CONFIG_OPTIONS_H * * @description: * A macro used in #include statements to name the file containing * FreeType~2 project-specific configuration options. * */ #ifndef FT_CONFIG_OPTIONS_H #define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h> #endif /************************************************************************* * * @macro: * FT_CONFIG_MODULES_H * * @description: * A macro used in #include statements to name the file containing the * list of FreeType~2 modules that are statically linked to new library * instances in @FT_Init_FreeType. * */ #ifndef FT_CONFIG_MODULES_H #define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h> #endif /* */ /* public headers */ /************************************************************************* * * @macro: * FT_FREETYPE_H * * @description: * A macro used in #include statements to name the file containing the * base FreeType~2 API. * */ #define FT_FREETYPE_H <freetype/freetype.h> /************************************************************************* * * @macro: * FT_ERRORS_H * * @description: * A macro used in #include statements to name the file containing the * list of FreeType~2 error codes (and messages). * * It is included by @FT_FREETYPE_H. * */ #define FT_ERRORS_H <freetype/fterrors.h> /************************************************************************* * * @macro: * FT_MODULE_ERRORS_H * * @description: * A macro used in #include statements to name the file containing the * list of FreeType~2 module error offsets (and messages). * */ #define FT_MODULE_ERRORS_H <freetype/ftmoderr.h> /************************************************************************* * * @macro: * FT_SYSTEM_H * * @description: * A macro used in #include statements to name the file containing the * FreeType~2 interface to low-level operations (i.e., memory management * and stream i/o). * * It is included by @FT_FREETYPE_H. * */ #define FT_SYSTEM_H <freetype/ftsystem.h> /************************************************************************* * * @macro: * FT_IMAGE_H * * @description: * A macro used in #include statements to name the file containing type * definitions related to glyph images (i.e., bitmaps, outlines, * scan-converter parameters). * * It is included by @FT_FREETYPE_H. * */ #define FT_IMAGE_H <freetype/ftimage.h> /************************************************************************* * * @macro: * FT_TYPES_H * * @description: * A macro used in #include statements to name the file containing the * basic data types defined by FreeType~2. * * It is included by @FT_FREETYPE_H. * */ #define FT_TYPES_H <freetype/fttypes.h> /************************************************************************* * * @macro: * FT_LIST_H * * @description: * A macro used in #include statements to name the file containing the * list management API of FreeType~2. * * (Most applications will never need to include this file.) * */ #define FT_LIST_H <freetype/ftlist.h> /************************************************************************* * * @macro: * FT_OUTLINE_H * * @description: * A macro used in #include statements to name the file containing the * scalable outline management API of FreeType~2. * */ #define FT_OUTLINE_H <freetype/ftoutln.h> /************************************************************************* * * @macro: * FT_SIZES_H * * @description: * A macro used in #include statements to name the file containing the * API which manages multiple @FT_Size objects per face. * */ #define FT_SIZES_H <freetype/ftsizes.h> /************************************************************************* * * @macro: * FT_MODULE_H * * @description: * A macro used in #include statements to name the file containing the * module management API of FreeType~2. * */ #define FT_MODULE_H <freetype/ftmodapi.h> /************************************************************************* * * @macro: * FT_RENDER_H * * @description: * A macro used in #include statements to name the file containing the * renderer module management API of FreeType~2. * */ #define FT_RENDER_H <freetype/ftrender.h> /************************************************************************* * * @macro: * FT_TYPE1_TABLES_H * * @description: * A macro used in #include statements to name the file containing the * types and API specific to the Type~1 format. * */ #define FT_TYPE1_TABLES_H <freetype/t1tables.h> /************************************************************************* * * @macro: * FT_TRUETYPE_IDS_H * * @description: * A macro used in #include statements to name the file containing the * enumeration values which identify name strings, languages, encodings, * etc. This file really contains a _large_ set of constant macro * definitions, taken from the TrueType and OpenType specifications. * */ #define FT_TRUETYPE_IDS_H <freetype/ttnameid.h> /************************************************************************* * * @macro: * FT_TRUETYPE_TABLES_H * * @description: * A macro used in #include statements to name the file containing the * types and API specific to the TrueType (as well as OpenType) format. * */ #define FT_TRUETYPE_TABLES_H <freetype/tttables.h> /************************************************************************* * * @macro: * FT_TRUETYPE_TAGS_H * * @description: * A macro used in #include statements to name the file containing the * definitions of TrueType four-byte `tags' which identify blocks in * SFNT-based font formats (i.e., TrueType and OpenType). * */ #define FT_TRUETYPE_TAGS_H <freetype/tttags.h> /************************************************************************* * * @macro: * FT_BDF_H * * @description: * A macro used in #include statements to name the file containing the * definitions of an API which accesses BDF-specific strings from a * face. * */ #define FT_BDF_H <freetype/ftbdf.h> /************************************************************************* * * @macro: * FT_CID_H * * @description: * A macro used in #include statements to name the file containing the * definitions of an API which access CID font information from a * face. * */ #define FT_CID_H <freetype/ftcid.h> /************************************************************************* * * @macro: * FT_GZIP_H * * @description: * A macro used in #include statements to name the file containing the * definitions of an API which supports gzip-compressed files. * */ #define FT_GZIP_H <freetype/ftgzip.h> /************************************************************************* * * @macro: * FT_LZW_H * * @description: * A macro used in #include statements to name the file containing the * definitions of an API which supports LZW-compressed files. * */ #define FT_LZW_H <freetype/ftlzw.h> /************************************************************************* * * @macro: * FT_WINFONTS_H * * @description: * A macro used in #include statements to name the file containing the * definitions of an API which supports Windows FNT files. * */ #define FT_WINFONTS_H <freetype/ftwinfnt.h> /************************************************************************* * * @macro: * FT_GLYPH_H * * @description: * A macro used in #include statements to name the file containing the * API of the optional glyph management component. * */ #define FT_GLYPH_H <freetype/ftglyph.h> /************************************************************************* * * @macro: * FT_BITMAP_H * * @description: * A macro used in #include statements to name the file containing the * API of the optional bitmap conversion component. * */ #define FT_BITMAP_H <freetype/ftbitmap.h> /************************************************************************* * * @macro: * FT_BBOX_H * * @description: * A macro used in #include statements to name the file containing the * API of the optional exact bounding box computation routines. * */ #define FT_BBOX_H <freetype/ftbbox.h> /************************************************************************* * * @macro: * FT_CACHE_H * * @description: * A macro used in #include statements to name the file containing the * API of the optional FreeType~2 cache sub-system. * */ #define FT_CACHE_H <freetype/ftcache.h> /************************************************************************* * * @macro: * FT_CACHE_IMAGE_H * * @description: * A macro used in #include statements to name the file containing the * `glyph image' API of the FreeType~2 cache sub-system. * * It is used to define a cache for @FT_Glyph elements. You can also * use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to * store small glyph bitmaps, as it will use less memory. * * This macro is deprecated. Simply include @FT_CACHE_H to have all * glyph image-related cache declarations. * */ #define FT_CACHE_IMAGE_H FT_CACHE_H /************************************************************************* * * @macro: * FT_CACHE_SMALL_BITMAPS_H * * @description: * A macro used in #include statements to name the file containing the * `small bitmaps' API of the FreeType~2 cache sub-system. * * It is used to define a cache for small glyph bitmaps in a relatively * memory-efficient way. You can also use the API defined in * @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images, * including scalable outlines. * * This macro is deprecated. Simply include @FT_CACHE_H to have all * small bitmaps-related cache declarations. * */ #define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H /************************************************************************* * * @macro: * FT_CACHE_CHARMAP_H * * @description: * A macro used in #include statements to name the file containing the * `charmap' API of the FreeType~2 cache sub-system. * * This macro is deprecated. Simply include @FT_CACHE_H to have all * charmap-based cache declarations. * */ #define FT_CACHE_CHARMAP_H FT_CACHE_H /************************************************************************* * * @macro: * FT_MAC_H * * @description: * A macro used in #include statements to name the file containing the * Macintosh-specific FreeType~2 API. The latter is used to access * fonts embedded in resource forks. * * This header file must be explicitly included by client applications * compiled on the Mac (note that the base API still works though). * */ #define FT_MAC_H <freetype/ftmac.h> /************************************************************************* * * @macro: * FT_MULTIPLE_MASTERS_H * * @description: * A macro used in #include statements to name the file containing the * optional multiple-masters management API of FreeType~2. * */ #define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h> /************************************************************************* * * @macro: * FT_SFNT_NAMES_H * * @description: * A macro used in #include statements to name the file containing the * optional FreeType~2 API which accesses embedded `name' strings in * SFNT-based font formats (i.e., TrueType and OpenType). * */ #define FT_SFNT_NAMES_H <freetype/ftsnames.h> /************************************************************************* * * @macro: * FT_OPENTYPE_VALIDATE_H * * @description: * A macro used in #include statements to name the file containing the * optional FreeType~2 API which validates OpenType tables (BASE, GDEF, * GPOS, GSUB, JSTF). * */ #define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h> /************************************************************************* * * @macro: * FT_GX_VALIDATE_H * * @description: * A macro used in #include statements to name the file containing the * optional FreeType~2 API which validates TrueTypeGX/AAT tables (feat, * mort, morx, bsln, just, kern, opbd, trak, prop). * */ #define FT_GX_VALIDATE_H <freetype/ftgxval.h> /************************************************************************* * * @macro: * FT_PFR_H * * @description: * A macro used in #include statements to name the file containing the * FreeType~2 API which accesses PFR-specific data. * */ #define FT_PFR_H <freetype/ftpfr.h> /************************************************************************* * * @macro: * FT_STROKER_H * * @description: * A macro used in #include statements to name the file containing the * FreeType~2 API which provides functions to stroke outline paths. */ #define FT_STROKER_H <freetype/ftstroke.h> /************************************************************************* * * @macro: * FT_SYNTHESIS_H * * @description: * A macro used in #include statements to name the file containing the * FreeType~2 API which performs artificial obliquing and emboldening. */ #define FT_SYNTHESIS_H <freetype/ftsynth.h> /************************************************************************* * * @macro: * FT_XFREE86_H * * @description: * A macro used in #include statements to name the file containing the * FreeType~2 API which provides functions specific to the XFree86 and * X.Org X11 servers. */ #define FT_XFREE86_H <freetype/ftxf86.h> /************************************************************************* * * @macro: * FT_TRIGONOMETRY_H * * @description: * A macro used in #include statements to name the file containing the * FreeType~2 API which performs trigonometric computations (e.g., * cosines and arc tangents). */ #define FT_TRIGONOMETRY_H <freetype/fttrigon.h> /************************************************************************* * * @macro: * FT_LCD_FILTER_H * * @description: * A macro used in #include statements to name the file containing the * FreeType~2 API which performs color filtering for subpixel rendering. */ #define FT_LCD_FILTER_H <freetype/ftlcdfil.h> /************************************************************************* * * @macro: * FT_UNPATENTED_HINTING_H * * @description: * A macro used in #include statements to name the file containing the * FreeType~2 API which performs color filtering for subpixel rendering. */ #define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h> /************************************************************************* * * @macro: * FT_INCREMENTAL_H * * @description: * A macro used in #include statements to name the file containing the * FreeType~2 API which performs color filtering for subpixel rendering. */ #define FT_INCREMENTAL_H <freetype/ftincrem.h> /************************************************************************* * * @macro: * FT_GASP_H * * @description: * A macro used in #include statements to name the file containing the * FreeType~2 API which returns entries from the TrueType GASP table. */ #define FT_GASP_H <freetype/ftgasp.h> /************************************************************************* * * @macro: * FT_ADVANCES_H * * @description: * A macro used in #include statements to name the file containing the * FreeType~2 API which returns individual and ranged glyph advances. */ #define FT_ADVANCES_H <freetype/ftadvanc.h> /* */ #define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h> /* The internals of the cache sub-system are no longer exposed. We */ /* default to FT_CACHE_H at the moment just in case, but we know of */ /* no rogue client that uses them. */ /* */ #define FT_CACHE_MANAGER_H <freetype/ftcache.h> #define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h> #define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h> #define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h> #define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h> #define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h> #define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h> #define FT_INCREMENTAL_H <freetype/ftincrem.h> #define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h> /* * Include internal headers definitions from <freetype/internal/...> * only when building the library. */ #ifdef FT2/***************************************************************************/ /* */ /* ftoption.h */ /* */ /* User-selectable configuration macros (specification only). */ /* */ /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ /* 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTOPTION_H__ #define __FTOPTION_H__ #include <ft2build.h> FT_BEGIN_HEADER /*************************************************************************/ /* */ /* USER-SELECTABLE CONFIGURATION MACROS */ /* */ /* This file contains the default configuration macro definitions for */ /* a standard build of the FreeType library. There are three ways to */ /* use this file to build project-specific versions of the library: */ /* */ /* - You can modify this file by hand, but this is not recommended in */ /* cases where you would like to build several versions of the */ /* library from a single source directory. */ /* */ /* - You can put a copy of this file in your build directory, more */ /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */ /* is the name of a directory that is included _before_ the FreeType */ /* include path during compilation. */ /* */ /* The default FreeType Makefiles and Jamfiles use the build */ /* directory `builds/<system>' by default, but you can easily change */ /* that for your own projects. */ /* */ /* - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it */ /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ /* locate this file during the build. For example, */ /* */ /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */ /* #include <freetype/config/ftheader.h> */ /* */ /* will use `$BUILD/myftoptions.h' instead of this file for macro */ /* definitions. */ /* */ /* Note also that you can similarly pre-define the macro */ /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ /* that are statically linked to the library at compile time. By */ /* default, this file is <freetype/config/ftmodule.h>. */ /* */ /* We highly recommend using the third method whenever possible. */ /* */ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* Uncomment the line below if you want to activate sub-pixel rendering */ /* (a.k.a. LCD rendering, or ClearType) in this build of the library. */ /* */ /* Note that this feature is covered by several Microsoft patents */ /* and should not be activated in any default build of the library. */ /* */ /* This macro has no impact on the FreeType API, only on its */ /* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */ /* FT_Render_Glyph still generates a bitmap that is 3 times wider than */ /* the original size in case this macro isn't defined; however, each */ /* triplet of subpixels has R=G=B. */ /* */ /* This is done to allow FreeType clients to run unmodified, forcing */ /* them to display normal gray-level anti-aliased glyphs. */ /* */ /* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ /*************************************************************************/ /* */ /* Many compilers provide a non-ANSI 64-bit data type that can be used */ /* by FreeType to speed up some computations. However, this will create */ /* some problems when compiling the library in strict ANSI mode. */ /* */ /* For this reason, the use of 64-bit integers is normally disabled when */ /* the __STDC__ macro is defined. You can however disable this by */ /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */ /* */ /* For most compilers, this will only create compilation warnings when */ /* building the library. */ /* */ /* ObNote: The compiler-specific 64-bit integers are detected in the */ /* file `ftconfig.h' either statically or through the */ /* `configure' script on supported platforms. */ /* */ #undef FT_CONFIG_OPTION_FORCE_INT64 /*************************************************************************/ /* */ /* If this macro is defined, do not try to use an assembler version of */ /* performance-critical functions (e.g. FT_MulFix). You should only do */ /* that to verify that the assembler function works properly, or to */ /* execute benchmark tests of the various implementations. */ /* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ /*************************************************************************/ /* */ /* If this macro is defined, try to use an inlined assembler version of */ /* the `FT_MulFix' function, which is a `hotspot' when loading and */ /* hinting glyphs, and which should be executed as fast as possible. */ /* */ /* Note that if your compiler or CPU is not supported, this will default */ /* to the standard and portable implementation found in `ftcalc.c'. */ /* */ #define FT_CONFIG_OPTION_INLINE_MULFIX /*************************************************************************/ /* */ /* LZW-compressed file support. */ /* */ /* FreeType now handles font files that have been compressed with the */ /* `compress' program. This is mostly used to parse many of the PCF */ /* files that come with various X11 distributions. The implementation */ /* uses NetBSD's `zopen' to partially uncompress the file on the fly */ /* (see src/lzw/ftgzip.c). */ /* */ /* Define this macro if you want to enable this `feature'. */ /* */ #define FT_CONFIG_OPTION_USE_LZW /*************************************************************************/ /* */ /* Gzip-compressed file support. */ /* */ /* FreeType now handles font files that have been compressed with the */ /* `gzip' program. This is mostly used to parse many of the PCF files */ /* that come with XFree86. The implementation uses `zlib' to */ /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */ /* */ /* Define this macro if you want to enable this `feature'. See also */ /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */ /* */ #define FT_CONFIG_OPTION_USE_ZLIB /*************************************************************************/ /* */ /* ZLib library selection */ /* */ /* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */ /* It allows FreeType's `ftgzip' component to link to the system's */ /* installation of the ZLib library. This is useful on systems like */ /* Unix or VMS where it generally is already available. */ /* */ /* If you let it undefined, the component will use its own copy */ /* of the zlib sources instead. These have been modified to be */ /* included directly within the component and *not* export external */ /* function names. This allows you to link any program with FreeType */ /* _and_ ZLib without linking conflicts. */ /* */ /* Do not #undef this macro here since the build system might define */ /* it for certain configurations only. */ /* */ /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ /*************************************************************************/ /* */ /* DLL export compilation */ /* */ /* When compiling FreeType as a DLL, some systems/compilers need a */ /* special keyword in front OR after the return type of function */ /* declarations. */ /* */ /* Two macros are used within the FreeType source code to define */ /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ /* */ /* FT_EXPORT( return_type ) */ /* */ /* is used in a function declaration, as in */ /* */ /* FT_EXPORT( FT_Error ) */ /* FT_Init_FreeType( FT_Library* alibrary ); */ /* */ /* */ /* FT_EXPORT_DEF( return_type ) */ /* */ /* is used in a function definition, as in */ /* */ /* FT_EXPORT_DEF( FT_Error ) */ /* FT_Init_FreeType( FT_Library* alibrary ) */ /* { */ /* ... some code ... */ /* return FT_Err_Ok; */ /* } */ /* */ /* You can provide your own implementation of FT_EXPORT and */ /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */ /* will be later automatically defined as `extern return_type' to */ /* allow normal compilation. */ /* */ /* Do not #undef these macros here since the build system might define */ /* them for certain configurations only. */ /* */ /* #define FT_EXPORT(x) extern x */ /* #define FT_EXPORT_DEF(x) x */ /*************************************************************************/ /* */ /* Glyph Postscript Names handling */ /* */ /* By default, FreeType 2 is compiled with the `psnames' module. This */ /* module is in charge of converting a glyph name string into a */ /* Unicode value, or return a Macintosh standard glyph name for the */ /* use with the TrueType `post' table. */ /* */ /* Undefine this macro if you do not want `psnames' compiled in your */ /* build of FreeType. This has the following effects: */ /* */ /* - The TrueType driver will provide its own set of glyph names, */ /* if you build it to support postscript names in the TrueType */ /* `post' table. */ /* */ /* - The Type 1 driver will not be able to synthesize a Unicode */ /* charmap out of the glyphs found in the fonts. */ /* */ /* You would normally undefine this configuration macro when building */ /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */ /* */ #define FT_CONFIG_OPTION_POSTSCRIPT_NAMES /*************************************************************************/ /* */ /* Postscript Names to Unicode Values support */ /* */ /* By default, FreeType 2 is built with the `PSNames' module compiled */ /* in. Among other things, the module is used to convert a glyph name */ /* into a Unicode value. This is especially useful in order to */ /* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver */ /* through a big table named the `Adobe Glyph List' (AGL). */ /* */ /* Undefine this macro if you do not want the Adobe Glyph List */ /* compiled in your `PSNames' module. The Type 1 driver will not be */ /* able to synthesize a Unicode charmap out of the glyphs found in the */ /* fonts. */ /* */ #define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST /*************************************************************************/ /* */ /* Support for Mac fonts */ /* */ /* Define this macro if you want support for outline fonts in Mac */ /* format (mac dfont, mac resource, macbinary containing a mac */ /* resource) on non-Mac platforms. */ /* */ /* Note that the `FOND' resource isn't checked. */ /* */ #define FT_CONFIG_OPTION_MAC_FONTS /*************************************************************************/ /* */ /* Guessing methods to access embedded resource forks */ /* */ /* Enable extra Mac fonts support on non-Mac platforms (e.g. */ /* GNU/Linux). */ /* */ /* Resource forks which include fonts data are stored sometimes in */ /* locations which users or developers don't expected. In some cases, */ /* resource forks start with some offset from the head of a file. In */ /* other cases, the actual resource fork is stored in file different */ /* from what the user specifies. If this option is activated, */ /* FreeType tries to guess whether such offsets or different file */ /* names must be used. */ /* */ /* Note that normal, direct access of resource forks is controlled via */ /* the FT_CONFIG_OPTION_MAC_FONTS option. */ /* */ #ifdef FT_CONFIG_OPTION_MAC_FONTS #define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK #endif /*************************************************************************/ /* */ /* Allow the use of FT_Incremental_Interface to load typefaces that */ /* contain no glyph data, but supply it via a callback function. */ /* This is required by clients supporting document formats which */ /* supply font data incrementally as the document is parsed, such */ /* as the Ghostscript interpreter for the PostScript language. */ /* */ #define FT_CONFIG_OPTION_INCREMENTAL /*************************************************************************/ /* */ /* The size in bytes of the render pool used by the scan-line converter */ /* to do all of its work. */ /* */ /* This must be greater than 4KByte if you use FreeType to rasterize */ /* glyphs; otherwise, you may set it to zero to avoid unnecessary */ /* allocation of the render pool. */ /* */ #define FT_RENDER_POOL_SIZE 16384L /*************************************************************************/ /* */ /* FT_MAX_MODULES */ /* */ /* The maximum number of modules that can be registered in a single */ /* FreeType library object. 32 is the default. */ /* */ #define FT_MAX_MODULES 32 /*************************************************************************/ /* */ /* Debug level */ /* */ /* FreeType can be compiled in debug or trace mode. In debug mode, */ /* errors are reported through the `ftdebug' component. In trace */ /* mode, additional messages are sent to the standard output during */ /* execution. */ /* */ /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */ /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */ /* */ /* Don't define any of these macros to compile in `release' mode! */ /* */ /* Do not #undef these macros here since the build system might define */ /* them for certain configurations only. */ /* */ /* #define FT_DEBUG_LEVEL_ERROR */ /* #define FT_DEBUG_LEVEL_TRACE */ /*************************************************************************/ /* */ /* Memory Debugging */ /* */ /* FreeType now comes with an integrated memory debugger that is */ /* capable of detecting simple errors like memory leaks or double */ /* deletes. To compile it within your build of the library, you */ /* should define FT_DEBUG_MEMORY here. */ /* */ /* Note that the memory debugger is only activated at runtime when */ /* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */ /* */ /* Do not #undef this macro here since the build system might define */ /* it for certain configurations only. */ /* */ /* #define FT_DEBUG_MEMORY */ /*************************************************************************/ /* */ /* Module errors */ /* */ /* If this macro is set (which is _not_ the default), the higher byte */ /* of an error code gives the module in which the error has occurred, */ /* while the lower byte is the real error code. */ /* */ /* Setting this macro makes sense for debugging purposes only, since */ /* it would break source compatibility of certain programs that use */ /* FreeType 2. */ /* */ /* More details can be found in the files ftmoderr.h and fterrors.h. */ /* */ #undef FT_CONFIG_OPTION_USE_MODULE_ERRORS /*************************************************************************/ /* */ /* Position Independent Code */ /* */ /* If this macro is set (which is _not_ the default), FreeType2 will */ /* avoid creating constants that require address fixups. Instead the */ /* constants will be moved into a struct and additional intialization */ /* code will be used. */ /* */ /* Setting this macro is needed for systems that prohibit address */ /* fixups, such as BREW. */ /* */ /* #define FT_CONFIG_OPTION_PIC */ /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */ /* embedded bitmaps in all formats using the SFNT module (namely */ /* TrueType & OpenType). */ /* */ #define TT_CONFIG_OPTION_EMBEDDED_BITMAPS /*************************************************************************/ /* */ /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */ /* load and enumerate the glyph Postscript names in a TrueType or */ /* OpenType file. */ /* */ /* Note that when you do not compile the `PSNames' module by undefining */ /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */ /* contain additional code used to read the PS Names table from a font. */ /* */ /* (By default, the module uses `PSNames' to extract glyph names.) */ /* */ #define TT_CONFIG_OPTION_POSTSCRIPT_NAMES /*************************************************************************/ /* */ /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */ /* access the internal name table in a SFNT-based format like TrueType */ /* or OpenType. The name table contains various strings used to */ /* describe the font, like family name, copyright, version, etc. It */ /* does not contain any glyph name though. */ /* */ /* Accessing SFNT names is done through the functions declared in */ /* `freetype/ftsnames.h'. */ /* */ #define TT_CONFIG_OPTION_SFNT_NAMES /*************************************************************************/ /* */ /* TrueType CMap support */ /* */ /* Here you can fine-tune which TrueType CMap table format shall be */ /* supported. */ #define TT_CONFIG_CMAP_FORMAT_0 #define TT_CONFIG_CMAP_FORMAT_2 #define TT_CONFIG_CMAP_FORMAT_4 #define TT_CONFIG_CMAP_FORMAT_6 #define TT_CONFIG_CMAP_FORMAT_8 #define TT_CONFIG_CMAP_FORMAT_10 #define TT_CONFIG_CMAP_FORMAT_12 #define TT_CONFIG_CMAP_FORMAT_13 #define TT_CONFIG_CMAP_FORMAT_14 /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ /* a bytecode interpreter in the TrueType driver. */ /* */ /* By undefining this, you will only compile the code necessary to load */ /* TrueType glyphs without hinting. */ /* */ /* Do not #undef this macro here, since the build system might */ /* define it for certain configurations only. */ /* */ #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER /*************************************************************************/ /* */ /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */ /* of the TrueType bytecode interpreter is used that doesn't implement */ /* any of the patented opcodes and algorithms. The patents related to */ /* TrueType hinting have expired worldwide since May 2010; this option */ /* is now deprecated. */ /* */ /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */ /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */ /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */ /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */ /* */ /* This macro is only useful for a small number of font files (mostly */ /* for Asian scripts) that require bytecode interpretation to properly */ /* load glyphs. For all other fonts, this produces unpleasant results, */ /* thus the unpatented interpreter is never used to load glyphs from */ /* TrueType fonts unless one of the following two options is used. */ /* */ /* - The unpatented interpreter is explicitly activated by the user */ /* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */ /* when opening the FT_Face. */ /* */ /* - FreeType detects that the FT_Face corresponds to one of the */ /* `trick' fonts (e.g., `Mingliu') it knows about. The font engine */ /* contains a hard-coded list of font names and other matching */ /* parameters (see function `tt_face_init' in file */ /* `src/truetype/ttobjs.c'). */ /* */ /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */ /* */ /* { */ /* FT_Parameter parameter; */ /* FT_Open_Args open_args; */ /* */ /* */ /* parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING; */ /* */ /* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; */ /* open_args.pathname = my_font_pathname; */ /* open_args.num_params = 1; */ /* open_args.params = ¶meter; */ /* */ /* error = FT_Open_Face( library, &open_args, index, &face ); */ /* ... */ /* } */ /* */ /* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */ /*************************************************************************/ /* */ /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */ /* bytecode interpreter with a huge switch statement, rather than a call */ /* table. This results in smaller and faster code for a number of */ /* architectures. */ /* */ /* Note however that on some compiler/processor combinations, undefining */ /* this macro will generate faster, though larger, code. */ /* */ #define TT_CONFIG_OPTION_INTERPRETER_SWITCH /*************************************************************************/ /* */ /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ /* TrueType glyph loader to use Apple's definition of how to handle */ /* component offsets in composite glyphs. */ /* */ /* Apple and MS disagree on the default behavior of component offsets */ /* in composites. Apple says that they should be scaled by the scaling */ /* factors in the transformation matrix (roughly, it's more complex) */ /* while MS says they should not. OpenType defines two bits in the */ /* composite flags array which can be used to disambiguate, but old */ /* fonts will not have them. */ /* */ /* http://partners.adobe.com/asn/developer/opentype/glyf.html */ /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ /* */ #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED /*************************************************************************/ /* */ /* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include */ /* support for Apple's distortable font technology (fvar, gvar, cvar, */ /* and avar tables). This has many similarities to Type 1 Multiple */ /* Masters support. */ /* */ #define TT_CONFIG_OPTION_GX_VAR_SUPPORT /*************************************************************************/ /* */ /* Define TT_CONFIG_OPTION_BDF if you want to include support for */ /* an embedded `BDF ' table within SFNT-based bitmap formats. */ /* */ #define TT_CONFIG_OPTION_BDF /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */ /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ /* required. */ /* */ #define T1_MAX_DICT_DEPTH 5 /*************************************************************************/ /* */ /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ /* calls during glyph loading. */ /* */ #define T1_MAX_SUBRS_CALLS 16 /*************************************************************************/ /* */ /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ /* minimum of 16 is required. */ /* */ /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */ /* */ #define T1_MAX_CHARSTRINGS_OPERANDS 256 /*************************************************************************/ /* */ /* Define this configuration macro if you want to prevent the */ /* compilation of `t1afm', which is in charge of reading Type 1 AFM */ /* files into an existing face. Note that if set, the T1 driver will be */ /* unable to produce kerning distances. */ /* */ #undef T1_CONFIG_OPTION_NO_AFM /*************************************************************************/ /* */ /* Define this configuration macro if you want to prevent the */ /* compilation of the Multiple Masters font support in the Type 1 */ /* driver. */ /* */ #undef T1_CONFIG_OPTION_NO_MM_SUPPORT /*************************************************************************/ /*************************************************************************/ /**** ****/ /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ /**** ****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* Compile autofit module with CJK (Chinese, Japanese, Korean) script */ /* support. */ /* */ #define AF_CONFIG_OPTION_CJK /*************************************************************************/ /* */ /* Compile autofit module with Indic script support. */ /* */ #define AF_CONFIG_OPTION_INDIC /* */ /* * Define this variable if you want to keep the layout of internal * structures that was used prior to FreeType 2.2. This also compiles in * a few obsolete functions to avoid linking problems on typical Unix * distributions. * * For embedded systems or building a new distribution from scratch, it * is recommended to disable the macro since it reduces the library's code * size and activates a few memory-saving optimizations as well. */ #define FT_CONFIG_OPTION_OLD_INTERNALS /* * To detect legacy cache-lookup call from a rogue client (<= 2.1.7), * we restrict the number of charmaps in a font. The current API of * FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API * takes charcode only. To determine the passed value is for cmap_index * or charcode, the possible cmap_index is restricted not to exceed * the minimum possible charcode by a rogue client. It is also very * unlikely that a rogue client is interested in Unicode values 0 to 15. * * NOTE: The original threshold was 4 deduced from popular number of * cmap subtables in UCS-4 TrueType fonts, but now it is n/***************************************************************************/ /* */ /* ftstdlib.h */ /* */ /* ANSI-specific library and header configuration file (specification */ /* only). */ /* */ /* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /* */ /* This file is used to group all #includes to the ANSI C library that */ /* FreeType normally requires. It also defines macros to rename the */ /* standard functions within the FreeType source code. */ /* */ /* Load a file which defines __FTSTDLIB_H__ before this one to override */ /* it. */ /* */ /*************************************************************************/ #ifndef __FTSTDLIB_H__ #define __FTSTDLIB_H__ #include <stddef.h> #define ft_ptrdiff_t ptrdiff_t /**********************************************************************/ /* */ /* integer limits */ /* */ /* UINT_MAX and ULONG_MAX are used to automatically compute the size */ /* of `int' and `long' in bytes at compile-time. So far, this works */ /* for all platforms the library has been tested on. */ /* */ /* Note that on the extremely rare platforms that do not provide */ /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */ /* old Crays where `int' is 36 bits), we do not make any guarantee */ /* about the correct behaviour of FT2 with all fonts. */ /* */ /* In these case, `ftconfig.h' will refuse to compile anyway with a */ /* message like `couldn't find 32-bit type' or something similar. */ /* */ /**********************************************************************/ #include <limits.h> #define FT_CHAR_BIT CHAR_BIT #define FT_INT_MAX INT_MAX #define FT_INT_MIN INT_MIN #define FT_UINT_MAX UINT_MAX #define FT_ULONG_MAX ULONG_MAX /**********************************************************************/ /* */ /* character and string processing */ /* */ /**********************************************************************/ #include <string.h> #define ft_memchr memchr #define ft_memcmp memcmp #define ft_memcpy memcpy #define ft_memmove memmove #define ft_memset memset #define ft_strcat strcat #define ft_strcmp strcmp #define ft_strcpy strcpy #define ft_strlen strlen #define ft_strncmp strncmp #define ft_strncpy strncpy #define ft_strrchr strrchr #define ft_strstr strstr /**********************************************************************/ /* */ /* file handling */ /* */ /**********************************************************************/ #include <stdio.h> #define FT_FILE FILE #define ft_fclose fclose #define ft_fopen fopen #define ft_fread fread #define ft_fseek fseek #define ft_ftell ftell #define ft_sprintf sprintf /**********************************************************************/ /* */ /* sorting */ /* */ /**********************************************************************/ #include <stdlib.h> #define ft_qsort qsort /**********************************************************************/ /* */ /* memory allocation */ /* */ /**********************************************************************/ #define ft_scalloc calloc #define ft_sfree free #define ft_smalloc malloc #define ft_srealloc realloc /**********************************************************************/ /* */ /* miscellaneous */ /* */ /**********************************************************************/ #define ft_atol atol #define ft_labs labs /**********************************************************************/ /* */ /* execution control */ /* */ /**********************************************************************/ #include <setjmp.h> #define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */ /* jmp_buf is defined as a macro */ /* on certain platforms */ #define ft_longjmp longjmp #define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) ) /* same thing here */ /* the following is only used for debugging purposes, i.e., if */ /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */ #include <stdarg.h> #endif /* __FTSTDLIB_H__ */ /* END */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * $Id: lang.h,v 1.3 2005/09/01 19:23:14 cpressey Exp $ */ #ifndef __LANG_H_ #define __LANG_H_ #ifdef __cplusplus extern "C" { #endif int set_lang_syscons(const char *); int set_lang_envars(const char *); #ifdef __cplusplus } #endif #endif /* !__LANG_H_ */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftadvanc.h */ /* */ /* Quick computation of advance widths (specification only). */ /* */ /* Copyright 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTADVANC_H__ #define __FTADVANC_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /************************************************************************** * * @section: * quick_advance * * @title: * Quick retrieval of advance values * * @abstract: * Retrieve horizontal and vertical advance values without processing * glyph outlines, if possible. * * @description: * This section contains functions to quickly extract advance values * without handling glyph outlines, if possible. */ /*************************************************************************/ /* */ /* <Const> */ /* FT_ADVANCE_FLAG_FAST_ONLY */ /* */ /* <Description> */ /* A bit-flag to be OR-ed with the `flags' parameter of the */ /* @FT_Get_Advance and @FT_Get_Advances functions. */ /* */ /* If set, it indicates that you want these functions to fail if the */ /* corresponding hinting mode or font driver doesn't allow for very */ /* quick advance computation. */ /* */ /* Typically, glyphs which are either unscaled, unhinted, bitmapped, */ /* or light-hinted can have their advance width computed very */ /* quickly. */ /* */ /* Normal and bytecode hinted modes, which require loading, scaling, */ /* and hinting of the glyph outline, are extremely slow by */ /* comparison. */ /* */ #define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000UL /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Advance */ /* */ /* <Description> */ /* Retrieve the advance value of a given glyph outline in an */ /* @FT_Face. By default, the unhinted advance is returned in font */ /* units. */ /* */ /* <Input> */ /* face :: The source @FT_Face handle. */ /* */ /* gindex :: The glyph index. */ /* */ /* load_flags :: A set of bit flags similar to those used when */ /* calling @FT_Load_Glyph, used to determine what kind */ /* of advances you need. */ /* <Output> */ /* padvance :: The advance value, in either font units or 16.16 */ /* format. */ /* */ /* If @FT_LOAD_VERTICAL_LAYOUT is set, this is the */ /* vertical advance corresponding to a vertical layout. */ /* Otherwise, it is the horizontal advance in a */ /* horizontal layout. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ /* <Note> */ /* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and */ /* if the corresponding font backend doesn't have a quick way to */ /* retrieve the advances. */ /* */ /* A scaled advance is returned in 16.16 format but isn't transformed */ /* by the affine transformation specified by @FT_Set_Transform. */ /* */ FT_EXPORT( FT_Error ) FT_Get_Advance( FT_Face face, FT_UInt gindex, FT_Int32 load_flags, FT_Fixed *padvance ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Advances */ /* */ /* <Description> */ /* Retrieve the advance values of several glyph outlines in an */ /* @FT_Face. By default, the unhinted advances are returned in font */ /* units. */ /* */ /* <Input> */ /* face :: The source @FT_Face handle. */ /* */ /* start :: The first glyph index. */ /* */ /* count :: The number of advance values you want to retrieve. */ /* */ /* load_flags :: A set of bit flags similar to those used when */ /* calling @FT_Load_Glyph. */ /* */ /* <Output> */ /* padvance :: The advances, in either font units or 16.16 format. */ /* This array must contain at least `count' elements. */ /* */ /* If @FT_LOAD_VERTICAL_LAYOUT is set, these are the */ /* vertical advances corresponding to a vertical layout. */ /* Otherwise, they are the horizontal advances in a */ /* horizontal layout. */ /* */ /* <Return> */ /* FreeType error code. 0 means success. */ /* */ /* <Note> */ /* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and */ /* if the corresponding font backend doesn't have a quick way to */ /* retrieve the advances. */ /* */ /* Scaled advances are returned in 16.16 format but aren't */ /* transformed by the affine transformation specified by */ /* @FT_Set_Transform. */ /* */ FT_EXPORT( FT_Error ) FT_Get_Advances( FT_Face face, FT_UInt start, FT_UInt count, FT_Int32 load_flags, FT_Fixed *padvances ); /* */ FT_END_HEADER #endif /* __FTADVANC_H__ */ /* END */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� this function returns * successfully also for CID-keyed fonts in an SNFT wrapper. * * @input: * face :: * A handle to the input face. * * @output: * is_cid :: * The type of the face as an @FT_Bool. * * @return: * FreeType error code. 0~means success. * * @note: * This function only works with CID faces and OpenType fonts, * returning an error otherwise. * * @since: * 2.3.9 */ FT_EXPORT( FT_Error ) FT_Get_CID_Is_Internally_CID_Keyed( FT_Face face, FT_Bool *is_cid ); /********************************************************************** * * @function: * FT_Get_CID_From_Glyph_Index * * @description: * Retrieve the CID of the input glyph index. * * @input: * face :: * A handle to the input face. * * glyph_index :: * The input glyph index. * * @output: * cid :: * The CID as an @FT_UInt. * * @return: * FreeType error code. 0~means success. * * @note: * This function only works with CID faces and OpenType fonts, * returning an error otherwise. * * @since: * 2.3.9 */ FT_EXPORT( FT_Error ) FT_Get_CID_From_Glyph_Index( FT_Face face, FT_UInt glyph_index, FT_UInt *cid ); /* */ FT_END_HEADER #endif /* __FTCID_H__ */ /* END */ �����������������������������������������������������/***************************************************************************/ /* */ /* ftbbox.h */ /* */ /* FreeType exact bbox computation (specification). */ /* */ /* Copyright 1996-2001, 2003, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /* */ /* This component has a _single_ role: to compute exact outline bounding */ /* boxes. */ /* */ /* It is separated from the rest of the engine for various technical */ /* reasons. It may well be integrated in `ftoutln' later. */ /* */ /*************************************************************************/ #ifndef __FTBBOX_H__ #define __FTBBOX_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* outline_processing */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_Get_BBox */ /* */ /* <Description> */ /* Compute the exact bounding box of an outline. This is slower */ /* than computing the control box. However, it uses an advanced */ /* algorithm which returns _very_ quickly when the two boxes */ /* coincide. Otherwise, the outline Bézier arcs are traversed to */ /* extract their extrema. */ /* */ /* <Input> */ /* outline :: A pointer to the source outline. */ /* */ /* <Output> */ /* abbox :: The outline's exact bounding box. */ /* /***************************************************************************/ /* */ /* ftbdf.h */ /* */ /* FreeType API for accessing BDF-specific strings (specification). */ /* */ /* Copyright 2002, 2003, 2004, 2006, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTBDF_H__ #define __FTBDF_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* bdf_fonts */ /* */ /* <Title> */ /* BDF and PCF Files */ /* */ /* <Abstract> */ /* BDF and PCF specific API. */ /* */ /* <Description> */ /* This section contains the declaration of functions specific to BDF */ /* and PCF fonts. */ /* */ /*************************************************************************/ /********************************************************************** * * @enum: * FT_PropertyType * * @description: * A list of BDF property types. * * @values: * BDF_PROPERTY_TYPE_NONE :: * Value~0 is used to indicate a missing property. * * BDF_PROPERTY_TYPE_ATOM :: * Property is a string atom. * * BDF_PROPERTY_TYPE_INTEGER :: * Property is a 32-bit signed integer. * * BDF_PROPERTY_TYPE_CARDINAL :: * Property is a 32-bit unsigned integer. */ typedef enum BDF_PropertyType_ { BDF_PROPERTY_TYPE_NONE = 0, BDF_PROPERTY_TYPE_ATOM = 1, BDF_PROPERTY_TYPE_INTEGER = 2, BDF_PROPERTY_TYPE_CARDINAL = 3 } BDF_PropertyType; /********************************************************************** * * @type: * BDF_Property * * @description: * A handle to a @BDF_PropertyRec structure to model a given * BDF/PCF property. */ typedef struct BDF_PropertyRec_* BDF_Property; /********************************************************************** * * @struct: * BDF_PropertyRec * * @description: * This structure models a given BDF/PCF property. * * @fields: * type :: * The property type. * * u.atom :: * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. * * u.integer :: * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER. * * u.cardinal :: * An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL. */ typedef struct BDF_PropertyRec_ { BDF_PropertyType type; union { const char* atom; FT_Int32 integer; FT_UInt32 cardinal; } u; } BDF_PropertyRec; /********************************************************************** * * @function: * FT_Get_BDF_Charset_ID * * @description: * Retrieve a BDF font character set identity, according to * the BDF specification. * * @input: * face :: * A handle to the input face. * * @output: * acharset_encoding :: * Charset encoding, as a C~string, owned by the face. * * acharset_registry :: * Charset registry, as a C~string, owned by the face. * * @return: * FreeType error code. 0~means success. * * @note: * This function only works with BDF faces, returning an error otherwise. */ FT_EXPORT( FT_Error ) FT_Get_BDF_Charset_ID( FT_Face face, const char* *acharset_encoding, const char* *acharset_registry ); /********************************************************************** * * @function: * FT_Get_BDF_Property * * @description: * Retrieve a BDF property from a BDF or PCF font file. * * @input: * face :: A handle to the input face. * * name :: The property name. * * @output: * aproperty :: The property. * * @return: * FreeType error code. 0~means success. * * @note: * This function works with BDF _and_ PCF fonts. It returns an error * otherwise. It also returns an error if the property is not in the * font. * * A `property' is a either key-value pair within the STARTPROPERTIES * ... ENDPROPERTIES block of a BDF font or a key-value pair from the * `info->props' array within a `FontRec' structure of a PCF font. * * Integer properties are always stored as `signed' within PCF fonts; * consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value * for BDF fonts only. * * In case of error, `aproperty->type' is always set to * @BDF_PROPERTY_TYPE_NONE. */ FT_EXPORT( FT_Error ) FT_Get_BDF_Property( FT_Face face, const char* prop_name, BDF_PropertyRec *aproperty ); /* */ FT_END_HEADER #endif /* __FTBDF_H__ */ /* END */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������s�������������8@@�����8@������������������������������������y�������������H@@�����H@������#������������������������������������������c@�����c��������������������������������������������������dP������d�������������������������������������������������dP�����d������x������������������������������������������gP�����g����������������������������������������������0iP�����0i�������������������������������������������������@iP�����@i�������������������������������������������������PiP�����Pi�������������������������������������������������XiP�����Xi������������������������������������������������PjP�����Pj���������������������������������������������������������Pj���������������������������������������������������������k����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftbitmap.h */ /* */ /* FreeType utility functions for bitmaps (specification). */ /* */ /* Copyright 2004, 2005, 2006, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTBITMAP_H__ #define __FTBITMAP_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* bitmap_handling */ /* */ /* <Title> */ /* Bitmap Handling */ /* */ /* <Abstract> */ /* Handling FT_Bitmap objects. */ /* */ /* <Description> */ /* This section contains functions for converting FT_Bitmap objects. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Function> */ /* FT_Bitmap_New */ /* */ /* <Description> */ /* Initialize a pointer to an @FT_Bitmap structure. */ /* */ /* <InOut> */ /* abitmap :: A pointer to the bitmap structure. */ /* */ FT_EXPORT( void ) FT_Bitmap_New( FT_Bitmap *abitmap ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Bitmap_Copy */ /* */ /* <Description> */ /* Copy a bitmap into another one. */ /* */ /* <Input> */ /* library :: A handle to a library object. */ /* */ /* source :: A handle to the source bitmap. */ /* */ /* <Output> */ /* target :: A handle to the target bitmap. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Bitmap_Copy( FT_Library library, const FT_Bitmap *source, FT_Bitmap *target); /*************************************************************************/ /* */ /* <Function> */ /* FT_Bitmap_Embolden */ /* */ /* <Description> */ /* Embolden a bitmap. The new bitmap will be about `xStrength' */ /* pixels wider and `yStrength' pixels higher. The left and bottom */ /* borders are kept unchanged. */ /* */ /* <Input> */ /* library :: A handle to a library object. */ /* */ /* xStrength :: How strong the glyph is emboldened horizontally. */ /* Expressed in 26.6 pixel format. */ /* */ /* yStrength :: How strong the glyph is emboldened vertically. */ /* Expressed in 26.6 pixel format. */ /* */ /* <InOut> */ /* bitmap :: A handle to the target bitmap. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The current implementation restricts `xStrength' to be less than */ /* or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. */ /* */ /* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */ /* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */ /* */ FT_EXPORT( FT_Error ) FT_Bitmap_Embolden( FT_Library library, FT_Bitmap* bitmap, FT_Pos xStrength, FT_Pos yStrength ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Bitmap_Convert */ /* */ /* <Description> */ /* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a */ /* bitmap object with depth 8bpp, making the number of used bytes per */ /* line (a.k.a. the `pitch') a multiple of `alignment'. */ /* */ /* <Input> */ /* library :: A handle to a library object. */ /* */ /* source :: The source bitmap. */ /* */ /* alignment :: The pitch of the bitmap is a multiple of this */ /* parameter. Common values are 1, 2, or 4. */ /* */ /* <Output> */ /* target :: The target bitmap. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* It is possible to call @FT_Bitmap_Convert multiple times without */ /* calling @FT_Bitmap_Done (the memory is simply reallocated). */ /* */ /* Use @FT_Bitmap_Done to finally remove the bitmap object. */ /* */ /* The `library' argument is taken to have access to FreeType's */ /* memory handling functions. */ /* */ FT_EXPORT( FT_Error ) FT_Bitmap_Convert( FT_Library library, const FT_Bitmap *source, FT_Bitmap *target, FT_Int alignment ); /*************************************************************************/ /* */ /* <Function> */ /* FT_GlyphSlot_Own_Bitmap */ /* */ /* <Description> */ /* Make sure that a glyph slot owns `slot->bitmap'. */ /* */ /* <Input> */ /* slot :: The glyph slot. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* This function is to be used in combination with */ /* @FT_Bitmap_Embolden. */ /* */ FT_EXPORT( FT_Error ) FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Bitmap_Done */ /* */ /* <Description> */ /* Destroy a bitmap object created with @FT_Bitmap_New. */ /* */ /* <Input> */ /* library :: A handle to a library object. */ /* */ /* bitmap :: The bitmap object to be freed. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The `library' argument is taken to have access to FreeType's */ /* memory handling functions. */ /* */ FT_EXPORT( FT_Error ) FT_Bitmap_Done( FT_Library library, FT_Bitmap *bitmap ); /* */ FT_END_HEADER #endif /* __FTBITMAP_H__ */ /* END */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������RR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s ) /* this is only used for <module>_Err_Ok, which must be 0! */ #define FT_NOERRORDEF_( e, v, s ) \ FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s ) #ifdef FT_ERROR_START_LIST FT_ERROR_START_LIST #endif /* now include the error codes */ #include FT_ERROR_DEFINITIONS_H #ifdef FT_ERROR_END_LIST FT_ERROR_END_LIST #endif /*******************************************************************/ /*******************************************************************/ /***** *****/ /***** SIMPLE CLEANUP *****/ /***** *****/ /*******************************************************************/ /*******************************************************************/ #ifdef FT_NEED_EXTERN_C } #endif #undef FT_ERROR_START_LIST #undef FT_ERROR_END_LIST #undef FT_ERRORDEF #undef FT_ERRORDEF_ #undef FT_NOERRORDEF_ #undef FT_NEED_EXTERN_C #undef FT_ERR_CONCAT #undef FT_ERR_BASE /* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */ #ifndef FT_KEEP_ERR_PREFIX #undef FT_ERR_PREFIX #endif #endif /* __FTERRORS_H__ */ /* END */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� �.���� �..������ pkgconfig�>����ldconfig�>���� ldconfig32�>��� charset.alias�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* This file defines the structure of the FreeType reference. */ /* It is used by the python script which generates the HTML files. */ /* */ /***************************************************************************/ /***************************************************************************/ /* */ /* <Chapter> */ /* general_remarks */ /* */ /* <Title> */ /* General Remarks */ /* */ /* <Sections> */ /* user_allocation */ /* */ /***************************************************************************/ /***************************************************************************/ /* */ /* <Chapter> */ /* core_api */ /* */ /* <Title> */ /* Core API */ /* */ /* <Sections> */ /* version */ /* basic_types */ /* base_interface */ /* glyph_variants */ /* glyph_management */ /* mac_specific */ /* sizes_management */ /* header_file_macros */ /* */ /***************************************************************************/ /***************************************************************************/ /* */ /* <Chapter> */ /* format_specific */ /* */ /* <Title> */ /* Format-Specific API */ /* */ /* <Sections> */ /* multiple_masters */ /* truetype_tables */ /* type1_tables */ /* sfnt_names */ /* bdf_fonts */ /* cid_fonts */ /* pfr_fonts H��P��X��`��h��p��x������������������������������������������� ��(��0��8��@��H��P��X��`��h��p��x������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ */ /* winfnt_fonts */ /* font_formats */ /* gasp_table */ /* */ /***************************************************************************/ /***************************************************************************/ /* */ /* <Chapter> */ /* cache_subsystem */ /* */ /* <Title> */ /* Cache Sub-System */ /* */ /* <Sections> */ /* cache_subsystem */ /* */ /***************************************************************************/ /***************************************************************************/ /* */ /* <Chapter> */ /* support_api */ /* */ /* <Title> */ /* Support API */ /* */ /* <Sections> */ /* computations */ /* list_processing */ /* outline_processing */ /* quick_advance */ /* bitmap_handling */ /* raster */ /* glyph_stroker */ /* system_interface */ /* module_management */ /* gzip */ /* lzw */ /* lcd_filtering */ /* */ /***************************************************************************/ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� �.������ �..������ libpng14.pc����� libpng.pc�@����� libart-2.0.pc���� freetype2.pc�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* freetype.h */ /* */ /* FreeType high-level API and common types (specification only). */ /* */ /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ /* 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef FT_FREETYPE_H #error "`ft2build.h' hasn't been included yet!" #error "Please always use macros to include FreeType header files." #error "Example:" #error " #include <ft2build.h>" #error " #include FT_FREETYPE_H" #endif #ifndef __FREETYPE_H__ #define __FREETYPE_H__ #include <ft2build.h> #include FT_CONFIG_CONFIG_H #include FT_ERRORS_H #include FT_TYPES_H FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* user_allocation */ /* */ /* <Title> */ /* User allocation */ /* */ /* <Abstract> */ /* How client applications should allocate FreeType data structures. */ /* */ /* <Description> */ /* FreeType assumes that structures allocated by the user and passed */ /* as arguments are zeroed out except for the actual data. In other */ /* words, it is recommended to use `calloc' (or variants of it) */ /* instead of `malloc' for allocation. */ /* */ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* B A S I C T Y P E S */ /* */ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* <Section> */ /* base_interface */ /* */ /* <Title> */ /* Base Interface */ /* */ /* <Abstract> */ /* The FreeType~2 base font interface. */ /* */ /* <Description> */ /* This section describes the public high-level API of FreeType~2. */ /* */ /* <Order> */ /* FT_Library */ /* FT_Face */ /* FT_Size */ /* FT_GlyphSlot */ /* FT_CharMap */ /* FT_Encoding */ /* */ /* FT_FaceRec */ /* */ /* FT_FACE_FLAG_SCALABLE */ /* FT_FACE_FLAG_FIXED_SIZES */ /* FT_FACE_FLAG_FIXED_WIDTH */ /* FT_FACE_FLAG_HORIZONTAL */ /* FT_FACE_FLAG_VERTICAL */ /* FT_FACE_FLAG_SFNT */ /* FT_FACE_FLAG_KERNING */ /* FT_FACE_FLAG_MULTIPLE_MASTERS */ /* FT_FACE_FLAG_GLYPH_NAMES */ /* FT_FACE_FLAG_EXTERNAL_STREAM */ /* FT_FACE_FLAG_FAST_GLYPHS */ /* FT_FACE_FLAG_HINTER */ /* */ /* FT_STYLE_FLAG_BOLD */ /* FT_STYLE_FLAG_ITALIC */ /* */ /* FT_SizeRec */ /* FT_Size_Metrics */ /* */ /* FT_GlyphSlotRec */ /* FT_Glyph_Metrics */ /* FT_SubGlyph */ /* */ /* FT_Bitmap_Size */ /* */ /* FT_Init_FreeType */ /* FT_Done_FreeType */ /* */ /* FT_New_Face */ /* FT_Done_Face */ /* FT_New_Memory_Face */ /* FT_Open_Face */ /* FT_Open_Args */ /* FT_Parameter */ /* FT_Attach_File */ /* FT_Attach_Stream */ /* */ /* FT_Set_Char_Size */ /* FT_Set_Pixel_Sizes */ /* FT_Request_Size */ /* FT_Select_Size */ /* FT_Size_Request_Type */ /* FT_Size_Request */ /* FT_Set_Transform */ /* FT_Load_Glyph */ /* FT_Get_Char_Index */ /* FT_Get_Name_Index */ /* FT_Load_Char */ /* */ /* FT_OPEN_MEMORY */ /* FT_OPEN_STREAM */ /* FT_OPEN_PATHNAME */ /* FT_OPEN_DRIVER */ /* FT_OPEN_PARAMS */ /* */ /* FT_LOAD_DEFAULT */ /* FT_LOAD_RENDER */ /* FT_LOAD_MONOCHROME */ /* FT_LOAD_LINEAR_DESIGN */ /* FT_LOAD_NO_SCALE */ /* FT_LOAD_NO_HINTING */ /* FT_LOAD_NO_BITMAP */ /* FT_LOAD_CROP_BITMAP */ /* */ /* FT_LOAD_VERTICAL_LAYOUT */ /* FT_LOAD_IGNORE_TRANSFORM */ /* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH */ /* FT_LOAD_FORCE_AUTOHINT */ /* FT_LOAD_NO_RECURSE */ /* FT_LOAD_PEDANTIC */ /* */ /* FT_LOAD_TARGET_NORMAL */ /* FT_LOAD_TARGET_LIGHT */ /* FT_LOAD_TARGET_MONO */ /* FT_LOAD_TARGET_LCD */ /* FT_LOAD_TARGET_LCD_V */ /* */ /* FT_Render_Glyph */ /* FT_Render_Mode */ /* FT_Get_Kerning */ /* FT_Kerning_Mode */ /* FT_Get_Track_Kerning */ /* FT_Get_Glyph_Name */ /* FT_Get_Postscript_Name */ /* */ /* FT_CharMapRec */ /* FT_Select_Charmap */ /* FT_Set_Charmap */ /* FT_Get_Charmap_Index */ /* */ /* FT_FSTYPE_INSTALLABLE_EMBEDDING */ /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING */ /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING */ /* FT_FSTYPE_EDITABLE_EMBEDDING */ /* FT_FSTYPE_NO_SUBSETTING */ /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY */ /* */ /* FT_Get_FSType_Flags */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Struct> */ /* FT_Glyph_Metrics */ /* */ /* <Description> */ /* A structure used to model the metrics of a single glyph. The */ /* values are expressed in 26.6 fractional pixel format; if the flag */ /* @FT_LOAD_NO_SCALE has been used while loading the glyph, values */ /* are expressed in font units instead. */ /* */ /* <Fields> */ /* width :: */ /* The glyph's width. */ /* */ /* height :: */ /* The glyph's height. */ /* */ /* horiBearingX :: */ /* Left side bearing for horizontal layout. */ /* */ /* horiBearingY :: */ /* Top side bearing for horizontal layout. */ /* */ /* horiAdvance :: */ /* Advance width for horizontal layout. */ /* */ /* vertBearingX :: */ /* Left side bearing for vertical layout. */ /* */ /* vertBearingY :: */ /* Top side bearing for vertical layout. */ /* */ /* vertAdvance :: */ /* Advance height for vertical layout. */ /* */ /* <Note> */ /* If not disabled with @FT_LOAD_NO_HINTING, the values represent */ /* dimensions of the hinted glyph (in case hinting is applicable). */ /* */ typedef struct FT_Glyph_Metrics_ { FT_Pos width; FT_Pos height; FT_Pos horiBearingX; FT_Pos horiBearingY; FT_Pos horiAdvance; FT_Pos vertBearingX; FT_Pos vertBearingY; FT_Pos vertAdvance; } FT_Glyph_Metrics; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Bitmap_Size */ /* */ /* <Description> */ /* This structure models the metrics of a bitmap strike (i.e., a set */ /* of glyphs for a given point size and resolution) in a bitmap font. */ /* It is used for the `available_sizes' field of @FT_Face. */ /* */ /* <Fields> */ /* height :: The vertical distance, in pixels, between two */ /* consecutive baselines. It is always positive. */ /* */ /* width :: The average width, in pixels, of all glyphs in the */ /* strike. */ /* */ /* size :: The nominal size of the strike in 26.6 fractional */ /* points. This field is not very useful. */ /* */ /* x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional */ /* pixels. */ /* */ /* y_ppem :: The vertical ppem (nominal height) in 26.6 fractional */ /* pixels. */ /* */ /* <Note> */ /* Windows FNT: */ /* The nominal size given in a FNT font is not reliable. Thus when */ /* the driver finds it incorrect, it sets `size' to some calculated */ /* values and sets `x_ppem' and `y_ppem' to the pixel width and */ /* height given in the font, respectively. */ /* */ /* TrueType embedded bitmaps: */ /* `size', `width', and `height' values are not contained in the */ /* bitmap strike itself. They are computed from the global font */ /* parameters. */ /* */ typedef struct FT_Bitmap_Size_ { FT_Short height; FT_Short width; FT_Pos size; FT_Pos x_ppem; FT_Pos y_ppem; } FT_Bitmap_Size; /*************************************************************************/ /*************************************************************************/ /* */ /* O B J E C T C L A S S E S */ /* */ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* <Type> */ /* FT_Library */ /* */ /* <Description> */ /* A handle to a FreeType library instance. Each `library' is */ /* completely independent from the others; it is the `root' of a set */ /* of objects like fonts, faces, sizes, etc. */ /* */ /* It also embeds a memory manager (see @FT_Memory), as well as a */ /* scan-line converter object (see @FT_Raster). */ /* */ /* For multi-threading applications each thread should have its own */ /* FT_Library object. */ /* */ /* <Note> */ /* Library objects are normally created by @FT_Init_FreeType, and */ /* destroyed with @FT_Done_FreeType. */ /* */ typedef struct FT_LibraryRec_ *FT_Library; /*************************************************************************/ /* */ /* <Type> */ /* FT_Module */ /* */ /* <Description> */ /* A handle to a given FreeType module object. Each module can be a */ /* font driver, a renderer, or anything else that provides services */ /* to the formers. */ /* */ typedef struct FT_ModuleRec_* FT_Module; /*************************************************************************/ /* */ /* <Type> */ /* FT_Driver */ /* */ /* <Description> */ /* A handle to a given FreeType font driver object. Each font driver */ /* is a special module capable of creating faces from font files. */ /* */ typedef struct FT_DriverRec_* FT_Driver; /*************************************************************************/ /* */ /* <Type> */ /* FT_Renderer */ /* */ /* <Description> */ /* A handle to a given FreeType renderer. A renderer is a special */ /* module in charge of converting a glyph image to a bitmap, when */ /* necessary. Each renderer supports a given glyph image format, and */ /* one or more target surface depths. */ /* */ typedef struct FT_RendererRec_* FT_Renderer; /*************************************************************************/ /* */ /* <Type> */ /* FT_Face */ /* */ /* <Description> */ /* A handle to a given typographic face object. A face object models */ /* a given typeface, in a given style. */ /* */ /* <Note> */ /* Each face object also owns a single @FT_GlyphSlot object, as well */ /* as one or more @FT_Size objects. */ /* */ /* Use @FT_New_Face or @FT_Open_Face to create a new face object from */ /* a given filepathname or a custom input stream. */ /* */ /* Use @FT_Done_Face to destroy it (along with its slot and sizes). */ /* */ /* <Also> */ /* See @FT_FaceRec for the publicly accessible fields of a given face */ /* object. */ /* */ typedef struct FT_FaceRec_* FT_Face; /*************************************************************************/ /* */ /* <Type> */ /* FT_Size */ /* */ /* <Description> */ /* A handle to an object used to model a face scaled to a given */ /* character size. */ /* */ /* <Note> */ /* Each @FT_Face has an _active_ @FT_Size object that is used by */ /* functions like @FT_Load_Glyph to determine the scaling */ /* transformation which is used to load and hint glyphs and metrics. */ /* */ /* You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, */ /* @FT_Request_Size or even @FT_Select_Size to change the content */ /* (i.e., the scaling values) of the active @FT_Size. */ /* */ /* You can use @FT_New_Size to create additional size objects for a */ /* given @FT_Face, but they won't be used by other functions until */ /* you activate it through @FT_Activate_Size. Only one size can be */ /* activated at any given time per face. */ /* */ /* <Also> */ /* See @FT_SizeRec for the publicly accessible fields of a given size */ /* object. */ /* */ typedef struct FT_SizeRec_* FT_Size; /*************************************************************************/ /* */ /* <Type> */ /* FT_GlyphSlot */ /* */ /* <Description> */ /* A handle to a given `glyph slot'. A slot is a container where it */ /* is possible to load any of the glyphs contained in its parent */ /* face. */ /* */ /* In other words, each time you call @FT_Load_Glyph or */ /* @FT_Load_Char, the slot's content is erased by the new glyph data, */ /* i.e., the glyph's metrics, its image (bitmap or outline), and */ /* other control information. */ /* */ /* <Also> */ /* See @FT_GlyphSlotRec for the publicly accessible glyph fields. */ /* */ typedef struct FT_GlyphSlotRec_* FT_GlyphSlot; /*************************************************************************/ /* */ /* <Type> */ /* FT_CharMap */ /* */ /* <Description> */ /* A handle to a given character map. A charmap is used to translate */ /* character codes in a given encoding into glyph indexes for its */ /* parent's face. Some font formats may provide several charmaps per */ /* font. */ /* */ /* Each face object owns zero or more charmaps, but only one of them */ /* can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char. */ /* */ /* The list of available charmaps in a face is available through the */ /* `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec. */ /* */ /* The currently active charmap is available as `face->charmap'. */ /* You should call @FT_Set_Charmap to change it. */ /* */ /* <Note> */ /* When a new face is created (either through @FT_New_Face or */ /* @FT_Open_Face), the library looks for a Unicode charmap within */ /* the list and automatically activates it. */ /* */ /* <Also> */ /* See @FT_CharMapRec for the publicly accessible fields of a given */ /* character map. */ /* */ typedef struct FT_CharMapRec_* FT_CharMap; /*************************************************************************/ /* */ /* <Macro> */ /* FT_ENC_TAG */ /* */ /* <Description> */ /* This macro converts four-letter tags into an unsigned long. It is */ /* used to define `encoding' identifiers (see @FT_Encoding). */ /* */ /* <Note> */ /* Since many 16-bit compilers don't like 32-bit enumerations, you */ /* should redefine this macro in case of problems to something like */ /* this: */ /* */ /* { */ /* #define FT_ENC_TAG( value, a, b, c, d ) value */ /* } */ /* */ /* to get a simple enumeration without assigning special numbers. */ /* */ #ifndef FT_ENC_TAG #define FT_ENC_TAG( value, a, b, c, d ) \ value = ( ( (FT_UInt32)(a) << 24 ) | \ ( (FT_UInt32)(b) << 16 ) | \ ( (FT_UInt32)(c) << 8 ) | \ (FT_UInt32)(d) ) #endif /* FT_ENC_TAG */ /*************************************************************************/ /* */ /* <Enum> */ /* FT_Encoding */ /* */ /* <Description> */ /* An enumeration used to specify character sets supported by */ /* charmaps. Used in the @FT_Select_Charmap API function. */ /* */ /* <Note> */ /* Despite the name, this enumeration lists specific character */ /* repertories (i.e., charsets), and not text encoding methods (e.g., */ /* UTF-8, UTF-16, etc.). */ /* */ /* Other encodings might be defined in the future. */ /* */ /* <Values> */ /* FT_ENCODING_NONE :: */ /* The encoding value~0 is reserved. */ /* */ /* FT_ENCODING_UNICODE :: */ /* Corresponds to the Unicode character set. This value covers */ /* all versions of the Unicode repertoire, including ASCII and */ /* Latin-1. Most fonts include a Unicode charmap, but not all */ /* of them. */ /* */ /* For example, if you want to access Unicode value U+1F028 (and */ /* the font contains it), use value 0x1F028 as the input value for */ /* @FT_Get_Char_Index. */ /* */ /* FT_ENCODING_MS_SYMBOL :: */ /* Corresponds to the Microsoft Symbol encoding, used to encode */ /* mathematical symbols in the 32..255 character code range. For */ /* more information, see `http://www.ceviz.net/symbol.htm'. */ /* */ /* FT_ENCODING_SJIS :: */ /* Corresponds to Japanese SJIS encoding. More info at */ /* at `http://langsupport.japanreference.com/encoding.shtml'. */ /* See note on multi-byte encodings below. */ /* */ /* FT_ENCODING_GB2312 :: */ /* Corresponds to an encoding system for Simplified Chinese as used */ /* used in mainland China. */ /* */ /* FT_ENCODING_BIG5 :: */ /* Corresponds to an encoding system for Traditional Chinese as */ /* used in Taiwan and Hong Kong. */ /* */ /* FT_ENCODING_WANSUNG :: */ /* Corresponds to the Korean encoding system known as Wansung. */ /* For more information see */ /* `http://www.microsoft.com/typography/unicode/949.txt'. */ /* */ /* FT_ENCODING_JOHAB :: */ /* The Korean standard character set (KS~C 5601-1992), which */ /* corresponds to MS Windows code page 1361. This character set */ /* includes all possible Hangeul character combinations. */ /* */ /* FT_ENCODING_ADOBE_LATIN_1 :: */ /* Corresponds to a Latin-1 encoding as defined in a Type~1 */ /* PostScript font. It is limited to 256 character codes. */ /* */ /* FT_ENCODING_ADOBE_STANDARD :: */ /* Corresponds to the Adobe Standard encoding, as found in Type~1, */ /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ /* codes. */ /* */ /* FT_ENCODING_ADOBE_EXPERT :: */ /* Corresponds to the Adobe Expert encoding, as found in Type~1, */ /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ /* codes. */ /* */ /* FT_ENCODING_ADOBE_CUSTOM :: */ /* Corresponds to a custom encoding, as found in Type~1, CFF, and */ /* OpenType/CFF fonts. It is limited to 256 character codes. */ /* */ /* FT_ENCODING_APPLE_ROMAN :: */ /* Corresponds to the 8-bit Apple roman encoding. Many TrueType */ /* and OpenType fonts contain a charmap for this encoding, since */ /* older versions of Mac OS are able to use it. */ /* */ /* FT_ENCODING_OLD_LATIN_2 :: */ /* This value is deprecated and was never used nor reported by */ /* FreeType. Don't use or test for it. */ /* */ /* FT_ENCODING_MS_SJIS :: */ /* Same as FT_ENCODING_SJIS. Deprecated. */ /* */ /* FT_ENCODING_MS_GB2312 :: */ /* Same as FT_ENCODING_GB2312. Deprecated. */ /* */ /* FT_ENCODING_MS_BIG5 :: */ /* Same as FT_ENCODING_BIG5. Deprecated. */ /* */ /* FT_ENCODING_MS_WANSUNG :: */ /* Same as FT_ENCODING_WANSUNG. Deprecated. */ /* */ /* FT_ENCODING_MS_JOHAB :: */ /* Same as FT_ENCODING_JOHAB. Deprecated. */ /* */ /* <Note> */ /* By default, FreeType automatically synthesizes a Unicode charmap */ /* for PostScript fonts, using their glyph names dictionaries. */ /* However, it also reports the encodings defined explicitly in the */ /* font file, for the cases when they are needed, with the Adobe */ /* values as well. */ /* */ /* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */ /* is neither Unicode nor ISO-8859-1 (otherwise it is set to */ /* FT_ENCODING_UNICODE). Use @FT_Get_BDF_Charset_ID to find out */ /* which encoding is really present. If, for example, the */ /* `cs_registry' field is `KOI8' and the `cs_encoding' field is `R', */ /* the font is encoded in KOI8-R. */ /* */ /* FT_ENCODING_NONE is always set (with a single exception) by the */ /* winfonts driver. Use @FT_Get_WinFNT_Header and examine the */ /* `charset' field of the @FT_WinFNT_HeaderRec structure to find out */ /* which encoding is really present. For example, */ /* @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for */ /* Russian). */ /* */ /* FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */ /* and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to */ /* FT_ENCODING_APPLE_ROMAN). */ /* */ /* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */ /* @FT_Get_CMap_Language_ID to query the Mac language ID which may */ /* be needed to be able to distinguish Apple encoding variants. See */ /* */ /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT */ /* */ /* to get an idea how to do that. Basically, if the language ID */ /* is~0, don't use it, otherwise subtract 1 from the language ID. */ /* Then examine `encoding_id'. If, for example, `encoding_id' is */ /* @TT_MAC_ID_ROMAN and the language ID (minus~1) is */ /* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */ /* @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi */ /* variant the Arabic encoding. */ /* */ typedef enum FT_Encoding_ { FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ), FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ), FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ), FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ), FT_ENC_TAG( FT_ENCODING_GB2312, 'g', 'b', ' ', ' ' ), FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ), FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ), FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ), /* for backwards compatibility */ FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS, FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312, FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5, FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG, FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB, FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ), FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ), FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM, 'A', 'D', 'B', 'C' ), FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1, 'l', 'a', 't', '1' ), FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ), FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' ) } FT_Encoding; /*************************************************************************/ /* */ /* <Enum> */ /* ft_encoding_xxx */ /* */ /* <Description> */ /* These constants are deprecated; use the corresponding @FT_Encoding */ /* values instead. */ /* */ #define ft_encoding_none FT_ENCODING_NONE #define ft_encoding_unicode FT_ENCODING_UNICODE #define ft_encoding_symbol FT_ENCODING_MS_SYMBOL #define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1 #define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2 #define ft_encoding_sjis FT_ENCODING_SJIS #define ft_encoding_gb2312 FT_ENCODING_GB2312 #define ft_encoding_big5 FT_ENCODING_BIG5 #define ft_encoding_wansung FT_ENCODING_WANSUNG #define ft_encoding_johab FT_ENCODING_JOHAB #define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD #define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT #define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM #define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN /*************************************************************************/ /* */ /* <Struct> */ /* FT_CharMapRec */ /* */ /* <Description> */ /* The base charmap structure. */ /* */ /* <Fields> */ /* face :: A handle to the parent face object. */ /* */ /* encoding :: An @FT_Encoding tag identifying the charmap. Use */ /* this with @FT_Select_Charmap. */ /* */ /* platform_id :: An ID number describing the platform for the */ /* following encoding ID. This comes directly from */ /* the TrueType specification and should be emulated */ /* for other formats. */ /* */ /* encoding_id :: A platform specific encoding number. This also */ /* comes from the TrueType specification and should be */ /* emulated similarly. */ /* */ typedef struct FT_CharMapRec_ { FT_Face face; FT_Encoding encoding; FT_UShort platform_id; FT_UShort encoding_id; } FT_CharMapRec; /*************************************************************************/ /*************************************************************************/ /* */ /* B A S E O B J E C T C L A S S E S */ /* */ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* <Type> */ /* FT_Face_Internal */ /* */ /* <Description> */ /* An opaque handle to an `FT_Face_InternalRec' structure, used to */ /* model private data of a given @FT_Face object. */ /* */ /* This structure might change between releases of FreeType~2 and is */ /* not generally available to client applications. */ /* */ typedef struct FT_Face_InternalRec_* FT_Face_Internal; /*************************************************************************/ /* */ /* <Struct> */ /* FT_FaceRec */ /* */ /* <Description> */ /* FreeType root face class structure. A face object models a */ /* typeface in a font file. */ /* */ /* <Fields> */ /* num_faces :: The number of faces in the font file. Some */ /* font formats can have multiple faces in */ /* a font file. */ /* */ /* face_index :: The index of the face in the font file. It */ /* is set to~0 if there is only one face in */ /* the font file. */ /* */ /* face_flags :: A set of bit flags that give important */ /* information about the face; see */ /* @FT_FACE_FLAG_XXX for the details. */ /* */ /* style_flags :: A set of bit flags indicating the style of */ /* the face; see @FT_STYLE_FLAG_XXX for the */ /* details. */ /* */ /* num_glyphs :: The number of glyphs in the face. If the */ /* face is scalable and has sbits (see */ /* `num_fixed_sizes'), it is set to the number */ /* of outline glyphs. */ /* */ /* For CID-keyed fonts, this value gives the */ /* highest CID used in the font. */ /* */ /* family_name :: The face's family name. This is an ASCII */ /* string, usually in English, which describes */ /* the typeface's family (like `Times New */ /* Roman', `Bodoni', `Garamond', etc). This */ /* is a least common denominator used to list */ /* fonts. Some formats (TrueType & OpenType) */ /* provide localized and Unicode versions of */ /* this string. Applications should use the */ /* format specific interface to access them. */ /* Can be NULL (e.g., in fonts embedded in a */ /* PDF file). */ /* */ /* style_name :: The face's style name. This is an ASCII */ /* string, usually in English, which describes */ /* the typeface's style (like `Italic', */ /* `Bold', `Condensed', etc). Not all font */ /* formats provide a style name, so this field */ /* is optional, and can be set to NULL. As */ /* for `family_name', some formats provide */ /* localized and Unicode versions of this */ /* string. Applications should use the format */ /* specific interface to access them. */ /* */ /* num_fixed_sizes :: The number of bitmap strikes in the face. */ /* Even if the face is scalable, there might */ /* still be bitmap strikes, which are called */ /* `sbits' in that case. */ /* */ /* available_sizes :: An array of @FT_Bitmap_Size for all bitmap */ /* strikes in the face. It is set to NULL if */ /* there is no bitmap strike. */ /* */ /* num_charmaps :: The number of charmaps in the face. */ /* */ /* charmaps :: An array of the charmaps of the face. */ /* */ /* generic :: A field reserved for client uses. See the */ /* @FT_Generic type description. */ /* */ /* bbox :: The font bounding box. Coordinates are */ /* expressed in font units (see */ /* `units_per_EM'). The box is large enough */ /* to contain any glyph from the font. Thus, */ /* `bbox.yMax' can be seen as the `maximal */ /* ascender', and `bbox.yMin' as the `minimal */ /* descender'. Only relevant for scalable */ /* formats. */ /* */ /* Note that the bounding box might be off by */ /* (at least) one pixel for hinted fonts. See */ /* @FT_Size_Metrics for further discussion. */ /* */ /* units_per_EM :: The number of font units per EM square for */ /* this face. This is typically 2048 for */ /* TrueType fonts, and 1000 for Type~1 fonts. */ /* Only relevant for scalable formats. */ /* */ /* ascender :: The typographic ascender of the face, */ /* expressed in font units. For font formats */ /* not having this information, it is set to */ /* `bbox.yMax'. Only relevant for scalable */ /* formats. */ /* */ /* descender :: The typographic descender of the face, */ /* expressed in font units. For font formats */ /* not having this information, it is set to */ /* `bbox.yMin'. Note that this field is */ /* usually negative. Only relevant for */ /* scalable formats. */ /* */ /* height :: The height is the vertical distance */ /* between two consecutive baselines, */ /* expressed in font units. It is always */ /* positive. Only relevant for scalable */ /* formats. */ /* */ /* max_advance_width :: The maximal advance width, in font units, */ /* for all glyphs in this face. This can be */ /* used to make word wrapping computations */ /* faster. Only relevant for scalable */ /* formats. */ /* */ /* max_advance_height :: The maximal advance height, in font units, */ /* for all glyphs in this face. This is only */ /* relevant for vertical layouts, and is set */ /* to `height' for fonts that do not provide */ /* vertical metrics. Only relevant for */ /* scalable formats. */ /* */ /* underline_position :: The position, in font units, of the */ /* underline line for this face. It is the */ /* center of the underlining stem. Only */ /* relevant for scalable formats. */ /* */ /* underline_thickness :: The thickness, in font units, of the */ /* underline for this face. Only relevant for */ /* scalable formats. */ /* */ /* glyph :: The face's associated glyph slot(s). */ /* */ /* size :: The current active size for this face. */ /* */ /* charmap :: The current active charmap for this face. */ /* */ /* <Note> */ /* Fields may be changed after a call to @FT_Attach_File or */ /* @FT_Attach_Stream. */ /* */ typedef struct FT_FaceRec_ { FT_Long num_faces; FT_Long face_index; FT_Long face_flags; FT_Long style_flags; FT_Long num_glyphs; FT_String* family_name; FT_String* style_name; FT_Int num_fixed_sizes; FT_Bitmap_Size* available_sizes; FT_Int num_charmaps; FT_CharMap* charmaps; FT_Generic generic; /*# The following member variables (down to `underline_thickness') */ /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size */ /*# for bitmap fonts. */ FT_BBox bbox; FT_UShort units_per_EM; FT_Short ascender; FT_Short descender; FT_Short height; FT_Short max_advance_width; FT_Short max_advance_height; FT_Short underline_position; FT_Short underline_thickness; FT_GlyphSlot glyph; FT_Size size; FT_CharMap charmap; /*@private begin */ FT_Driver driver; FT_Memory memory; FT_Stream stream; FT_ListRec sizes_list; FT_Generic autohint; void* extensions; FT_Face_Internal internal; /*@private end */ } FT_FaceRec; /*************************************************************************/ /* */ /* <Enum> */ /* FT_FACE_FLAG_XXX */ /* */ /* <Description> */ /* A list of bit flags used in the `face_flags' field of the */ /* @FT_FaceRec structure. They inform client applications of */ /* properties of the corresponding face. */ /* */ /* <Values> */ /* FT_FACE_FLAG_SCALABLE :: */ /* Indicates that the face contains outline glyphs. This doesn't */ /* prevent bitmap strikes, i.e., a face can have both this and */ /* and @FT_FACE_FLAG_FIXED_SIZES set. */ /* */ /* FT_FACE_FLAG_FIXED_SIZES :: */ /* Indicates that the face contains bitmap strikes. See also the */ /* `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec. */ /* */ /* FT_FACE_FLAG_FIXED_WIDTH :: */ /* Indicates that the face contains fixed-width characters (like */ /* Courier, Lucido, MonoType, etc.). */ /* */ /* FT_FACE_FLAG_SFNT :: */ /* Indicates that the face uses the `sfnt' storage scheme. For */ /* now, this means TrueType and OpenType. */ /* */ /* FT_FACE_FLAG_HORIZONTAL :: */ /* Indicates that the face contains horizontal glyph metrics. This */ /* should be set for all common formats. */ /* */ /* FT_FACE_FLAG_VERTICAL :: */ /* Indicates that the face contains vertical glyph metrics. This */ /* is only available in some formats, not all of them. */ /* */ /* FT_FACE_FLAG_KERNING :: */ /* Indicates that the face contains kerning information. If set, */ /* the kerning distance can be retrieved through the function */ /* @FT_Get_Kerning. Otherwise the function always return the */ /* vector (0,0). Note that FreeType doesn't handle kerning data */ /* from the `GPOS' table (as present in some OpenType fonts). */ /* */ /* FT_FACE_FLAG_FAST_GLYPHS :: */ /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */ /* */ /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */ /* Indicates that the font contains multiple masters and is capable */ /* of interpolating between them. See the multiple-masters */ /* specific API for details. */ /* */ /* FT_FACE_FLAG_GLYPH_NAMES :: */ /* Indicates that the font contains glyph names that can be */ /* retrieved through @FT_Get_Glyph_Name. Note that some TrueType */ /* fonts contain broken glyph name tables. Use the function */ /* @FT_Has_PS_Glyph_Names when needed. */ /* */ /* FT_FACE_FLAG_EXTERNAL_STREAM :: */ /* Used internally by FreeType to indicate that a face's stream was */ /* provided by the client application and should not be destroyed */ /* when @FT_Done_Face is called. Don't read or test this flag. */ /* */ /* FT_FACE_FLAG_HINTER :: */ /* Set if the font driver has a hinting machine of its own. For */ /* example, with TrueType fonts, it makes sense to use data from */ /* the SFNT `gasp' table only if the native TrueType hinting engine */ /* (with the bytecode interpreter) is available and active. */ /* */ /* FT_FACE_FLAG_CID_KEYED :: */ /* Set if the font is CID-keyed. In that case, the font is not */ /* accessed by glyph indices but by CID values. For subsetted */ /* CID-keyed fonts this has the consequence that not all index */ /* values are a valid argument to FT_Load_Glyph. Only the CID */ /* values for which corresponding glyphs in the subsetted font */ /* exist make FT_Load_Glyph return successfully; in all other cases */ /* you get an `FT_Err_Invalid_Argument' error. */ /* */ /* Note that CID-keyed fonts which are in an SFNT wrapper don't */ /* have this flag set since the glyphs are accessed in the normal */ /* way (using contiguous indices); the `CID-ness' isn't visible to */ /* the application. */ /* */ /* FT_FACE_FLAG_TRICKY :: */ /* Set if the font is `tricky', this is, it always needs the */ /* font format's native hinting engine to get a reasonable result. */ /* A typical example is the Chinese font `mingli.ttf' which uses */ /* TrueType bytecode instructions to move and scale all of its */ /* subglyphs. */ /* */ /* It is not possible to autohint such fonts using */ /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ /* @FT_LOAD_NO_HINTING. You have to set both FT_LOAD_NO_HINTING */ /* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */ /* probably never want this except for demonstration purposes. */ /* */ /* Currently, there are six TrueType fonts in the list of tricky */ /* fonts; they are hard-coded in file `ttobjs.c'. */ /* */ #define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) #define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 ) #define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 ) #define FT_FACE_FLAG_SFNT ( 1L << 3 ) #define FT_FACE_FLAG_HORIZONTAL ( 1L << 4 ) #define FT_FACE_FLAG_VERTICAL ( 1L << 5 ) #define FT_FACE_FLAG_KERNING ( 1L << 6 ) #define FT_FACE_FLAG_FAST_GLYPHS ( 1L << 7 ) #define FT_FACE_FLAG_MULTIPLE_MASTERS ( 1L << 8 ) #define FT_FACE_FLAG_GLYPH_NAMES ( 1L << 9 ) #define FT_FACE_FLAG_EXTERNAL_STREAM ( 1L << 10 ) #define FT_FACE_FLAG_HINTER ( 1L << 11 ) #define FT_FACE_FLAG_CID_KEYED ( 1L << 12 ) #define FT_FACE_FLAG_TRICKY ( 1L << 13 ) /************************************************************************* * * @macro: * FT_HAS_HORIZONTAL( face ) * * @description: * A macro that returns true whenever a face object contains * horizontal metrics (this is true for all font formats though). * * @also: * @FT_HAS_VERTICAL can be used to check for vertical metrics. * */ #define FT_HAS_HORIZONTAL( face ) \ ( face->face_flags & FT_FACE_FLAG_HORIZONTAL ) /************************************************************************* * * @macro: * FT_HAS_VERTICAL( face ) * * @description: * A macro that returns true whenever a face object contains vertical * metrics. * */ #define FT_HAS_VERTICAL( face ) \ ( face->face_flags & FT_FACE_FLAG_VERTICAL ) /************************************************************************* * * @macro: * FT_HAS_KERNING( face ) * * @description: * A macro that returns true whenever a face object contains kerning * data that can be accessed with @FT_Get_Kerning. * */ #define FT_HAS_KERNING( face ) \ ( face->face_flags & FT_FACE_FLAG_KERNING ) /************************************************************************* * * @macro: * FT_IS_SCALABLE( face ) * * @description: * A macro that returns true whenever a face object contains a scalable * font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF, * and PFR font formats. * */ #define FT_IS_SCALABLE( face ) \ ( face->face_flags & FT_FACE_FLAG_SCALABLE ) /************************************************************************* * * @macro: * FT_IS_SFNT( face ) * * @description: * A macro that returns true whenever a face object contains a font * whose format is based on the SFNT storage scheme. This usually * means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded * bitmap fonts. * * If this macro is true, all functions defined in @FT_SFNT_NAMES_H and * @FT_TRUETYPE_TABLES_H are available. * */ #define FT_IS_SFNT( face ) \ ( face->face_flags & FT_FACE_FLAG_SFNT ) /************************************************************************* * * @macro: * FT_IS_FIXED_WIDTH( face ) * * @description: * A macro that returns true whenever a face object contains a font face * that contains fixed-width (or `monospace', `fixed-pitch', etc.) * glyphs. * */ #define FT_IS_FIXED_WIDTH( face ) \ ( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH ) /************************************************************************* * * @macro: * FT_HAS_FIXED_SIZES( face ) * * @description: * A macro that returns true whenever a face object contains some * embedded bitmaps. See the `available_sizes' field of the * @FT_FaceRec structure. * */ #define FT_HAS_FIXED_SIZES( face ) \ ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES ) /************************************************************************* * * @macro: * FT_HAS_FAST_GLYPHS( face ) * * @description: * Deprecated. * */ #define FT_HAS_FAST_GLYPHS( face ) 0 /************************************************************************* * * @macro: * FT_HAS_GLYPH_NAMES( face ) * * @description: * A macro that returns true whenever a face object contains some glyph * names that can be accessed through @FT_Get_Glyph_Name. * */ #define FT_HAS_GLYPH_NAMES( face ) \ ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) /************************************************************************* * * @macro: * FT_HAS_MULTIPLE_MASTERS( face ) * * @description: * A macro that returns true whenever a face object contains some * multiple masters. The functions provided by @FT_MULTIPLE_MASTERS_H * are then available to choose the exact design you want. * */ #define FT_HAS_MULTIPLE_MASTERS( face ) \ ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) /************************************************************************* * * @macro: * FT_IS_CID_KEYED( face ) * * @description: * A macro that returns true whenever a face object contains a CID-keyed * font. See the discussion of @FT_FACE_FLAG_CID_KEYED for more * details. * * If this macro is true, all functions defined in @FT_CID_H are * available. * */ #define FT_IS_CID_KEYED( face ) \ ( face->face_flags & FT_FACE_FLAG_CID_KEYED ) /************************************************************************* * * @macro: * FT_IS_TRICKY( face ) * * @description: * A macro that returns true whenever a face represents a `tricky' font. * See the discussion of @FT_FACE_FLAG_TRICKY for more details. * */ #define FT_IS_TRICKY( face ) \ ( face->face_flags & FT_FACE_FLAG_TRICKY ) /*************************************************************************/ /* */ /* <Const> */ /* FT_STYLE_FLAG_XXX */ /* */ /* <Description> */ /* A list of bit-flags used to indicate the style of a given face. */ /* These are used in the `style_flags' field of @FT_FaceRec. */ /* */ /* <Values> */ /* FT_STYLE_FLAG_ITALIC :: */ /* Indicates that a given face style is italic or oblique. */ /* */ /* FT_STYLE_FLAG_BOLD :: */ /* Indicates that a given face is bold. */ /* */ /* <Note> */ /* The style information as provided by FreeType is very basic. More */ /* details are beyond the scope and should be done on a higher level */ /* (for example, by analyzing various fields of the `OS/2' table in */ /* SFNT based fonts). */ /* */ #define FT_STYLE_FLAG_ITALIC ( 1 << 0 ) #define FT_STYLE_FLAG_BOLD ( 1 << 1 ) /*************************************************************************/ /* */ /* <Type> */ /* FT_Size_Internal */ /* */ /* <Description> */ /* An opaque handle to an `FT_Size_InternalRec' structure, used to */ /* model private data of a given @FT_Size object. */ /* */ typedef struct FT_Size_InternalRec_* FT_Size_Internal; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Size_Metrics */ /* */ /* <Description> */ /* The size metrics structure gives the metrics of a size object. */ /* */ /* <Fields> */ /* x_ppem :: The width of the scaled EM square in pixels, hence */ /* the term `ppem' (pixels per EM). It is also */ /* referred to as `nominal width'. */ /* */ /* y_ppem :: The height of the scaled EM square in pixels, */ /* hence the term `ppem' (pixels per EM). It is also */ /* referred to as `nominal height'. */ /* */ /* x_scale :: A 16.16 fractional scaling value used to convert */ /* horizontal metrics from font units to 26.6 */ /* fractional pixels. Only relevant for scalable */ /* font formats. */ /* */ /* y_scale :: A 16.16 fractional scaling value used to convert */ /* vertical metrics from font units to 26.6 */ /* fractional pixels. Only relevant for scalable */ /* font formats. */ /* */ /* ascender :: The ascender in 26.6 fractional pixels. See */ /* @FT_FaceRec for the details. */ /* */ /* descender :: The descender in 26.6 fractional pixels. See */ /* @FT_FaceRec for the details. */ /* */ /* height :: The height in 26.6 fractional pixels. See */ /* @FT_FaceRec for the details. */ /* */ /* max_advance :: The maximal advance width in 26.6 fractional */ /* pixels. See @FT_FaceRec for the details. */ /* */ /* <Note> */ /* The scaling values, if relevant, are determined first during a */ /* size changing operation. The remaining fields are then set by the */ /* driver. For scalable formats, they are usually set to scaled */ /* values of the corresponding fields in @FT_FaceRec. */ /* */ /* Note that due to glyph hinting, these values might not be exact */ /* for certain fonts. Thus they must be treated as unreliable */ /* with an error margin of at least one pixel! */ /* */ /* Indeed, the only way to get the exact metrics is to render _all_ */ /* glyphs. As this would be a definite performance hit, it is up to */ /* client applications to perform such computations. */ /* */ /* The FT_Size_Metrics structure is valid for bitmap fonts also. */ /* */ typedef struct FT_Size_Metrics_ { FT_UShort x_ppem; /* horizontal pixels per EM */ FT_UShort y_ppem; /* vertical pixels per EM */ FT_Fixed x_scale; /* scaling values used to convert font */ FT_Fixed y_scale; /* units to 26.6 fractional pixels */ FT_Pos ascender; /* ascender in 26.6 frac. pixels */ FT_Pos descender; /* descender in 26.6 frac. pixels */ FT_Pos height; /* text height in 26.6 frac. pixels */ FT_Pos max_advance; /* max horizontal advance, in 26.6 pixels */ } FT_Size_Metrics; /*************************************************************************/ /* */ /* <Struct> */ /* FT_SizeRec */ /* */ /* <Description> */ /* FreeType root size class structure. A size object models a face */ /* object at a given size. */ /* */ /* <Fields> */ /* face :: Handle to the parent face object. */ /* */ /* generic :: A typeless pointer, which is unused by the FreeType */ /* library or any of its drivers. It can be used by */ /* client applications to link their own data to each size */ /* object. */ /* */ /* metrics :: Metrics for this size object. This field is read-only. */ /* */ typedef struct FT_SizeRec_ { FT_Face face; /* parent face object */ FT_Generic generic; /* generic pointer for client uses */ FT_Size_Metrics metrics; /* size metrics */ FT_Size_Internal internal; } FT_SizeRec; /*************************************************************************/ /* */ /* <Struct> */ /* FT_SubGlyph */ /* */ /* <Description> */ /* The subglyph structure is an internal object used to describe */ /* subglyphs (for example, in the case of composites). */ /* */ /* <Note> */ /* The subglyph implementation is not part of the high-level API, */ /* hence the forward structure declaration. */ /* */ /* You can however retrieve subglyph information with */ /* @FT_Get_SubGlyph_Info. */ /* */ typedef struct FT_SubGlyphRec_* FT_SubGlyph; /*************************************************************************/ /* */ /* <Type> */ /* FT_Slot_Internal */ /* */ /* <Description> */ /* An opaque handle to an `FT_Slot_InternalRec' structure, used to */ /* model private data of a given @FT_GlyphSlot object. */ /* */ typedef struct FT_Slot_InternalRec_* FT_Slot_Internal; /*************************************************************************/ /* */ /* <Struct> */ /* FT_GlyphSlotRec */ /* */ /* <Description> */ /* FreeType root glyph slot class structure. A glyph slot is a */ /* container where individual glyphs can be loaded, be they in */ /* outline or bitmap format. */ /* */ /* <Fields> */ /* library :: A handle to the FreeType library instance */ /* this slot belongs to. */ /* */ /* face :: A handle to the parent face object. */ /* */ /* next :: In some cases (like some font tools), several */ /* glyph slots per face object can be a good */ /* thing. As this is rare, the glyph slots are */ /* listed through a direct, single-linked list */ /* using its `next' field. */ /* */ /* generic :: A typeless pointer which is unused by the */ /* FreeType library or any of its drivers. It */ /* can be used by client applications to link */ /* their own data to each glyph slot object. */ /* */ /* metrics :: The metrics of the last loaded glyph in the */ /* slot. The returned values depend on the last */ /* load flags (see the @FT_Load_Glyph API */ /* function) and can be expressed either in 26.6 */ /* fractional pixels or font units. */ /* */ /* Note that even when the glyph image is */ /* transformed, the metrics are not. */ /* */ /* linearHoriAdvance :: The advance width of the unhinted glyph. */ /* Its value is expressed in 16.16 fractional */ /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */ /* when loading the glyph. This field can be */ /* important to perform correct WYSIWYG layout. */ /* Only relevant for outline glyphs. */ /* */ /* linearVertAdvance :: The advance height of the unhinted glyph. */ /* Its value is expressed in 16.16 fractional */ /* pixels, unless @FT_LOAD_LINEAR_DESIGN is set */ /* when loading the glyph. This field can be */ /* important to perform correct WYSIWYG layout. */ /* Only relevant for outline glyphs. */ /* */ /* advance :: This shorthand is, depending on */ /* @FT_LOAD_IGNORE_TRANSFORM, the transformed */ /* advance width for the glyph (in 26.6 */ /* fractional pixel format). As specified with */ /* @FT_LOAD_VERTICAL_LAYOUT, it uses either the */ /* `horiAdvance' or the `vertAdvance' value of */ /* `metrics' field. */ /* */ /* format :: This field indicates the format of the image */ /* contained in the glyph slot. Typically */ /* @FT_GLYPH_FORMAT_BITMAP, */ /* @FT_GLYPH_FORMAT_OUTLINE, or */ /* @FT_GLYPH_FORMAT_COMPOSITE, but others are */ /* possible. */ /* */ /* bitmap :: This field is used as a bitmap descriptor */ /* when the slot format is */ /* @FT_GLYPH_FORMAT_BITMAP. Note that the */ /* address and content of the bitmap buffer can */ /* change between calls of @FT_Load_Glyph and a */ /* few other functions. */ /* */ /* bitmap_left :: This is the bitmap's left bearing expressed */ /* in integer pixels. Of course, this is only */ /* valid if the format is */ /* @FT_GLYPH_FORMAT_BITMAP. */ /* */ /* bitmap_top :: This is the bitmap's top bearing expressed in */ /* integer pixels. Remember that this is the */ /* distance from the baseline to the top-most */ /* glyph scanline, upwards y~coordinates being */ /* *positive*. */ /* */ /* outline :: The outline descriptor for the current glyph */ /* image if its format is */ /* @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is */ /* loaded, `outline' can be transformed, */ /* distorted, embolded, etc. However, it must */ /* not be freed. */ /* */ /* num_subglyphs :: The number of subglyphs in a composite glyph. */ /* This field is only valid for the composite */ /* glyph format that should normally only be */ /* loaded with the @FT_LOAD_NO_RECURSE flag. */ /* For now this is internal to FreeType. */ /* */ /* subglyphs :: An array of subglyph descriptors for */ /* composite glyphs. There are `num_subglyphs' */ /* elements in there. Currently internal to */ /* FreeType. */ /* */ /* control_data :: Certain font drivers can also return the */ /* control data for a given glyph image (e.g. */ /* TrueType bytecode, Type~1 charstrings, etc.). */ /* This field is a pointer to such data. */ /* */ /* control_len :: This is the length in bytes of the control */ /* data. */ /* */ /* other :: Really wicked formats can use this pointer to */ /* present their own glyph image to client */ /* applications. Note that the application */ /* needs to know about the image format. */ /* */ /* lsb_delta :: The difference between hinted and unhinted */ /* left side bearing while autohinting is */ /* active. Zero otherwise. */ /* */ /* rsb_delta :: The difference between hinted and unhinted */ /* right side bearing while autohinting is */ /* active. Zero otherwise. */ /* */ /* <Note> */ /* If @FT_Load_Glyph is called with default flags (see */ /* @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in */ /* its native format (e.g., an outline glyph for TrueType and Type~1 */ /* formats). */ /* */ /* This image can later be converted into a bitmap by calling */ /* @FT_Render_Glyph. This function finds the current renderer for */ /* the native image's format, then invokes it. */ /* */ /* The renderer is in charge of transforming the native image through */ /* the slot's face transformation fields, then converting it into a */ /* bitmap that is returned in `slot->bitmap'. */ /* */ /* Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */ /* to specify the position of the bitmap relative to the current pen */ /* position (e.g., coordinates (0,0) on the baseline). Of course, */ /* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */ /* */ /* <Note> */ /* Here a small pseudo code fragment which shows how to use */ /* `lsb_delta' and `rsb_delta': */ /* */ /* { */ /* FT_Pos origin_x = 0; */ /* FT_Pos prev_rsb_delta = 0; */ /* */ /* */ /* for all glyphs do */ /* <compute kern between current and previous glyph and add it to */ /* `origin_x'> */ /* */ /* <load glyph with `FT_Load_Glyph'> */ /* */ /* if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 ) */ /* origin_x -= 64; */ /* else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 ) */ /* origin_x += 64; */ /* */ /* prev_rsb_delta = face->glyph->rsb_delta; */ /* */ /* <save glyph image, or render glyph, or ...> */ /* */ /* origin_x += face->glyph->advance.x; */ /* endfor */ /* } */ /* */ typedef struct FT_GlyphSlotRec_ { FT_Library library; FT_Face face; FT_GlyphSlot next; FT_UInt reserved; /* retained for binary compatibility */ FT_Generic generic; FT_Glyph_Metrics metrics; FT_Fixed linearHoriAdvance; FT_Fixed linearVertAdvance; FT_Vector advance; FT_Glyph_Format format; FT_Bitmap bitmap; FT_Int bitmap_left; FT_Int bitmap_top; FT_Outline outline; FT_UInt num_subglyphs; FT_SubGlyph subglyphs; void* control_data; long control_len; FT_Pos lsb_delta; FT_Pos rsb_delta; void* other; FT_Slot_Internal internal; } FT_GlyphSlotRec; /*************************************************************************/ /*************************************************************************/ /* */ /* F U N C T I O N S */ /* */ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* <Function> */ /* FT_Init_FreeType */ /* */ /* <Description> */ /* Initialize a new FreeType library object. The set of modules */ /* that are registered by this function is determined at build time. */ /* */ /* <Output> */ /* alibrary :: A handle to a new library object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* In case you want to provide your own memory allocating routines, */ /* use @FT_New_Library instead, followed by a call to */ /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */ /* */ FT_EXPORT( FT_Error ) FT_Init_FreeType( FT_Library *alibrary ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Done_FreeType */ /* */ /* <Description> */ /* Destroy a given FreeType library object and all of its children, */ /* including resources, drivers, faces, sizes, etc. */ /* */ /* <Input> */ /* library :: A handle to the target library object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Done_FreeType( FT_Library library ); /*************************************************************************/ /* */ /* <Enum> */ /* FT_OPEN_XXX */ /* */ /* <Description> */ /* A list of bit-field constants used within the `flags' field of the */ /* @FT_Open_Args structure. */ /* */ /* <Values> */ /* FT_OPEN_MEMORY :: This is a memory-based stream. */ /* */ /* FT_OPEN_STREAM :: Copy the stream from the `stream' field. */ /* */ /* FT_OPEN_PATHNAME :: Create a new input stream from a C~path */ /* name. */ /* */ /* FT_OPEN_DRIVER :: Use the `driver' field. */ /* */ /* FT_OPEN_PARAMS :: Use the `num_params' and `params' fields. */ /* */ /* ft_open_memory :: Deprecated; use @FT_OPEN_MEMORY instead. */ /* */ /* ft_open_stream :: Deprecated; use @FT_OPEN_STREAM instead. */ /* */ /* ft_open_pathname :: Deprecated; use @FT_OPEN_PATHNAME instead. */ /* */ /* ft_open_driver :: Deprecated; use @FT_OPEN_DRIVER instead. */ /* */ /* ft_open_params :: Deprecated; use @FT_OPEN_PARAMS instead. */ /* */ /* <Note> */ /* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */ /* flags are mutually exclusive. */ /* */ #define FT_OPEN_MEMORY 0x1 #define FT_OPEN_STREAM 0x2 #define FT_OPEN_PATHNAME 0x4 #define FT_OPEN_DRIVER 0x8 #define FT_OPEN_PARAMS 0x10 #define ft_open_memory FT_OPEN_MEMORY /* deprecated */ #define ft_open_stream FT_OPEN_STREAM /* deprecated */ #define ft_open_pathname FT_OPEN_PATHNAME /* deprecated */ #define ft_open_driver FT_OPEN_DRIVER /* deprecated */ #define ft_open_params FT_OPEN_PARAMS /* deprecated */ /*************************************************************************/ /* */ /* <Struct> */ /* FT_Parameter */ /* */ /* <Description> */ /* A simple structure used to pass more or less generic parameters to */ /* @FT_Open_Face. */ /* */ /* <Fields> */ /* tag :: A four-byte identification tag. */ /* */ /* data :: A pointer to the parameter data. */ /* */ /* <Note> */ /* The ID and function of parameters are driver-specific. See the */ /* various FT_PARAM_TAG_XXX flags for more information. */ /* */ typedef struct FT_Parameter_ { FT_ULong tag; FT_Pointer data; } FT_Parameter; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Open_Args */ /* */ /* <Description> */ /* A structure used to indicate how to open a new font file or */ /* stream. A pointer to such a structure can be used as a parameter */ /* for the functions @FT_Open_Face and @FT_Attach_Stream. */ /* */ /* <Fields> */ /* flags :: A set of bit flags indicating how to use the */ /* structure. */ /* */ /* memory_base :: The first byte of the file in memory. */ /* */ /* memory_size :: The size in bytes of the file in memory. */ /* */ /* pathname :: A pointer to an 8-bit file pathname. */ /* */ /* stream :: A handle to a source stream object. */ /* */ /* driver :: This field is exclusively used by @FT_Open_Face; */ /* it simply specifies the font driver to use to open */ /* the face. If set to~0, FreeType tries to load the */ /* face with each one of the drivers in its list. */ /* */ /* num_params :: The number of extra parameters. */ /* */ /* params :: Extra parameters passed to the font driver when */ /* opening a new face. */ /* */ /* <Note> */ /* The stream type is determined by the contents of `flags' which */ /* are tested in the following order by @FT_Open_Face: */ /* */ /* If the `FT_OPEN_MEMORY' bit is set, assume that this is a */ /* memory file of `memory_size' bytes, located at `memory_address'. */ /* The data are are not copied, and the client is responsible for */ /* releasing and destroying them _after_ the corresponding call to */ /* @FT_Done_Face. */ /* */ /* Otherwise, if the `FT_OPEN_STREAM' bit is set, assume that a */ /* custom input stream `stream' is used. */ /* */ /* Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this */ /* is a normal file and use `pathname' to open it. */ /* */ /* If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face only tries to */ /* open the file with the driver whose handler is in `driver'. */ /* */ /* If the `FT_OPEN_PARAMS' bit is set, the parameters given by */ /* `num_params' and `params' is used. They are ignored otherwise. */ /* */ /* Ideally, both the `pathname' and `params' fields should be tagged */ /* as `const'; this is missing for API backwards compatibility. In */ /* other words, applications should treat them as read-only. */ /* */ typedef struct FT_Open_Args_ { FT_UInt flags; const FT_Byte* memory_base; FT_Long memory_size; FT_String* pathname; FT_Stream stream; FT_Module driver; FT_Int num_params; FT_Parameter* params; } FT_Open_Args; /*************************************************************************/ /* */ /* <Function> */ /* FT_New_Face */ /* */ /* <Description> */ /* This function calls @FT_Open_Face to open a font by its pathname. */ /* */ /* <InOut> */ /* library :: A handle to the library resource. */ /* */ /* <Input> */ /* pathname :: A path to the font file. */ /* */ /* face_index :: The index of the face within the font. The first */ /* face has index~0. */ /* */ /* <Output> */ /* aface :: A handle to a new face object. If `face_index' is */ /* greater than or equal to zero, it must be non-NULL. */ /* See @FT_Open_Face for more details. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_New_Face( FT_Library library, const char* filepathname, FT_Long face_index, FT_Face *aface ); /*************************************************************************/ /* */ /* <Function> */ /* FT_New_Memory_Face */ /* */ /* <Description> */ /* This function calls @FT_Open_Face to open a font which has been */ /* loaded into memory. */ /* */ /* <InOut> */ /* library :: A handle to the library resource. */ /* */ /* <Input> */ /* file_base :: A pointer to the beginning of the font data. */ /* */ /* file_size :: The size of the memory chunk used by the font data. */ /* */ /* face_index :: The index of the face within the font. The first */ /* face has index~0. */ /* */ /* <Output> */ /* aface :: A handle to a new face object. If `face_index' is */ /* greater than or equal to zero, it must be non-NULL. */ /* See @FT_Open_Face for more details. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* You must not deallocate the memory before calling @FT_Done_Face. */ /* */ FT_EXPORT( FT_Error ) FT_New_Memory_Face( FT_Library library, const FT_Byte* file_base, FT_Long file_size, FT_Long face_index, FT_Face *aface ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Open_Face */ /* */ /* <Description> */ /* Create a face object from a given resource described by */ /* @FT_Open_Args. */ /* */ /* <InOut> */ /* library :: A handle to the library resource. */ /* */ /* <Input> */ /* args :: A pointer to an `FT_Open_Args' structure which must */ /* be filled by the caller. */ /* */ /* face_index :: The index of the face within the font. The first */ /* face has index~0. */ /* */ /* <Output> */ /* aface :: A handle to a new face object. If `face_index' is */ /* greater than or equal to zero, it must be non-NULL. */ /* See note below. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* Unlike FreeType 1.x, this function automatically creates a glyph */ /* slot for the face object which can be accessed directly through */ /* `face->glyph'. */ /* */ /* FT_Open_Face can be used to quickly check whether the font */ /* format of a given font resource is supported by FreeType. If the */ /* `face_index' field is negative, the function's return value is~0 */ /* if the font format is recognized, or non-zero otherwise; */ /* the function returns a more or less empty face handle in `*aface' */ /* (if `aface' isn't NULL). The only useful field in this special */ /* case is `face->num_faces' which gives the number of faces within */ /* the font file. After examination, the returned @FT_Face structure */ /* should be deallocated with a call to @FT_Done_Face. */ /* */ /* Each new face object created with this function also owns a */ /* default @FT_Size object, accessible as `face->size'. */ /* */ /* See the discussion of reference counters in the description of */ /* @FT_Reference_Face. */ /* */ FT_EXPORT( FT_Error ) FT_Open_Face( FT_Library library, const FT_Open_Args* args, FT_Long face_index, FT_Face *aface ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Attach_File */ /* */ /* <Description> */ /* This function calls @FT_Attach_Stream to attach a file. */ /* */ /* <InOut> */ /* face :: The target face object. */ /* */ /* <Input> */ /* filepathname :: The pathname. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Attach_File( FT_Face face, const char* filepathname ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Attach_Stream */ /* */ /* <Description> */ /* `Attach' data to a face object. Normally, this is used to read */ /* additional information for the face object. For example, you can */ /* attach an AFM file that comes with a Type~1 font to get the */ /* kerning values and other metrics. */ /* */ /* <InOut> */ /* face :: The target face object. */ /* */ /* <Input> */ /* parameters :: A pointer to @FT_Open_Args which must be filled by */ /* the caller. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The meaning of the `attach' (i.e., what really happens when the */ /* new file is read) is not fixed by FreeType itself. It really */ /* depends on the font format (and thus the font driver). */ /* */ /* Client applications are expected to know what they are doing */ /* when invoking this function. Most drivers simply do not implement */ /* file attachments. */ /* */ FT_EXPORT( FT_Error ) FT_Attach_Stream( FT_Face face, FT_Open_Args* parameters ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Reference_Face */ /* */ /* <Description> */ /* A counter gets initialized to~1 at the time an @FT_Face structure */ /* is created. This function increments the counter. @FT_Done_Face */ /* then only destroys a face if the counter is~1, otherwise it simply */ /* decrements the counter. */ /* */ /* This function helps in managing life-cycles of structures which */ /* reference @FT_Face objects. */ /* */ /* <Input> */ /* face :: A handle to a target face object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Since> */ /* 2.4.2 */ /* */ FT_EXPORT( FT_Error ) FT_Reference_Face( FT_Face face ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Done_Face */ /* */ /* <Description> */ /* Discard a given face object, as well as all of its child slots and */ /* sizes. */ /* */ /* <Input> */ /* face :: A handle to a target face object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* See the discussion of reference counters in the description of */ /* @FT_Reference_Face. */ /* */ FT_EXPORT( FT_Error ) FT_Done_Face( FT_Face face ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Select_Size */ /* */ /* <Description> */ /* Select a bitmap strike. */ /* */ /* <InOut> */ /* face :: A handle to a target face object. */ /* */ /* <Input> */ /* strike_index :: The index of the bitmap strike in the */ /* `available_sizes' field of @FT_FaceRec structure. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Select_Size( FT_Face face, FT_Int strike_index ); /*************************************************************************/ /* */ /* <Enum> */ /* FT_Size_Request_Type */ /* */ /* <Description> */ /* An enumeration type that lists the supported size request types. */ /* */ /* <Values> */ /* FT_SIZE_REQUEST_TYPE_NOMINAL :: */ /* The nominal size. The `units_per_EM' field of @FT_FaceRec is */ /* used to determine both scaling values. */ /* */ /* FT_SIZE_REQUEST_TYPE_REAL_DIM :: */ /* The real dimension. The sum of the the `Ascender' and (minus */ /* of) the `Descender' fields of @FT_FaceRec are used to determine */ /* both scaling values. */ /* */ /* FT_SIZE_REQUEST_TYPE_BBOX :: */ /* The font bounding box. The width and height of the `bbox' field */ /* of @FT_FaceRec are used to determine the horizontal and vertical */ /* scaling value, respectively. */ /* */ /* FT_SIZE_REQUEST_TYPE_CELL :: */ /* The `max_advance_width' field of @FT_FaceRec is used to */ /* determine the horizontal scaling value; the vertical scaling */ /* value is determined the same way as */ /* @FT_SIZE_REQUEST_TYPE_REAL_DIM does. Finally, both scaling */ /* values are set to the smaller one. This type is useful if you */ /* want to specify the font size for, say, a window of a given */ /* dimension and 80x24 cells. */ /* */ /* FT_SIZE_REQUEST_TYPE_SCALES :: */ /* Specify the scaling values directly. */ /* */ /* <Note> */ /* The above descriptions only apply to scalable formats. For bitmap */ /* formats, the behaviour is up to the driver. */ /* */ /* See the note section of @FT_Size_Metrics if you wonder how size */ /* requesting relates to scaling values. */ /* */ typedef enum FT_Size_Request_Type_ { FT_SIZE_REQUEST_TYPE_NOMINAL, FT_SIZE_REQUEST_TYPE_REAL_DIM, FT_SIZE_REQUEST_TYPE_BBOX, FT_SIZE_REQUEST_TYPE_CELL, FT_SIZE_REQUEST_TYPE_SCALES, FT_SIZE_REQUEST_TYPE_MAX } FT_Size_Request_Type; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Size_RequestRec */ /* */ /* <Description> */ /* A structure used to model a size request. */ /* */ /* <Fields> */ /* type :: See @FT_Size_Request_Type. */ /* */ /* width :: The desired width. */ /* */ /* height :: The desired height. */ /* */ /* horiResolution :: The horizontal resolution. If set to zero, */ /* `width' is treated as a 26.6 fractional pixel */ /* value. */ /* */ /* vertResolution :: The vertical resolution. If set to zero, */ /* `height' is treated as a 26.6 fractional pixel */ /* value. */ /* */ /* <Note> */ /* If `width' is zero, then the horizontal scaling value is set equal */ /* to the vertical scaling value, and vice versa. */ /* */ typedef struct FT_Size_RequestRec_ { FT_Size_Request_Type type; FT_Long width; FT_Long height; FT_UInt horiResolution; FT_UInt vertResolution; } FT_Size_RequestRec; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Size_Request */ /* */ /* <Description> */ /* A handle to a size request structure. */ /* */ typedef struct FT_Size_RequestRec_ *FT_Size_Request; /*************************************************************************/ /* */ /* <Function> */ /* FT_Request_Size */ /* */ /* <Description> */ /* Resize the scale of the active @FT_Size object in a face. */ /* */ /* <InOut> */ /* face :: A handle to a target face object. */ /* */ /* <Input> */ /* req :: A pointer to a @FT_Size_RequestRec. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* Although drivers may select the bitmap strike matching the */ /* request, you should not rely on this if you intend to select a */ /* particular bitmap strike. Use @FT_Select_Size instead in that */ /* case. */ /* */ FT_EXPORT( FT_Error ) FT_Request_Size( FT_Face face, FT_Size_Request req ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Set_Char_Size */ /* */ /* <Description> */ /* This function calls @FT_Request_Size to request the nominal size */ /* (in points). */ /* */ /* <InOut> */ /* face :: A handle to a target face object. */ /* */ /* <Input> */ /* char_width :: The nominal width, in 26.6 fractional points. */ /* */ /* char_height :: The nominal height, in 26.6 fractional points. */ /* */ /* horz_resolution :: The horizontal resolution in dpi. */ /* */ /* vert_resolution :: The vertical resolution in dpi. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* If either the character width or height is zero, it is set equal */ /* to the other value. */ /* */ /* If either the horizontal or vertical resolution is zero, it is set */ /* equal to the other value. */ /* */ /* A character width or height smaller than 1pt is set to 1pt; if */ /* both resolution values are zero, they are set to 72dpi. */ /* */ /* Don't use this function if you are using the FreeType cache API. */ /* */ FT_EXPORT( FT_Error ) FT_Set_Char_Size( FT_Face face, FT_F26Dot6 char_width, FT_F26Dot6 char_height, FT_UInt horz_resolution, FT_UInt vert_resolution ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Set_Pixel_Sizes */ /* */ /* <Description> */ /* This function calls @FT_Request_Size to request the nominal size */ /* (in pixels). */ /* */ /* <InOut> */ /* face :: A handle to the target face object. */ /* */ /* <Input> */ /* pixel_width :: The nominal width, in pixels. */ /* */ /* pixel_height :: The nominal height, in pixels. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Set_Pixel_Sizes( FT_Face face, FT_UInt pixel_width, FT_UInt pixel_height ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Load_Glyph */ /* */ /* <Description> */ /* A function used to load a single glyph into the glyph slot of a */ /* face object. */ /* */ /* <InOut> */ /* face :: A handle to the target face object where the glyph */ /* is loaded. */ /* */ /* <Input> */ /* glyph_index :: The index of the glyph in the font file. For */ /* CID-keyed fonts (either in PS or in CFF format) */ /* this argument specifies the CID value. */ /* */ /* load_flags :: A flag indicating what to load for this glyph. The */ /* @FT_LOAD_XXX constants can be used to control the */ /* glyph loading process (e.g., whether the outline */ /* should be scaled, whether to load bitmaps or not, */ /* whether to hint the outline, etc). */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The loaded glyph may be transformed. See @FT_Set_Transform for */ /* the details. */ /* */ /* For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is */ /* returned for invalid CID values (this is, for CID values which */ /* don't have a corresponding glyph in the font). See the discussion */ /* of the @FT_FACE_FLAG_CID_KEYED flag for more details. */ /* */ FT_EXPORT( FT_Error ) FT_Load_Glyph( FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Load_Char */ /* */ /* <Description> */ /* A function used to load a single glyph into the glyph slot of a */ /* face object, according to its character code. */ /* */ /* <InOut> */ /* face :: A handle to a target face object where the glyph */ /* is loaded. */ /* */ /* <Input> */ /* char_code :: The glyph's character code, according to the */ /* current charmap used in the face. */ /* */ /* load_flags :: A flag indicating what to load for this glyph. The */ /* @FT_LOAD_XXX constants can be used to control the */ /* glyph loading process (e.g., whether the outline */ /* should be scaled, whether to load bitmaps or not, */ /* whether to hint the outline, etc). */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph. */ /* */ FT_EXPORT( FT_Error ) FT_Load_Char( FT_Face face, FT_ULong char_code, FT_Int32 load_flags ); /************************************************************************* * * @enum: * FT_LOAD_XXX * * @description: * A list of bit-field constants used with @FT_Load_Glyph to indicate * what kind of operations to perform during glyph loading. * * @values: * FT_LOAD_DEFAULT :: * Corresponding to~0, this value is used as the default glyph load * operation. In this case, the following happens: * * 1. FreeType looks for a bitmap for the glyph corresponding to the * face's current size. If one is found, the function returns. * The bitmap data can be accessed from the glyph slot (see note * below). * * 2. If no embedded bitmap is searched or found, FreeType looks for a * scalable outline. If one is found, it is loaded from the font * file, scaled to device pixels, then `hinted' to the pixel grid * in order to optimize it. The outline data can be accessed from * the glyph slot (see note below). * * Note that by default, the glyph loader doesn't render outlines into * bitmaps. The following flags are used to modify this default * behaviour to more specific and useful cases. * * FT_LOAD_NO_SCALE :: * Don't scale the outline glyph loaded, but keep it in font units. * * This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and * unsets @FT_LOAD_RENDER. * * FT_LOAD_NO_HINTING :: * Disable hinting. This generally generates `blurrier' bitmap glyph * when the glyph is rendered in any of the anti-aliased modes. See * also the note below. * * This flag is implied by @FT_LOAD_NO_SCALE. * * FT_LOAD_RENDER :: * Call @FT_Render_Glyph after the glyph is loaded. By default, the * glyph is rendered in @FT_RENDER_MODE_NORMAL mode. This can be * overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME. * * This flag is unset by @FT_LOAD_NO_SCALE. * * FT_LOAD_NO_BITMAP :: * Ignore bitmap strikes when loading. Bitmap-only fonts ignore this * flag. * * @FT_LOAD_NO_SCALE always sets this flag. * * FT_LOAD_VERTICAL_LAYOUT :: * Load the glyph for vertical text layout. _Don't_ use it as it is * problematic currently. * * FT_LOAD_FORCE_AUTOHINT :: * Indicates that the auto-hinter is preferred over the font's native * hinter. See also the note below. * * FT_LOAD_CROP_BITMAP :: * Indicates that the font driver should crop the loaded bitmap glyph * (i.e., remove all space around its black bits). Not all drivers * implement this. * * FT_LOAD_PEDANTIC :: * Indicates that the font driver should perform pedantic verifications * during glyph loading. This is mostly used to detect broken glyphs * in fonts. By default, FreeType tries to handle broken fonts also. * * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: * Indicates that the font driver should ignore the global advance * width defined in the font. By default, that value is used as the * advance width for all glyphs when the face has * @FT_FACE_FLAG_FIXED_WIDTH set. * * This flag exists for historical reasons (to support buggy CJK * fonts). * * FT_LOAD_NO_RECURSE :: * This flag is only used internally. It merely indicates that the * font driver should not load composite glyphs recursively. Instead, * it should set the `num_subglyph' and `subglyphs' values of the * glyph slot accordingly, and set `glyph->format' to * @FT_GLYPH_FORMAT_COMPOSITE. * * The description of sub-glyphs is not available to client * applications for now. * * This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM. * * FT_LOAD_IGNORE_TRANSFORM :: * Indicates that the transform matrix set by @FT_Set_Transform should * be ignored. * * FT_LOAD_MONOCHROME :: * This flag is used with @FT_LOAD_RENDER to indicate that you want to * render an outline glyph to a 1-bit monochrome bitmap glyph, with * 8~pixels packed into each byte of the bitmap data. * * Note that this has no effect on the hinting algorithm used. You * should rather use @FT_LOAD_TARGET_MONO so that the * monochrome-optimized hinting algorithm is used. * * FT_LOAD_LINEAR_DESIGN :: * Indicates that the `linearHoriAdvance' and `linearVertAdvance' * fields of @FT_GlyphSlotRec should be kept in font units. See * @FT_GlyphSlotRec for details. * * FT_LOAD_NO_AUTOHINT :: * Disable auto-hinter. See also the note below. * * @note: * By default, hinting is enabled and the font's native hinter (see * @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can * disable hinting by setting @FT_LOAD_NO_HINTING or change the * precedence by setting @FT_LOAD_FORCE_AUTOHINT. You can also set * @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be * used at all. * * See the description of @FT_FACE_FLAG_TRICKY for a special exception * (affecting only a handful of Asian fonts). * * Besides deciding which hinter to use, you can also decide which * hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details. * */ #define FT_LOAD_DEFAULT 0x0 #define FT_LOAD_NO_SCALE 0x1 #define FT_LOAD_NO_HINTING 0x2 #define FT_LOAD_RENDER 0x4 #define FT_LOAD_NO_BITMAP 0x8 #define FT_LOAD_VERTICAL_LAYOUT 0x10 #define FT_LOAD_FORCE_AUTOHINT 0x20 #define FT_LOAD_CROP_BITMAP 0x40 #define FT_LOAD_PEDANTIC 0x80 #define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH 0x200 #define FT_LOAD_NO_RECURSE 0x400 #define FT_LOAD_IGNORE_TRANSFORM 0x800 #define FT_LOAD_MONOCHROME 0x1000 #define FT_LOAD_LINEAR_DESIGN 0x2000 #define FT_LOAD_NO_AUTOHINT 0x8000U /* */ /* used internally only by certain font drivers! */ #define FT_LOAD_ADVANCE_ONLY 0x100 #define FT_LOAD_SBITS_ONLY 0x4000 /************************************************************************** * * @enum: * FT_LOAD_TARGET_XXX * * @description: * A list of values that are used to select a specific hinting algorithm * to use by the hinter. You should OR one of these values to your * `load_flags' when calling @FT_Load_Glyph. * * Note that font's native hinters may ignore the hinting algorithm you * have specified (e.g., the TrueType bytecode interpreter). You can set * @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used. * * Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it * always implies @FT_LOAD_FORCE_AUTOHINT. * * @values: * FT_LOAD_TARGET_NORMAL :: * This corresponds to the default hinting algorithm, optimized for * standard gray-level rendering. For monochrome output, use * @FT_LOAD_TARGET_MONO instead. * * FT_LOAD_TARGET_LIGHT :: * A lighter hinting algorithm for non-monochrome modes. Many * generated glyphs are more fuzzy but better resemble its original * shape. A bit like rendering on Mac OS~X. * * As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT. * * FT_LOAD_TARGET_MONO :: * Strong hinting algorithm that should only be used for monochrome * output. The result is probably unpleasant if the glyph is rendered * in non-monochrome modes. * * FT_LOAD_TARGET_LCD :: * A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally * decimated LCD displays. * * FT_LOAD_TARGET_LCD_V :: * A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically * decimated LCD displays. * * @note: * You should use only _one_ of the FT_LOAD_TARGET_XXX values in your * `load_flags'. They can't be ORed. * * If @FT_LOAD_RENDER is also set, the glyph is rendered in the * corresponding mode (i.e., the mode which matches the used algorithm * best) unless @FT_LOAD_MONOCHROME is set. * * You can use a hinting algorithm that doesn't correspond to the same * rendering mode. As an example, it is possible to use the `light' * hinting algorithm and have the results rendered in horizontal LCD * pixel mode, with code like * * { * FT_Load_Glyph( face, glyph_index, * load_flags | FT_LOAD_TARGET_LIGHT ); * * FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD ); * } * */ #define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 ) #define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL ) #define FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT ) #define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO ) #define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD ) #define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V ) /************************************************************************** * * @macro: * FT_LOAD_TARGET_MODE * * @description: * Return the @FT_Render_Mode corresponding to a given * @FT_LOAD_TARGET_XXX value. * */ #define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) ) /*************************************************************************/ /* */ /* <Function> */ /* FT_Set_Transform */ /* */ /* <Description> */ /* A function used to set the transformation that is applied to glyph */ /* images when they are loaded into a glyph slot through */ /* @FT_Load_Glyph. */ /* */ /* <InOut> */ /* face :: A handle to the source face object. */ /* */ /* <Input> */ /* matrix :: A pointer to the transformation's 2x2 matrix. Use~0 for */ /* the identity matrix. */ /* delta :: A pointer to the translation vector. Use~0 for the null */ /* vector. */ /* */ /* <Note> */ /* The transformation is only applied to scalable image formats after */ /* the glyph has been loaded. It means that hinting is unaltered by */ /* the transformation and is performed on the character size given in */ /* the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes. */ /* */ /* Note that this also transforms the `face.glyph.advance' field, but */ /* *not* the values in `face.glyph.metrics'. */ /* */ FT_EXPORT( void ) FT_Set_Transform( FT_Face face, FT_Matrix* matrix, FT_Vector* delta ); /*************************************************************************/ /* */ /* <Enum> */ /* FT_Render_Mode */ /* */ /* <Description> */ /* An enumeration type that lists the render modes supported by */ /* FreeType~2. Each mode corresponds to a specific type of scanline */ /* conversion performed on the outline. */ /* */ /* For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode' */ /* field in the @FT_GlyphSlotRec structure gives the format of the */ /* returned bitmap. */ /* */ /* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity. */ /* */ /* <Values> */ /* FT_RENDER_MODE_NORMAL :: */ /* This is the default render mode; it corresponds to 8-bit */ /* anti-aliased bitmaps. */ /* */ /* FT_RENDER_MODE_LIGHT :: */ /* This is equivalent to @FT_RENDER_MODE_NORMAL. It is only */ /* defined as a separate value because render modes are also used */ /* indirectly to define hinting algorithm selectors. See */ /* @FT_LOAD_TARGET_XXX for details. */ /* */ /* FT_RENDER_MODE_MONO :: */ /* This mode corresponds to 1-bit bitmaps (with 2~levels of */ /* opacity). */ /* */ /* FT_RENDER_MODE_LCD :: */ /* This mode corresponds to horizontal RGB and BGR sub-pixel */ /* displays like LCD screens. It produces 8-bit bitmaps that are */ /* 3~times the width of the original glyph outline in pixels, and */ /* which use the @FT_PIXEL_MODE_LCD mode. */ /* */ /* FT_RENDER_MODE_LCD_V :: */ /* This mode corresponds to vertical RGB and BGR sub-pixel displays */ /* (like PDA screens, rotated LCD displays, etc.). It produces */ /* 8-bit bitmaps that are 3~times the height of the original */ /* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */ /* */ /* <Note> */ /* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */ /* filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */ /* (not active in the default builds). It is up to the caller to */ /* either call @FT_Library_SetLcdFilter (if available) or do the */ /* filtering itself. */ /* */ /* The selected render mode only affects vector glyphs of a font. */ /* Embedded bitmaps often have a different pixel mode like */ /* @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform */ /* them into 8-bit pixmaps. */ /* */ typedef enum FT_Render_Mode_ { FT_RENDER_MODE_NORMAL = 0, FT_RENDER_MODE_LIGHT, FT_RENDER_MODE_MONO, FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V, FT_RENDER_MODE_MAX } FT_Render_Mode; /*************************************************************************/ /* */ /* <Enum> */ /* ft_render_mode_xxx */ /* */ /* <Description> */ /* These constants are deprecated. Use the corresponding */ /* @FT_Render_Mode values instead. */ /* */ /* <Values> */ /* ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL */ /* ft_render_mode_mono :: see @FT_RENDER_MODE_MONO */ /* */ #define ft_render_mode_normal FT_RENDER_MODE_NORMAL #define ft_render_mode_mono FT_RENDER_MODE_MONO /*************************************************************************/ /* */ /* <Function> */ /* FT_Render_Glyph */ /* */ /* <Description> */ /* Convert a given glyph image to a bitmap. It does so by inspecting */ /* the glyph image format, finding the relevant renderer, and */ /* invoking it. */ /* */ /* <InOut> */ /* slot :: A handle to the glyph slot containing the image to */ /* convert. */ /* */ /* <Input> */ /* render_mode :: This is the render mode used to render the glyph */ /* image into a bitmap. See @FT_Render_Mode for a */ /* list of possible values. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Render_Glyph( FT_GlyphSlot slot, FT_Render_Mode render_mode ); /*************************************************************************/ /* */ /* <Enum> */ /* FT_Kerning_Mode */ /* */ /* <Description> */ /* An enumeration used to specify which kerning values to return in */ /* @FT_Get_Kerning. */ /* */ /* <Values> */ /* FT_KERNING_DEFAULT :: Return scaled and grid-fitted kerning */ /* distances (value is~0). */ /* */ /* FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning */ /* distances. */ /* */ /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */ /* units. */ /* */ typedef enum FT_Kerning_Mode_ { FT_KERNING_DEFAULT = 0, FT_KERNING_UNFITTED, FT_KERNING_UNSCALED } FT_Kerning_Mode; /*************************************************************************/ /* */ /* <Const> */ /* ft_kerning_default */ /* */ /* <Description> */ /* This constant is deprecated. Please use @FT_KERNING_DEFAULT */ /* instead. */ /* */ #define ft_kerning_default FT_KERNING_DEFAULT /*************************************************************************/ /* */ /* <Const> */ /* ft_kerning_unfitted */ /* */ /* <Description> */ /* This constant is deprecated. Please use @FT_KERNING_UNFITTED */ /* instead. */ /* */ #define ft_kerning_unfitted FT_KERNING_UNFITTED /*************************************************************************/ /* */ /* <Const> */ /* ft_kerning_unscaled */ /* */ /* <Description> */ /* This constant is deprecated. Please use @FT_KERNING_UNSCALED */ /* instead. */ /* */ #define ft_kerning_unscaled FT_KERNING_UNSCALED /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Kerning */ /* */ /* <Description> */ /* Return the kerning vector between two glyphs of a same face. */ /* */ /* <Input> */ /* face :: A handle to a source face object. */ /* */ /* left_glyph :: The index of the left glyph in the kern pair. */ /* */ /* right_glyph :: The index of the right glyph in the kern pair. */ /* */ /* kern_mode :: See @FT_Kerning_Mode for more information. */ /* Determines the scale and dimension of the returned */ /* kerning vector. */ /* */ /* <Output> */ /* akerning :: The kerning vector. This is either in font units */ /* or in pixels (26.6 format) for scalable formats, */ /* and in pixels for fixed-sizes formats. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* Only horizontal layouts (left-to-right & right-to-left) are */ /* supported by this method. Other layouts, or more sophisticated */ /* kernings, are out of the scope of this API function -- they can be */ /* implemented through format-specific interfaces. */ /* */ FT_EXPORT( FT_Error ) FT_Get_Kerning( FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_UInt kern_mode, FT_Vector *akerning ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Track_Kerning */ /* */ /* <Description> */ /* Return the track kerning for a given face object at a given size. */ /* */ /* <Input> */ /* face :: A handle to a source face object. */ /* */ /* point_size :: The point size in 16.16 fractional points. */ /* */ /* degree :: The degree of tightness. */ /* */ /* <Output> */ /* akerning :: The kerning in 16.16 fractional points. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Get_Track_Kerning( FT_Face face, FT_Fixed point_size, FT_Int degree, FT_Fixed* akerning ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Glyph_Name */ /* */ /* <Description> */ /* Retrieve the ASCII name of a given glyph in a face. This only */ /* works for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1. */ /* */ /* <Input> */ /* face :: A handle to a source face object. */ /* */ /* glyph_index :: The glyph index. */ /* */ /* buffer_max :: The maximal number of bytes available in the */ /* buffer. */ /* */ /* <Output> */ /* buffer :: A pointer to a target buffer where the name is */ /* copied to. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* An error is returned if the face doesn't provide glyph names or if */ /* the glyph index is invalid. In all cases of failure, the first */ /* byte of `buffer' is set to~0 to indicate an empty name. */ /* */ /* The glyph name is truncated to fit within the buffer if it is too */ /* long. The returned string is always zero-terminated. */ /* */ /* This function is not compiled within the library if the config */ /* macro `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is defined in */ /* `include/freetype/config/ftoptions.h'. */ /* */ FT_EXPORT( FT_Error ) FT_Get_Glyph_Name( FT_Face face, FT_UInt glyph_index, FT_Pointer buffer, FT_UInt buffer_max ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Postscript_Name */ /* */ /* <Description> */ /* Retrieve the ASCII PostScript name of a given face, if available. */ /* This only works with PostScript and TrueType fonts. */ /* */ /* <Input> */ /* face :: A handle to the source face object. */ /* */ /* <Return> */ /* A pointer to the face's PostScript name. NULL if unavailable. */ /* */ /* <Note> */ /* The returned pointer is owned by the face and is destroyed with */ /* it. */ /* */ FT_EXPORT( const char* ) FT_Get_Postscript_Name( FT_Face face ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Select_Charmap */ /* */ /* <Description> */ /* Select a given charmap by its encoding tag (as listed in */ /* `freetype.h'). */ /* */ /* <InOut> */ /* face :: A handle to the source face object. */ /* */ /* <Input> */ /* encoding :: A handle to the selected encoding. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* This function returns an error if no charmap in the face */ /* corresponds to the encoding queried here. */ /* */ /* Because many fonts contain more than a single cmap for Unicode */ /* encoding, this function has some special code to select the one */ /* which covers Unicode best (`best' in the sense that a UCS-4 cmap */ /* is preferred to a UCS-2 cmap). It is thus preferable to */ /* @FT_Set_Charmap in this case. */ /* */ FT_EXPORT( FT_Error ) FT_Select_Charmap( FT_Face face, FT_Encoding encoding ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Set_Charmap */ /* */ /* <Description> */ /* Select a given charmap for character code to glyph index mapping. */ /* */ /* <InOut> */ /* face :: A handle to the source face object. */ /* */ /* <Input> */ /* charmap :: A handle to the selected charmap. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* This function returns an error if the charmap is not part of */ /* the face (i.e., if it is not listed in the `face->charmaps' */ /* table). */ /* */ /* It also fails if a type~14 charmap is selected. */ /* */ FT_EXPORT( FT_Error ) FT_Set_Charmap( FT_Face face, FT_CharMap charmap ); /************************************************************************* * * @function: * FT_Get_Charmap_Index * * @description: * Retrieve index of a given charmap. * * @input: * charmap :: * A handle to a charmap. * * @return: * The index into the array of character maps within the face to which * `charmap' belongs. If an error occurs, -1 is returned. * */ FT_EXPORT( FT_Int ) FT_Get_Charmap_Index( FT_CharMap charmap ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Char_Index */ /* */ /* <Description> */ /* Return the glyph index of a given character code. This function */ /* uses a charmap object to do the mapping. */ /* */ /* <Input> */ /* face :: A handle to the source face object. */ /* */ /* charcode :: The character code. */ /* */ /* <Return> */ /* The glyph index. 0~means `undefined character code'. */ /* */ /* <Note> */ /* If you use FreeType to manipulate the contents of font files */ /* directly, be aware that the glyph index returned by this function */ /* doesn't always correspond to the internal indices used within */ /* the file. This is done to ensure that value~0 always corresponds */ /* to the `missing glyph'. */ /* */ FT_EXPORT( FT_UInt ) FT_Get_Char_Index( FT_Face face, FT_ULong charcode ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_First_Char */ /* */ /* <Description> */ /* This function is used to return the first character code in the */ /* current charmap of a given face. It also returns the */ /* corresponding glyph index. */ /* */ /* <Input> */ /* face :: A handle to the source face object. */ /* */ /* <Output> */ /* agindex :: Glyph index of first character code. 0~if charmap is */ /* empty. */ /* */ /* <Return> */ /* The charmap's first character code. */ /* */ /* <Note> */ /* You should use this function with @FT_Get_Next_Char to be able to */ /* parse all character codes available in a given charmap. The code */ /* should look like this: */ /* */ /* { */ /* FT_ULong charcode; */ /* FT_UInt gindex; */ /* */ /* */ /* charcode = FT_Get_First_Char( face, &gindex ); */ /* while ( gindex != 0 ) */ /* { */ /* ... do something with (charcode,gindex) pair ... */ /* */ /* charcode = FT_Get_Next_Char( face, charcode, &gindex ); */ /* } */ /* } */ /* */ /* Note that `*agindex' is set to~0 if the charmap is empty. The */ /* result itself can be~0 in two cases: if the charmap is empty or */ /* if the value~0 is the first valid character code. */ /* */ FT_EXPORT( FT_ULong ) FT_Get_First_Char( FT_Face face, FT_UInt *agindex ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Next_Char */ /* */ /* <Description> */ /* This function is used to return the next character code in the */ /* current charmap of a given face following the value `char_code', */ /* as well as the corresponding glyph index. */ /* */ /* <Input> */ /* face :: A handle to the source face object. */ /* char_code :: The starting character code. */ /* */ /* <Output> */ /* agindex :: Glyph index of next character code. 0~if charmap */ /* is empty. */ /* */ /* <Return> */ /* The charmap's next character code. */ /* */ /* <Note> */ /* You should use this function with @FT_Get_First_Char to walk */ /* over all character codes available in a given charmap. See the */ /* note for this function for a simple code example. */ /* */ /* Note that `*agindex' is set to~0 when there are no more codes in */ /* the charmap. */ /* */ FT_EXPORT( FT_ULong ) FT_Get_Next_Char( FT_Face face, FT_ULong char_code, FT_UInt *agindex ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Name_Index */ /* */ /* <Description> */ /* Return the glyph index of a given glyph name. This function uses */ /* driver specific objects to do the translation. */ /* */ /* <Input> */ /* face :: A handle to the source face object. */ /* */ /* glyph_name :: The glyph name. */ /* */ /* <Return> */ /* The glyph index. 0~means `undefined character code'. */ /* */ FT_EXPORT( FT_UInt ) FT_Get_Name_Index( FT_Face face, FT_String* glyph_name ); /************************************************************************* * * @macro: * FT_SUBGLYPH_FLAG_XXX * * @description: * A list of constants used to describe subglyphs. Please refer to the * TrueType specification for the meaning of the various flags. * * @values: * FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS :: * FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES :: * FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID :: * FT_SUBGLYPH_FLAG_SCALE :: * FT_SUBGLYPH_FLAG_XY_SCALE :: * FT_SUBGLYPH_FLAG_2X2 :: * FT_SUBGLYPH_FLAG_USE_MY_METRICS :: * */ #define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1 #define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2 #define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4 #define FT_SUBGLYPH_FLAG_SCALE 8 #define FT_SUBGLYPH_FLAG_XY_SCALE 0x40 #define FT_SUBGLYPH_FLAG_2X2 0x80 #define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 /************************************************************************* * * @func: * FT_Get_SubGlyph_Info * * @description: * Retrieve a description of a given subglyph. Only use it if * `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE; an error is * returned otherwise. * * @input: * glyph :: * The source glyph slot. * * sub_index :: * The index of the subglyph. Must be less than * `glyph->num_subglyphs'. * * @output: * p_index :: * The glyph index of the subglyph. * * p_flags :: * The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX. * * p_arg1 :: * The subglyph's first argument (if any). * * p_arg2 :: * The subglyph's second argument (if any). * * p_transform :: * The subglyph transformation (if any). * * @return: * FreeType error code. 0~means success. * * @note: * The values of `*p_arg1', `*p_arg2', and `*p_transform' must be * interpreted depending on the flags returned in `*p_flags'. See the * TrueType specification for details. * */ FT_EXPORT( FT_Error ) FT_Get_SubGlyph_Info( FT_GlyphSlot glyph, FT_UInt sub_index, FT_Int *p_index, FT_UInt *p_flags, FT_Int *p_arg1, FT_Int *p_arg2, FT_Matrix *p_transform ); /*************************************************************************/ /* */ /* <Enum> */ /* FT_FSTYPE_XXX */ /* */ /* <Description> */ /* A list of bit flags used in the `fsType' field of the OS/2 table */ /* in a TrueType or OpenType font and the `FSType' entry in a */ /* PostScript font. These bit flags are returned by */ /* @FT_Get_FSType_Flags; they inform client applications of embedding */ /* and subsetting restrictions associated with a font. */ /* */ /* See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for */ /* more details. */ /* */ /* <Values> */ /* FT_FSTYPE_INSTALLABLE_EMBEDDING :: */ /* Fonts with no fsType bit set may be embedded and permanently */ /* installed on the remote system by an application. */ /* */ /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING :: */ /* Fonts that have only this bit set must not be modified, embedded */ /* or exchanged in any manner without first obtaining permission of */ /* the font software copyright owner. */ /* */ /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING :: */ /* If this bit is set, the font may be embedded and temporarily */ /* loaded on the remote system. Documents containing Preview & */ /* Print fonts must be opened `read-only'; no edits can be applied */ /* to the document. */ /* */ /* FT_FSTYPE_EDITABLE_EMBEDDING :: */ /* If this bit is set, the font may be embedded but must only be */ /* installed temporarily on other systems. In contrast to Preview */ /* & Print fonts, documents containing editable fonts may be opened */ /* for reading, editing is permitted, and changes may be saved. */ /* */ /* FT_FSTYPE_NO_SUBSETTING :: */ /* If this bit is set, the font may not be subsetted prior to */ /* embedding. */ /* */ /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */ /* If this bit is set, only bitmaps contained in the font may be */ /* embedded; no outline data may be embedded. If there are no */ /* bitmaps available in the font, then the font is unembeddable. */ /* */ /* <Note> */ /* While the fsType flags can indicate that a font may be embedded, a */ /* license with the font vendor may be separately required to use the */ /* font in this way. */ /* */ #define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000 #define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002 #define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING 0x0004 #define FT_FSTYPE_EDITABLE_EMBEDDING 0x0008 #define FT_FSTYPE_NO_SUBSETTING 0x0100 #define FT_FSTYPE_BITMAP_EMBEDDING_ONLY 0x0200 /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_FSType_Flags */ /* */ /* <Description> */ /* Return the fsType flags for a font. */ /* */ /* <Input> */ /* face :: A handle to the source face object. */ /* */ /* <Return> */ /* The fsType flags, @FT_FSTYPE_XXX. */ /* */ /* <Note> */ /* Use this function rather than directly reading the `fs_type' field */ /* in the @PS_FontInfoRec structure which is only guaranteed to */ /* return the correct results for Type~1 fonts. */ /* */ FT_EXPORT( FT_UShort ) FT_Get_FSType_Flags( FT_Face face ); /*************************************************************************/ /* */ /* <Section> */ /* glyph_variants */ /* */ /* <Title> */ /* Glyph Variants */ /* */ /* <Abstract> */ /* The FreeType~2 interface to Unicode Ideographic Variation */ /* Sequences (IVS), using the SFNT cmap format~14. */ /* */ /* <Description> */ /* Many CJK characters have variant forms. They are a sort of grey */ /* area somewhere between being totally irrelevant and semantically */ /* distinct; for this reason, the Unicode consortium decided to */ /* introduce Ideographic Variation Sequences (IVS), consisting of a */ /* Unicode base character and one of 240 variant selectors */ /* (U+E0100-U+E01EF), instead of further extending the already huge */ /* code range for CJK characters. */ /* */ /* An IVS is registered and unique; for further details please refer */ /* to Unicode Technical Report #37, the Ideographic Variation */ /* Database. To date (October 2007), the character with the most */ /* variants is U+908A, having 8~such IVS. */ /* */ /* Adobe and MS decided to support IVS with a new cmap subtable */ /* (format~14). It is an odd subtable because it is not a mapping of */ /* input code points to glyphs, but contains lists of all variants */ /* supported by the font. */ /* */ /* A variant may be either `default' or `non-default'. A default */ /* variant is the one you will get for that code point if you look it */ /* up in the standard Unicode cmap. A non-default variant is a */ /* different glyph. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Function> */ /* FT_Face_GetCharVariantIndex */ /* */ /* <Description> */ /* Return the glyph index of a given character code as modified by */ /* the variation selector. */ /* */ /* <Input> */ /* face :: */ /* A handle to the source face object. */ /* */ /* charcode :: */ /* The character code point in Unicode. */ /* */ /* variantSelector :: */ /* The Unicode code point of the variation selector. */ /* */ /* <Return> */ /* The glyph index. 0~means either `undefined character code', or */ /* `undefined selector code', or `no variation selector cmap */ /* subtable', or `current CharMap is not Unicode'. */ /* */ /* <Note> */ /* If you use FreeType to manipulate the contents of font files */ /* directly, be aware that the glyph index returned by this function */ /* doesn't always correspond to the internal indices used within */ /* the file. This is done to ensure that value~0 always corresponds */ /* to the `missing glyph'. */ /* */ /* This function is only meaningful if */ /* a) the font has a variation selector cmap sub table, */ /* and */ /* b) the current charmap has a Unicode encoding. */ /* */ /* <Since> */ /* 2.3.6 */ /* */ FT_EXPORT( FT_UInt ) FT_Face_GetCharVariantIndex( FT_Face face, FT_ULong charcode, FT_ULong variantSelector ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Face_GetCharVariantIsDefault */ /* */ /* <Description> */ /* Check whether this variant of this Unicode character is the one to */ /* be found in the `cmap'. */ /* */ /* <Input> */ /* face :: */ /* A handle to the source face object. */ /* */ /* charcode :: */ /* The character codepoint in Unicode. */ /* */ /* variantSelector :: */ /* The Unicode codepoint of the variation selector. */ /* */ /* <Return> */ /* 1~if found in the standard (Unicode) cmap, 0~if found in the */ /* variation selector cmap, or -1 if it is not a variant. */ /* */ /* <Note> */ /* This function is only meaningful if the font has a variation */ /* selector cmap subtable. */ /* */ /* <Since> */ /* 2.3.6 */ /* */ FT_EXPORT( FT_Int ) FT_Face_GetCharVariantIsDefault( FT_Face face, FT_ULong charcode, FT_ULong variantSelector ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Face_GetVariantSelectors */ /* */ /* <Description> */ /* Return a zero-terminated list of Unicode variant selectors found */ /* in the font. */ /* */ /* <Input> */ /* face :: */ /* A handle to the source face object. */ /* */ /* <Return> */ /* A pointer to an array of selector code points, or NULL if there is */ /* no valid variant selector cmap subtable. */ /* */ /* <Note> */ /* The last item in the array is~0; the array is owned by the */ /* @FT_Face object but can be overwritten or released on the next */ /* call to a FreeType function. */ /* */ /* <Since> */ /* 2.3.6 */ /* */ FT_EXPORT( FT_UInt32* ) FT_Face_GetVariantSelectors( FT_Face face ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Face_GetVariantsOfChar */ /* */ /* <Description> */ /* Return a zero-terminated list of Unicode variant selectors found */ /* for the specified character code. */ /* */ /* <Input> */ /* face :: */ /* A handle to the source face object. */ /* */ /* charcode :: */ /* The character codepoint in Unicode. */ /* */ /* <Return> */ /* A pointer to an array of variant selector code points which are */ /* active for the given character, or NULL if the corresponding list */ /* is empty. */ /* */ /* <Note> */ /* The last item in the array is~0; the array is owned by the */ /* @FT_Face object but can be overwritten or released on the next */ /* call to a FreeType function. */ /* */ /* <Since> */ /* 2.3.6 */ /* */ FT_EXPORT( FT_UInt32* ) FT_Face_GetVariantsOfChar( FT_Face face, FT_ULong charcode ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Face_GetCharsOfVariant */ /* */ /* <Description> */ /* Return a zero-terminated list of Unicode character codes found for */ /* the specified variant selector. */ /* */ /* <Input> */ /* face :: */ /* A handle to the source face object. */ /* */ /* variantSelector :: */ /* The variant selector code point in Unicode. */ /* */ /* <Return> */ /* A list of all the code points which are specified by this selector */ /* (both default and non-default codes are returned) or NULL if there */ /* is no valid cmap or the variant selector is invalid. */ /* */ /* <Note> */ /* The last item in the array is~0; the array is owned by the */ /* @FT_Face object but can be overwritten or released on the next */ /* call to a FreeType function. */ /* */ /* <Since> */ /* 2.3.6 */ /* */ FT_EXPORT( FT_UInt32* ) FT_Face_GetCharsOfVariant( FT_Face face, FT_ULong variantSelector ); /*************************************************************************/ /* */ /* <Section> */ /* computations */ /* */ /* <Title> */ /* Computations */ /* */ /* <Abstract> */ /* Crunching fixed numbers and vectors. */ /* */ /* <Description> */ /* This section contains various functions used to perform */ /* computations on 16.16 fixed-float numbers or 2d vectors. */ /* */ /* <Order> */ /* FT_MulDiv */ /* FT_MulFix */ /* FT_DivFix */ /* FT_RoundFix */ /* FT_CeilFix */ /* FT_FloorFix */ /* FT_Vector_Transform */ /* FT_Matrix_Multiply */ /* FT_Matrix_Invert */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Function> */ /* FT_MulDiv */ /* */ /* <Description> */ /* A very simple function used to perform the computation `(a*b)/c' */ /* with maximal accuracy (it uses a 64-bit intermediate integer */ /* whenever necessary). */ /* */ /* This function isn't necessarily as fast as some processor specific */ /* operations, but is at least completely portable. */ /* */ /* <Input> */ /* a :: The first multiplier. */ /* b :: The second multiplier. */ /* c :: The divisor. */ /* */ /* <Return> */ /* The result of `(a*b)/c'. This function never traps when trying to */ /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */ /* on the signs of `a' and `b'. */ /* */ FT_EXPORT( FT_Long ) FT_MulDiv( FT_Long a, FT_Long b, FT_Long c ); /* */ /* The following #if 0 ... #endif is for the documentation formatter, */ /* hiding the internal `FT_MULFIX_INLINED' macro. */ #if 0 /*************************************************************************/ /* */ /* <Function> */ /* FT_MulFix */ /* */ /* <Description> */ /* A very simple function used to perform the computation */ /* `(a*b)/0x10000' with maximal accuracy. Most of the time this is */ /* used to multiply a given value by a 16.16 fixed float factor. */ /* */ /* <Input> */ /* a :: The first multiplier. */ /* b :: The second multiplier. Use a 16.16 factor here whenever */ /* possible (see note below). */ /* */ /* <Return> */ /* The result of `(a*b)/0x10000'. */ /* */ /* <Note> */ /* This function has been optimized for the case where the absolute */ /* value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */ /* As this happens mainly when scaling from notional units to */ /* fractional pixels in FreeType, it resulted in noticeable speed */ /* improvements between versions 2.x and 1.x. */ /* */ /* As a conclusion, always try to place a 16.16 factor as the */ /* _second_ argument of this function; this can make a great */ /* difference. */ /* */ FT_EXPORT( FT_Long ) FT_MulFix( FT_Long a, FT_Long b ); /* */ #endif #ifdef FT_MULFIX_INLINED #define FT_MulFix( a, b ) FT_MULFIX_INLINED( a, b ) #else FT_EXPORT( FT_Long ) FT_MulFix( FT_Long a, FT_Long b ); #endif /*************************************************************************/ /* */ /* <Function> */ /* FT_DivFix */ /* */ /* <Description> */ /* A very simple function used to perform the computation */ /* `(a*0x10000)/b' with maximal accuracy. Most of the time, this is */ /* used to divide a given value by a 16.16 fixed float factor. */ /* */ /* <Input> */ /* a :: The first multiplier. */ /* b :: The second multiplier. Use a 16.16 factor here whenever */ /* possible (see note below). */ /* */ /* <Return> */ /* The result of `(a*0x10000)/b'. */ /* */ /* <Note> */ /* The optimization for FT_DivFix() is simple: If (a~<<~16) fits in */ /* 32~bits, then the division is computed directly. Otherwise, we */ /* use a specialized version of @FT_MulDiv. */ /* */ FT_EXPORT( FT_Long ) FT_DivFix( FT_Long a, FT_Long b ); /*************************************************************************/ /* */ /* <Function> */ /* FT_RoundFix */ /* */ /* <Description> */ /* A very simple function used to round a 16.16 fixed number. */ /* */ /* <Input> */ /* a :: The number to be rounded. */ /* */ /* <Return> */ /* The result of `(a + 0x8000) & -0x10000'. */ /* */ FT_EXPORT( FT_Fixed ) FT_RoundFix( FT_Fixed a ); /*************************************************************************/ /* */ /* <Function> */ /* FT_CeilFix */ /* */ /* <Description> */ /* A very simple function used to compute the ceiling function of a */ /* 16.16 fixed number. */ /* */ /* <Input> */ /* a :: The number for which the ceiling function is to be computed. */ /* */ /* <Return> */ /* The result of `(a + 0x10000 - 1) & -0x10000'. */ /* */ FT_EXPORT( FT_Fixed ) FT_CeilFix( FT_Fixed a ); /*************************************************************************/ /* */ /* <Function> */ /* FT_FloorFix */ /* */ /* <Description> */ /* A very simple function used to compute the floor function of a */ /* 16.16 fixed number. */ /* */ /* <Input> */ /* a :: The number for which the floor function is to be computed. */ /* */ /* <Return> */ /* The result of `a & -0x10000'. */ /* */ FT_EXPORT( FT_Fixed ) FT_FloorFix( FT_Fixed a ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Vector_Transform */ /* */ /* <Description> */ /* Transform a single vector through a 2x2 matrix. */ /* */ /* <InOut> */ /* vector :: The target vector to transform. */ /* */ /* <Input> */ /* matrix :: A pointer to the source 2x2 matrix. */ /* */ /* <Note> */ /* The result is undefined if either `vector' or `matrix' is invalid. */ /* */ FT_EXPORT( void ) FT_Vector_Transform( FT_Vector* vec, const FT_Matrix* matrix ); /*************************************************************************/ /* */ /* <Section> */ /* version */ /* */ /* <Title> */ /* FreeType Version */ /* */ /* <Abstract> */ /* Functions and macros related to FreeType versions. */ /* */ /* <Description> */ /* Note that those functions and macros are of limited use because */ /* even a new release of FreeType with only documentation changes */ /* increases the version number. */ /* */ /*************************************************************************/ /************************************************************************* * * @enum: * FREETYPE_XXX * * @description: * These three macros identify the FreeType source code version. * Use @FT_Library_Version to access them at runtime. * * @values: * FREETYPE_MAJOR :: The major version number. * FREETYPE_MINOR :: The minor version number. * FREETYPE_PATCH :: The patch level. * * @note: * The version number of FreeType if built as a dynamic link library * with the `libtool' package is _not_ controlled by these three * macros. * */ #define FREETYPE_MAJOR 2 #define FREETYPE_MINOR 4 #define FREETYPE_PATCH 4 /*************************************************************************/ /* */ /* <Function> */ /* FT_Library_Version */ /* */ /* <Description> */ /* Return the version of the FreeType library being used. This is */ /* useful when dynamically linking to the library, since one cannot */ /* use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and */ /* @FREETYPE_PATCH. */ /* */ /* <Input> */ /* library :: A source library handle. */ /* */ /* <Output> */ /* amajor :: The major version number. */ /* */ /* aminor :: The minor version number. */ /* */ /* apatch :: The patch version number. */ /* */ /* <Note> */ /* The reason why this function takes a `library' argument is because */ /* certain programs implement library initialization in a custom way */ /* that doesn't use @FT_Init_FreeType. */ /* */ /* In such cases, the library version might not be available before */ /* the library object has been created. */ /* */ FT_EXPORT( void ) FT_Library_Version( FT_Library library, FT_Int *amajor, FT_Int *aminor, FT_Int *apatch ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Face_CheckTrueTypePatents */ /* */ /* <Description> */ /* Parse all bytecode instructions of a TrueType font file to check */ /* whether any of the patented opcodes are used. This is only useful */ /* if you want to be able to use the unpatented hinter with */ /* fonts that do *not* use these opcodes. */ /* */ /* Note that this function parses *all* glyph instructions in the */ /* font file, which may be slow. */ /* */ /* <Input> */ /* face :: A face handle. */ /* */ /* <Return> */ /* 1~if this is a TrueType font that uses one of the patented */ /* opcodes, 0~otherwise. */ /* */ /* <Note> */ /* Since May 2010, TrueType hinting is no longer patented. */ /* */ /* <Since> */ /* 2.3.5 */ /* */ FT_EXPORT( FT_Bool ) FT_Face_CheckTrueTypePatents( FT_Face face ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Face_SetUnpatentedHinting */ /* */ /* <Description> */ /* Enable or disable the unpatented hinter for a given face. */ /* Only enable it if you have determined that the face doesn't */ /* use any patented opcodes (see @FT_Face_CheckTrueTypePatents). */ /* */ /* <Input> */ /* face :: A face handle. */ /* */ /* value :: New boolean setting. */ /* */ /* <Return> */ /* The old setting value. This will always be false if this is not */ /* an SFNT font, or if the unpatented hinter is not compiled in this */ /* instance of the library. */ /* */ /* <Note> */ /* Since May 2010, TrueType hinting is no longer patented. */ /* */ /* <Since> */ /* 2.3.5 */ /* */ FT_EXPORT( FT_Bool ) FT_Face_SetUnpatentedHinting( FT_Face face, FT_Bool value ); /* */ FT_END_HEADER #endif /* __FREETYPE_H__ */ /* END */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftcid.h */ /* */ /* FreeType API for accessing CID font information (specification). */ /* */ /* Copyright 2007, 2009 by Dereg Clegg, Michael Toftdal. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTCID_H__ #define __FTCID_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* cid_fonts */ /* */ /* <Title> */ /* CID Fonts */ /* */ /* <Abstract> */ /* CID-keyed font specific API. */ /* */ /* <Description> */ /* This section contains the declaration of CID-keyed font specific */ /* functions. */ /* */ /*************************************************************************/ /********************************************************************** * * @function: * FT_Get_CID_Registry_Ordering_Supplement * * @description: * Retrieve the Registry/Ordering/Supplement triple (also known as the * "R/O/S") from a CID-keyed font. * * @input: * face :: * A handle to the input face. * * @output: * registry :: * The registry, as a C~string, owned by the face. * * ordering :: * The ordering, as a C~string, owned by the face. * * supplement :: * The supplement. * * @return: * FreeType error code. 0~means success. * * @note: * This function only works with CID faces, returning an error * otherwise. * * @since: * 2.3.6 */ FT_EXPORT( FT_Error ) FT_Get_CID_Registry_Ordering_Supplement( FT_Face face, const char* *registry, const char* *ordering, FT_Int *supplement); /********************************************************************** * * @function: * FT_Get_CID_Is_Internally_CID_Keyed * * @description: * Retrieve the type of the input face, CID keyed or not. In * constrast to the @FT_IS_CID_KEYED macro/***************************************************************************/ /* */ /* fterrdef.h */ /* */ /* FreeType error codes (specification). */ /* */ /* Copyright 2002, 2004, 2006, 2007, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*******************************************************************/ /*******************************************************************/ /***** *****/ /***** LIST OF ERROR CODES/MESSAGES *****/ /***** *****/ /*******************************************************************/ /*******************************************************************/ /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */ /* including this file. */ /* generic errors */ FT_NOERRORDEF_( Ok, 0x00, \ "no error" ) FT_ERRORDEF_( Cannot_Open_Resource, 0x01, \ "cannot open resource" ) FT_ERRORDEF_( Unknown_File_Format, 0x02, \ "unknown file format" ) FT_ERRORDEF_( Invalid_File_Format, 0x03, \ "broken file" ) FT_ERRORDEF_( Invalid_Version, 0x04, \ "invalid FreeType version" ) FT_ERRORDEF_( Lower_Module_Version, 0x05, \ "module version is too low" ) FT_ERRORDEF_( Invalid_Argument, 0x06, \ "invalid argument" ) FT_ERRORDEF_( Unimplemented_Feature, 0x07, \ "unimplemented feature" ) FT_ERRORDEF_( Invalid_Table, 0x08, \ "broken table" ) FT_ERRORDEF_( Invalid_Offset, 0x09, \ "broken offset within table" ) FT_ERRORDEF_( Array_Too_Large, 0x0A, \ "array allocation size too large" ) /* glyph/character errors */ FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, \ "invalid glyph index" ) FT_ERRORDEF_( Invalid_Character_Code, 0x11, \ "invalid character code" ) FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, \ "unsupported glyph image format" ) FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, \ "cannot render this glyph format" ) FT_ERRORDEF_( Invalid_Outline, 0x14, \ "invalid outline" ) FT_ERRORDEF_( Invalid_Composite, 0x15, \ "invalid composite glyph" ) FT_ERRORDEF_( Too_Many_Hints, 0x16, \ "too many hints" ) FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, \ "invalid pixel size" ) /* handle errors */ FT_ERRORDEF_( Invalid_Handle, 0x20, \ "invalid object handle" ) FT_ERRORDEF_( Invalid_Library_Handle, 0x21, \ "invalid library handle" ) FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, \ "invalid module handle" ) FT_ERRORDEF_( Invalid_Face_Handle, 0x23, \ "invalid face handle" ) FT_ERRORDEF_( Invalid_Size_Handle, 0x24, \ "invalid size handle" ) FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, \ "invalid glyph slot handle" ) FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, \ "invalid charmap handle" ) FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, \ "invalid cache manager handle" ) FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, \ "invalid stream handle" ) /* driver errors */ FT_ERRORDEF_( Too_Many_Drivers, 0x30, \ "too many modules" ) FT_ERRORDEF_( Too_Many_Extensions, 0x31, \ "too many extensions" ) /* memory errors */ FT_ERRORDEF_( Out_Of_Memory, 0x40, \ "out of memory" ) FT_ERRORDEF_( Unlisted_Object, 0x41, \ "unlisted object" ) /* stream errors */ FT_ERRORDEF_( Cannot_Open_Stream, 0x51, \ "cannot open stream" ) FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, \ "invalid stream seek" ) FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, \ "invalid stream skip" ) FT_ERRORDEF_( Invalid_Stream_Read, 0x54, \ "invalid stream read" ) FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, \ "invalid stream operation" ) FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, \ "invalid frame operation" ) FT_ERRORDEF_( Nested_Frame_Access, 0x57, \ "nested frame access" ) FT_ERRORDEF_( Invalid_Frame_Read, 0x58, \ "invalid frame read" ) /* raster errors */ FT_ERRORDEF_( Raster_Uninitialized, 0x60, \ "raster uninitialized" ) FT_ERRORDEF_( Raster_Corrupted, 0x61, \ "raster corrupted" ) FT_ERRORDEF_( Raster_Overflow, 0x62, \ "raster overflow" ) FT_ERRORDEF_( Raster_Negative_Height, 0x63, \ "negative height while rastering" ) /* cache errors */ FT_ERRORDEF_( Too_Many_Caches, 0x70, \ "too many registered caches" ) /* TrueType and SFNT errors */ FT_ERRORDEF_( Invalid_Opcode, 0x80, \ "invalid opcode" ) FT_ERRORDEF_( Too_Few_Arguments, 0x81, \ "too few arguments" ) FT_ERRORDEF_( Stack_Overflow, 0x82, \ "stack overflow" ) FT_ERRORDEF_( Code_Overflow, 0x83, \ "code overflow" ) FT_ERRORDEF_( Bad_Argument, 0x84, \ "bad argument" ) FT_ERRORDEF_( Divide_By_Zero, 0x85, \ "division by zero" ) FT_ERRORDEF_( Invalid_Reference, 0x86, \ "invalid reference" ) FT_ERRORDEF_( Debug_OpCode, 0x87, \ "found debug opcode" ) FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, \ "found ENDF opcode in execution stream" ) FT_ERRORDEF_( Nested_DEFS, 0x89, \ "nested DEFS" ) FT_ERRORDEF_( Invalid_CodeRange, 0x8A, \ "invalid code range" ) FT_ERRORDEF_( Execution_Too_Long, 0x8B, \ "execution context too long" ) FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, \ "too many function definitions" ) FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, \ "too many instruction definitions" ) FT_ERRORDEF_( Table_Missing, 0x8E, \ "SFNT font table missing" ) FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, \ "horizontal header (hhea) table missing" ) FT_ERRORDEF_( Locations_Missing, 0x90, \ "locations (loca) table missing" ) FT_ERRORDEF_( Name_Table_Missing, 0x91, \ "name table missing" ) FT_ERRORDEF_( CMap_Table_Missing, 0x92, \ "character map (cmap) table missing" ) FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, \ "horizontal metrics (hmtx) table missing" ) FT_ERRORDEF_( Post_Table_Missing, 0x94, \ "PostScript (post) table missing" ) FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, \ "invalid horizontal metrics" ) FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, \ "invalid character map (cmap) format" ) FT_ERRORDEF_( Invalid_PPem, 0x97, \ "invalid ppem value" ) FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, \ "invalid vertical metrics" ) FT_ERRORDEF_( Could_Not_Find_Context, 0x99, \ "could not find context" ) FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, \ "invalid PostScript (post) table format" ) FT_ERRORDEF_( Invalid_Post_Table, 0x9B, \ "invalid PostScript (post) table" ) /* CFF, CID, and Type 1 errors */ FT_ERRORDEF_( Syntax_Error, 0xA0, \ "opcode syntax error" ) FT_ERRORDEF_( Stack_Underflow, 0xA1, \ "argument stack underflow" ) FT_ERRORDEF_( Ignore, 0xA2, \ "ignore" ) FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \ "no Unicode glyph name found" ) /* BDF errors */ FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, \ "`STARTFONT' field missing" ) FT_ERRORDEF_( Missing_Font_Field, 0xB1, \ "`FONT' field missing" ) FT_ERRORDEF_( Missing_Size_Field, 0xB2, \ "`SIZE' field missing" ) FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \ "`FONTBOUNDINGBOX' field missing" ) FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \ "`CHARS' field missing" ) FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \ "`STARTCHAR' field missing" ) FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \ "`ENCODING' field missing" ) FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \ "`BBX' field missing" ) FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \ "`BBX' too big" ) FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \ "Font header corrupted or missing fields" ) FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \ "Font glyphs corrupted or missing fields" ) /* END */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* fterrors.h */ /* */ /* FreeType error code handling (specification). */ /* */ /* Copyright 1996-2001, 2002, 2004, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /* */ /* This special header file is used to define the handling of FT2 */ /* enumeration constants. It can also be used to generate error message */ /* strings with a small macro trick explained below. */ /* */ /* I - Error Formats */ /* ----------------- */ /* */ /* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */ /* defined in ftoption.h in order to make the higher byte indicate */ /* the module where the error has happened (this is not compatible */ /* with standard builds of FreeType 2). You can then use the macro */ /* FT_ERROR_BASE macro to extract the generic error code from an */ /* FT_Error value. */ /* */ /* */ /* II - Error Message strings */ /* -------------------------- */ /* */ /* The error definitions below are made through special macros that */ /* allow client applications to build a table of error message strings */ /* if they need it. The strings are not included in a normal build of */ /* FreeType 2 to save space (most client applications do not use */ /* them). */ /* */ /* To do so, you have to define the following macros before including */ /* this file: */ /* */ /* FT_ERROR_START_LIST :: */ /* This macro is called before anything else to define the start of */ /* the error list. It is followed by several FT_ERROR_DEF calls */ /* (see below). */ /* */ /* FT_ERROR_DEF( e, v, s ) :: */ /* This macro is called to define one single error. */ /* `e' is the error code identifier (e.g. FT_Err_Invalid_Argument). */ /* `v' is the error numerical value. */ /* `s' is the corresponding error string. */ /* */ /* FT_ERROR_END_LIST :: */ /* This macro ends the list. */ /* */ /* Additionally, you have to undefine __FTERRORS_H__ before #including */ /* this file. */ /* */ /* Here is a simple example: */ /* */ /* { */ /* #undef __FTERRORS_H__ */ /* #define FT_ERRORDEF( e, v, s ) { e, s }, */ /* #define FT_ERROR_START_LIST { */ /* #define FT_ERROR_END_LIST { 0, 0 } }; */ /* */ /* const struct */ /* { */ /* int err_code; */ /* const char* err_msg; */ /* } ft_errors[] = */ /* */ /* #include FT_ERRORS_H */ /* } */ /* */ /*************************************************************************/ #ifndef __FTERRORS_H__ #define __FTERRORS_H__ /* include module base error codes */ #include FT_MODULE_ERRORS_H /*******************************************************************/ /*******************************************************************/ /***** *****/ /***** SETUP MACROS *****/ /***** *****/ /*******************************************************************/ /*******************************************************************/ #undef FT_NEED_EXTERN_C #undef FT_ERR_XCAT #undef FT_ERR_CAT #define FT_ERR_XCAT( x, y ) x ## y #define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y ) /* FT_ERR_PREFIX is used as a prefix for error identifiers. */ /* By default, we use `FT_Err_'. */ /* */ #ifndef FT_ERR_PREFIX #define FT_ERR_PREFIX FT_Err_ #endif /* FT_ERR_BASE is used as the base for module-specific errors. */ /* */ #ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS #ifndef FT_ERR_BASE #define FT_ERR_BASE FT_Mod_Err_Base #endif #else #undef FT_ERR_BASE #define FT_ERR_BASE 0 #endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */ /* If FT_ERRORDEF is not defined, we need to define a simple */ /* enumeration type. */ /* */ #ifndef FT_ERRORDEF #define FT_ERRORDEF( e, v, s ) e = v, #define FT_ERROR_START_LIST enum { #define FT_ERROR_END_LIST FT_ERR_CAT( FT_ERR_PREFIX, Max ) }; #ifdef __cplusplus #define FT_NEED_EXTERN_C extern "C" { #endif #endif /* !FT_ERRORDEF */ /* this macro is used to define an error */ #define FT_ERRORDEF_( e, v, s ) \ FT_ERRORDEF( FT_E/***************************************************************************/ /* */ /* ftgasp.h */ /* */ /* Access of TrueType's `gasp' table (specification). */ /* */ /* Copyright 2007, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef _FT_GASP_H_ #define _FT_GASP_H_ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif /*************************************************************************** * * @section: * gasp_table * * @title: * Gasp Table * * @abstract: * Retrieving TrueType `gasp' table entries. * * @description: * The function @FT_Get_Gasp can be used to query a TrueType or OpenType * font for specific entries in its `gasp' table, if any. This is * mainly useful when implementing native TrueType hinting with the * bytecode interpreter to duplicate the Windows text rendering results. */ /************************************************************************* * * @enum: * FT_GASP_XXX * * @description: * A list of values and/or bit-flags returned by the @FT_Get_Gasp * function. * * @values: * FT_GASP_NO_TABLE :: * This special value means that there is no GASP table in this face. * It is up to the client to decide what to do. * * FT_GASP_DO_GRIDFIT :: * Grid-fitting and hinting should be performed at the specified ppem. * This *really* means TrueType bytecode interpretation. * * FT_GASP_DO_GRAY :: * Anti-aliased rendering should be performed at the specified ppem. * * FT_GASP_SYMMETRIC_SMOOTHING :: * Smoothing along multiple axes must be used with ClearType. * * FT_GASP_SYMMETRIC_GRIDFIT :: * Grid-fitting must be used with ClearType's symmetric smoothing. * * @note: * `ClearType' is Microsoft's implementation of LCD rendering, partly * protected by patents. * * @since: * 2.3.0 */ #define FT_GASP_NO_TABLE -1 #define FT_GASP_DO_GRIDFIT 0x01 #define FT_GASP_DO_GRAY 0x02 #define FT_GASP_SYMMETRIC_SMOOTHING 0x08 #define FT_GASP_SYMMETRIC_GRIDFIT 0x10 /************************************************************************* * * @func: * FT_Get_Gasp * * @description: * Read the `gasp' table from a TrueType or OpenType font file and * return the entry corresponding to a given character pixel size. * * @input: * face :: The source face handle. * ppem :: The vertical character pixel size. * * @return: * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no * `gasp' table in the face. * * @since: * 2.3.0 */ FT_EXPORT( FT_Int ) FT_Get_Gasp( FT_Face face, FT_UInt ppem ); /* */ #endif /* _FT_GASP_H_ */ /* END */ ���������������������������������������������������������/***************************************************************************/ /* */ /* ftgxval.h */ /* */ /* FreeType API for validating TrueTypeGX/AAT tables (specification). */ /* */ /* Copyright 2004, 2005, 2006 by */ /* Masatake YAMATO, Redhat K.K, */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /***************************************************************************/ /* */ /* gxvalid is derived from both gxlayout module and otvalid module. */ /* Development of gxlayout is supported by the Information-technology */ /* Promotion Agency(IPA), Japan. */ /* */ /***************************************************************************/ #ifndef __FTGXVAL_H__ #define __FTGXVAL_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* gx_validation */ /* */ /* <Title> */ /* TrueTypeGX/AAT Validation */ /* */ /* <Abstract> */ /* An API to validate TrueTypeGX/AAT tables. */ /* */ /* <Description> */ /* This section contains the declaration of functions to validate */ /* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, */ /* trak, prop, lcar). */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* */ /* Warning: Use FT_VALIDATE_XXX to validate a table. */ /* Following definitions are for gxvalid developers. */ /* */ /* */ /*************************************************************************/ #define FT_VALIDATE_feat_INDEX 0 #define FT_VALIDATE_mort_INDEX 1 #define FT_VALIDATE_morx_INDEX 2 #define FT_VALIDATE_bsln_INDEX 3 #define FT_VALIDATE_just_INDEX 4 #define FT_VALIDATE_kern_INDEX 5 #define FT_VALIDATE_opbd_INDEX 6 #define FT_VALIDATE_trak_INDEX 7 #define FT_VALIDATE_prop_INDEX 8 #define FT_VALIDATE_lcar_INDEX 9 #define FT_VALIDATE_GX_LAST_INDEX FT_VALIDATE_lcar_INDEX /************************************************************************* * * @macro: * FT_VALIDATE_GX_LENGTH * * @description: * The number of tables checked in this module. Use it as a parameter * for the `table-length' argument of function @FT_TrueTypeGX_Validate. */ #define FT_VALIDATE_GX_LENGTH (FT_VALIDATE_GX_LAST_INDEX + 1) /* */ /* Up to 0x1000 is used by otvalid. Ox2xxx is reserved for feature OT extension. */ #define FT_VALIDATE_GX_START 0x4000 #define FT_VALIDATE_GX_BITFIELD( tag ) \ ( FT_VALIDATE_GX_START << FT_VALIDATE_##tag##_INDEX ) /********************************************************************** * * @enum: * FT_VALIDATE_GXXXX * * @description: * A list of bit-field constants used with @FT_TrueTypeGX_Validate to * indicate which TrueTypeGX/AAT Type tables should be validated. * * @values: * FT_VALIDATE_feat :: * Validate `feat' table. * * FT_VALIDATE_mort :: * Validate `mort' table. * * FT_VALIDATE_morx :: * Validate `morx' table. * * FT_VALIDATE_bsln :: * Validate `bsln' table. * * FT_VALIDATE_just :: * Validate `just' table. * * FT_VALIDATE_kern :: * Validate `kern' table. * * FT_VALIDATE_opbd :: * Validate `opbd' table. * * FT_VALIDATE_trak :: * Validate `trak' table. * * FT_VALIDATE_prop :: * Validate `prop' table. * * FT_VALIDATE_lcar :: * Validate `lcar' table. * * FT_VALIDATE_GX :: * Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, * opbd, trak, prop and lcar). * */ #define FT_VALIDATE_feat FT_VALIDATE_GX_BITFIELD( feat ) #define FT_VALIDATE_mort FT_VALIDATE_GX_BITFIELD( mort ) #define FT_VALIDATE_morx FT_VALIDATE_GX_BITFIELD( morx ) #define FT_VALIDATE_bsln FT_VALIDATE_GX_BITFIELD( bsln ) #define FT_VALIDATE_just FT_VALIDATE_GX_BITFIELD( just ) #define FT_VALIDATE_kern FT_VALIDATE_GX_BITFIELD( kern ) #define FT_VALIDATE_opbd FT_VALIDATE_GX_BITFIELD( opbd ) #define FT_VALIDATE_trak FT_VALIDATE_GX_BITFIELD( trak ) #define FT_VALIDATE_prop FT_VALIDATE_GX_BITFIELD( prop ) #define FT_VALIDATE_lcar FT_VALIDATE_GX_BITFIELD( lcar ) #define FT_VALIDATE_GX ( FT_VALIDATE_feat | \ FT_VALIDATE_mort | \ FT_VALIDATE_morx | \ FT_VALIDATE_bsln | \ FT_VALIDATE_just | \ FT_VALIDATE_kern | \ FT_VALIDATE_opbd | \ FT_VALIDATE_trak | \ FT_VALIDATE_prop | \ FT_VALIDATE_lcar ) /* */ /********************************************************************** * * @function: * FT_TrueTypeGX_Validate * * @description: * Validate various TrueTypeGX tables to assure that all offsets and * indices are valid. The idea is that a higher-level library which * actually does the text layout can access those tables without * error checking (which can be quite time consuming). * * @input: * face :: * A handle to the input face. * * validation_flags :: * A bit field which specifies the tables to be validated. See * @FT_VALIDATE_GXXXX for possible values. * * table_length :: * The size of the `tables' array. Normally, @FT_VALIDATE_GX_LENGTH * should be passed. * * @output: * tables :: * The array where all validated sfnt tables are stored. * The array itself must be allocated by a client. * * @return: * FreeType error code. 0~means success. * * @note: * This function only works with TrueTypeGX fonts, returning an error * otherwise. * * After use, the application should deallocate the buffers pointed to by * each `tables' element, by calling @FT_TrueTypeGX_Free. A NULL value * indicates that the table either doesn't exist in the font, the * application hasn't asked for validation, or the validator doesn't have * the ability to validate the sfnt table. */ FT_EXPORT( FT_Error ) FT_TrueTypeGX_Validate( FT_Face face, FT_UInt validation_flags, FT_Bytes tables[FT_VALIDATE_GX_LENGTH], FT_UInt table_length ); /* */ /********************************************************************** * * @function: * FT_TrueTypeGX_Free * * @description: * Free the buffer allocated by TrueTypeGX validator. * * @input: * face :: * A handle to the input face. * * table :: * The pointer to the buffer allocated by * @FT_TrueTypeGX_Validate. * * @note: * This function must be used to free the buffer allocated by * @FT_TrueTypeGX_Validate only. */ FT_EXPORT( void ) FT_TrueTypeGX_Free( FT_Face face, FT_Bytes table ); /* */ /********************************************************************** * * @enum: * FT_VALIDATE_CKERNXXX * * @description: * A list of bit-field constants used with @FT_ClassicKern_Validate * to indicate the classic kern dialect or dialects. If the selected * type doesn't fit, @FT_ClassicKern_Validate regards the table as * invalid. * * @values: * FT_VALIDATE_MS :: * Handle the `kern' table as a classic Microsoft kern table. * * FT_VALIDATE_APPLE :: * Handle the `kern' table as a classic Apple kern table. * * FT_VALIDATE_CKERN :: * Handle the `kern' as either classic Apple or Microsoft kern table. */ #define FT_VALIDATE_MS ( FT_VALIDATE_GX_START << 0 ) #define FT_VALIDATE_APPLE ( FT_VALIDATE_GX_START << 1 ) #define FT_VALIDATE_CKERN ( FT_VALIDATE_MS | FT_VALIDATE_APPLE ) /* */ /********************************************************************** * * @function: * FT_ClassicKern_Validate * * @description: * Validate classic (16-bit format) kern table to assure that the offsets * and indices are valid. The idea is that a higher-level library which * actually does the text layout can access those tables without error * checking (which can be quite time consuming). * * The `kern' table validator in @FT_TrueTypeGX_Validate deals with both * the new 32-bit format and the classic 16-bit format, while * FT_ClassicKern_Validate only supports the classic 16-bit format. * * @input: * face :: * A handle to the input face. * * validation_flags :: * A bit field which specifies the dialect to be validated. See * @FT_VALIDATE_CKERNXXX for possible values. * * @output: * ckern_table :: * A pointer to the kern table. * * @return: * FreeType error code. 0~means success. * * @note: * After use, the application should deallocate the buffers pointed to by * `ckern_table', by calling @FT_ClassicKern_Free. A NULL value * indicates that the table doesn't exist in the font. */ FT_EXPORT( FT_Error ) FT_ClassicKern_Validate( FT_Face face, FT_UInt validation_flags, FT_Bytes *ckern_table ); /* */ /********************************************************************** * * @function: * FT_ClassicKern_Free * * @description: * Free the buffer allocated by classic Kern validator. * * @input: * face :: * A handle to the input face. * * table :: * The pointer to the buffer that is allocated by * @F/***************************************************************************/ /* */ /* ftgzip.h */ /* */ /* Gzip-compressed stream support. */ /* */ /* Copyright 2002, 2003, 2004, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTGZIP_H__ #define __FTGZIP_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* gzip */ /* */ /* <Title> */ /* GZIP Streams */ /* */ /* <Abstract> */ /* Using gzip-compressed font files. */ /* */ /* <Description> */ /* This section contains the declaration of Gzip-specific functions. */ /* */ /*************************************************************************/ /************************************************************************ * * @function: * FT_Stream_OpenGzip * * @description: * Open a new stream to parse gzip-compressed font files. This is * mainly used to support the compressed `*.pcf.gz' fonts that come * with XFree86. * * @input: * stream :: * The target embedding stream. * * source :: * The source stream. * * @return: * FreeType error code. 0~means success. * * @note: * The source stream must be opened _before_ calling this function. * * Calling the internal function `FT_Stream_Close' on the new stream will * *not* call `FT_Stream_Close' on the source stream. None of the stream * objects will be released to the heap. * * The stream implementation is very basic and resets the decompression * process each time seeking backwards is needed within the stream. * * In certain builds of the library, gzip compression recognition is * automatically handled when calling @FT_New_Face or @FT_Open_Face. * This means that if no font driver is capable of handling the raw * compressed file, the library will try to open a gzipped stream from * it and re-open the face with it. * * This function may return `FT_Err_Unimplemented_Feature' if your build * of FreeType was not compiled wit �� �� �� �� �� �� �� �� ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftcache.h */ /* */ /* FreeType Cache subsystem (specification). */ /* */ /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTCACHE_H__ #define __FTCACHE_H__ #include <ft2build.h> #include FT_GLYPH_H FT_BEGIN_HEADER /************************************************************************* * * <Section> * cache_subsystem * * <Title> * Cache Sub-System * * <Abstract> * How to cache face, size, and glyph data with FreeType~2. * * <Description> * This section describes the FreeType~2 cache sub-system, which is used * to limit the number of concurrently opened @FT_Face and @FT_Size * objects, as well as caching information like character maps and glyph * images while limiting their maximum memory usage. * * Note that all types and functions begin with the `FTC_' prefix. * * The cache is highly portable and thus doesn't know anything about the * fonts installed on your system, or how to access them. This implies * the following scheme: * * First, available or installed font faces are uniquely identified by * @FTC_FaceID values, provided to the cache by the client. Note that * the cache only stores and compares these values, and doesn't try to * interpret them in any way. * * Second, the cache calls, only when needed, a client-provided function * to convert an @FTC_FaceID into a new @FT_Face object. The latter is * then completely managed by the cache, including its termination * through @FT_Done_Face. To monitor termination of face objects, the * finalizer callback in the `generic' field of the @FT_Face object can * be used, which might also be used to store the @FTC_FaceID of the * face. * * Clients are free to map face IDs to anything else. The most simple * usage is to associate them to a (pathname,face_index) pair that is * used to call @FT_New_Face. However, more complex schemes are also * possible. * * Note that for the cache to work correctly, the face ID values must be * *persistent*, which means that the contents they point to should not * change at runtime, or that their value should not become invalid. * * If this is unavoidable (e.g., when a font is uninstalled at runtime), * you should call @FTC_Manager_RemoveFaceID as soon as possible, to let * the cache get rid of any references to the old @FTC_FaceID it may * keep internally. Failure to do so will lead to incorrect behaviour * or even crashes. * * To use the cache, start with calling @FTC_Manager_New to create a new * @FTC_Manager object, which models a single cache instance. You can * then look up @FT_Face and @FT_Size objects with * @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively. * * If you want to use the charmap caching, call @FTC_CMapCache_New, then * later use @FTC_CMapCache_Lookup to perform the equivalent of * @FT_Get_Char_Index, only much faster. * * If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then * later use @FTC_ImageCache_Lookup to retrieve the corresponding * @FT_Glyph objects from the cache. * * If you need lots of small bitmaps, it is much more memory efficient * to call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup. This * returns @FTC_SBitRec structures, which are used to store small * bitmaps directly. (A small bitmap is one whose metrics and * dimensions all fit into 8-bit integers). * * We hope to also provide a kerning cache in the near future. * * * <Order> * FTC_Manager * FTC_FaceID * FTC_Face_Requester * * FTC_Manager_New * FTC_Manager_Reset * FTC_Manager_Done * FTC_Manager_LookupFace * FTC_Manager_LookupSize * FTC_Manager_RemoveFaceID * * FTC_Node * FTC_Node_Unref * * FTC_ImageCache * FTC_ImageCache_New * FTC_ImageCache_Lookup * * FTC_SBit * FTC_SBitCache * FTC_SBitCache_New * FTC_SBitCache_Lookup * * FTC_CMapCache * FTC_CMapCache_New * FTC_CMapCache_Lookup * *************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /***** *****/ /***** BASIC TYPE DEFINITIONS *****/ /***** *****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /************************************************************************* * * @type: FTC_FaceID * * @description: * An opaque pointer type that is used to identity face objects. The * contents of such objects is application-dependent. * * These pointers are typically used to point to a user-defined * structure containing a font file path, and face index. * * @note: * Never use NULL as a valid @FTC_FaceID. * * Face IDs are passed by the client to the cache manager, which calls, * when needed, the @FTC_Face_Requester to translate them into new * @FT_Face objects. * * If the content of a given face ID changes at runtime, or if the value * becomes invalid (e.g., when uninstalling a font), you should * immediately call @FTC_Manager_RemoveFaceID before any other cache * function. * * Failure to do so will result in incorrect behaviour or even * memory leaks and crashes. */ typedef FT_Pointer FTC_FaceID; /************************************************************************ * * @functype: * FTC_Face_Requester * * @description: * A callback function provided by client applications. It is used by * the cache manager to translate a given @FTC_FaceID into a new valid * @FT_Face object, on demand. * * <Input> * face_id :: * The face ID to resolve. * * library :: * A handle to a FreeType library object. * * req_data :: * Application-provided request data (see note below). * * <Output> * aface :: * A new @FT_Face handle. * * <Return> * FreeType error code. 0~means success. * * <Note> * The third parameter `req_data' is the same as the one passed by the * client when @FTC_Manager_New is called. * * The face requester should not perform funny things on the returned * face object, like creating a new @FT_Size for it, or setting a * transformation through @FT_Set_Transform! */ typedef FT_Error (*FTC_Face_Requester)( FTC_FaceID face_id, FT_Library library, FT_Pointer request_data, FT_Face* aface ); /* */ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS /* these macros are incompatible with LLP64, should not be used */ #define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) ) #define FTC_FACE_ID_HASH( i ) \ ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \ ( FT_POINTER_TO_ULONG( i ) << 7 ) ) ) #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /***** *****/ /***** CACHE MANAGER OBJECT *****/ /***** *****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* <Type> */ /* FTC_Manager */ /* */ /* <Description> */ /* This object corresponds to one instance of the cache-subsystem. */ /* It is used to cache one or more @FT_Face objects, along with */ /* corresponding @FT_Size objects. */ /* */ /* The manager intentionally limits the total number of opened */ /* @FT_Face and @FT_Size objects to control memory usage. See the */ /* `max_faces' and `max_sizes' parameters of @FTC_Manager_New. */ /* */ /* The manager is also used to cache `nodes' of various types while */ /* limiting their total memory usage. */ /* */ /* All limitations are enforced by keeping lists of managed objects */ /* in most-recently-used order, and flushing old nodes to make room */ /* for new ones. */ /* */ typedef struct FTC_ManagerRec_* FTC_Manager; /*************************************************************************/ /* */ /* <Type> */ /* FTC_Node */ /* */ /* <Description> */ /* An opaque handle to a cache node object. Each cache node is */ /* reference-counted. A node with a count of~0 might be flushed */ /* out of a full cache whenever a lookup request is performed. */ /* */ /* If you look up nodes, you have the ability to `acquire' them, */ /* i.e., to increment their reference count. This will prevent the */ /* node from being flushed out of the cache until you explicitly */ /* `release' it (see @FTC_Node_Unref). */ /* */ /* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */ /* */ typedef struct FTC_NodeRec_* FTC_Node; /*************************************************************************/ /* */ /* <Function> */ /* FTC_Manager_New */ /* */ /* <Description> */ /* Create a new cache manager. */ /* */ /* <Input> */ /* library :: The parent FreeType library handle to use. */ /* */ /* max_faces :: Maximum number of opened @FT_Face objects managed by */ /* this cache instance. Use~0 for defaults. */ /* */ /* max_sizes :: Maximum number of opened @FT_Size objects managed by */ /* this cache instance. Use~0 for defaults. */ /* */ /* max_bytes :: Maximum number of bytes to use for cached data nodes. */ /* Use~0 for defaults. Note that this value does not */ /* account for managed @FT_Face and @FT_Size objects. */ /* */ /* requester :: An application-provided callback used to translate */ /* face IDs into real @FT_Face objects. */ /* */ /* req_data :: A generic pointer that is passed to the requester */ /* each time it is called (see @FTC_Face_Requester). */ /* */ /* <Output> */ /* amanager :: A handle to a new manager object. 0~in case of */ /* failure. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FTC_Manager_New( FT_Library library, FT_UInt max_faces, FT_UInt max_sizes, FT_ULong max_bytes, FTC_Face_Requester requester, FT_Pointer req_data, FTC_Manager *amanager ); /*************************************************************************/ /* */ /* <Function> */ /* FTC_Manager_Reset */ /* */ /* <Description> */ /* Empty a given cache manager. This simply gets rid of all the */ /* currently cached @FT_Face and @FT_Size objects within the manager. */ /* */ /* <InOut> */ /* manager :: A handle to the manager. */ /* */ FT_EXPORT( void ) FTC_Manager_Reset( FTC_Manager manager ); /*************************************************************************/ /* */ /* <Function> */ /* FTC_Manager_Done */ /* */ /* <Description> */ /* Destroy a given manager after emptying it. */ /* */ /* <Input> */ /* manager :: A handle to the target cache manager object. */ /* */ FT_EXPORT( void ) FTC_Manager_Done( FTC_Manager manager ); /*************************************************************************/ /* */ /* <Function> */ /* FTC_Manager_LookupFace */ /* */ /* <Description> */ /* Retrieve the @FT_Face object that corresponds to a given face ID */ /* through a cache manager. */ /* */ /* <Input> */ /* manager :: A handle to the cache manager. */ /* */ /* face_id :: The ID of the face object. */ /* */ /* <Output> */ /* aface :: A handle to the face object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The returned @FT_Face object is always owned by the manager. You */ /* should never try to discard it yourself. */ /* */ /* The @FT_Face object doesn't necessarily have a current size object */ /* (i.e., face->size can be 0). If you need a specific `font size', */ /* use @FTC_Manager_LookupSize instead. */ /* */ /* Never change the face's transformation matrix (i.e., never call */ /* the @FT_Set_Transform function) on a returned face! If you need */ /* to transform glyphs, do it yourself after glyph loading. */ /* */ /* When you perform a lookup, out-of-memory errors are detected */ /* _within_ the lookup and force incremental flushes of the cache */ /* until enough memory is released for the lookup to succeed. */ /* */ /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ /* already been completely flushed, and still no memory was available */ /* for the operation. */ /* */ FT_EXPORT( FT_Error ) FTC_Manager_LookupFace( FTC_Manager manager, FTC_FaceID face_id, FT_Face *aface ); /*************************************************************************/ /* */ /* <Struct> */ /* FTC_ScalerRec */ /* */ /* <Description> */ /* A structure used to describe a given character size in either */ /* pixels or points to the cache manager. See */ /* @FTC_Manager_LookupSize. */ /* */ /* <Fields> */ /* face_id :: The source face ID. */ /* */ /* width :: The character width. */ /* */ /* height :: The character height. */ /* */ /* pixel :: A Boolean. If 1, the `width' and `height' fields are */ /* interpreted as integer pixel character sizes. */ /* Otherwise, they are expressed as 1/64th of points. */ /* */ /* x_res :: Only used when `pixel' is value~0 to indicate the */ /* horizontal resolution in dpi. */ /* */ /* y_res :: Only used when `pixel' is value~0 to indicate the */ /* vertical resolution in dpi. */ /* */ /* <Note> */ /* This type is mainly used to retrieve @FT_Size objects through the */ /* cache manager. */ /* */ typedef struct FTC_ScalerRec_ { FTC_FaceID face_id; FT_UInt width; FT_UInt height; FT_Int pixel; FT_UInt x_res; FT_UInt y_res; } FTC_ScalerRec; /*************************************************************************/ /* */ /* <Struct> */ /* FTC_Scaler */ /* */ /* <Description> */ /* A handle to an @FTC_ScalerRec structure. */ /* */ typedef struct FTC_ScalerRec_* FTC_Scaler; /*************************************************************************/ /* */ /* <Function> */ /* FTC_Manager_LookupSize */ /* */ /* <Description> */ /* Retrieve the @FT_Size object that corresponds to a given */ /* @FTC_ScalerRec pointer through a cache manager. */ /* */ /* <Input> */ /* manager :: A handle to the cache manager. */ /* */ /* scaler :: A scaler handle. */ /* */ /* <Output> */ /* asize :: A handle to the size object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The returned @FT_Size object is always owned by the manager. You */ /* should never try to discard it by yourself. */ /* */ /* You can access the parent @FT_Face object simply as `size->face' */ /* if you need it. Note that this object is also owned by the */ /* manager. */ /* */ /* <Note> */ /* When you perform a lookup, out-of-memory errors are detected */ /* _within_ the lookup and force incremental flushes of the cache */ /* until enough memory is released for the lookup to succeed. */ /* */ /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ /* already been completely flushed, and still no memory is available */ /* for the operation. */ /* */ FT_EXPORT( FT_Error ) FTC_Manager_LookupSize( FTC_Manager manager, FTC_Scaler scaler, FT_Size *asize ); /*************************************************************************/ /* */ /* <Function> */ /* FTC_Node_Unref */ /* */ /* <Description> */ /* Decrement a cache node's internal reference count. When the count */ /* reaches 0, it is not destroyed but becomes eligible for subsequent */ /* cache flushes. */ /* */ /* <Input> */ /* node :: The cache node handle. */ /* */ /* manager :: The cache manager handle. */ /* */ FT_EXPORT( void ) FTC_Node_Unref( FTC_Node node, FTC_Manager manager ); /************************************************************************* * * @function: * FTC_Manager_RemoveFaceID * * @description: * A special function used to indicate to the cache manager that * a given @FTC_FaceID is no longer valid, either because its * content changed, or because it was deallocated or uninstalled. * * @input: * manager :: * The cache manager handle. * * face_id :: * The @FTC_FaceID to be removed. * * @note: * This function flushes all nodes from the cache corresponding to this * `face_id', with the exception of nodes with a non-null reference * count. * * Such nodes are however modified internally so as to never appear * in later lookups with the same `face_id' value, and to be immediately * destroyed when released by all their users. * */ FT_EXPORT( void ) FTC_Manager_RemoveFaceID( FTC_Manager manager, FTC_FaceID face_id ); /*************************************************************************/ /* */ /* <Section> */ /* cache_subsystem */ /* */ /*************************************************************************/ /************************************************************************* * * @type: * FTC_CMapCache * * @description: * An opaque handle used to model a charmap cache. This cache is to * hold character codes -> glyph indices mappings. * */ typedef struct FTC_CMapCacheRec_* FTC_CMapCache; /************************************************************************* * * @function: * FTC_CMapCache_New * * @description: * Create a new charmap cache. * * @input: * manager :: * A handle to the cache manager. * * @output: * acache :: * A new cache handle. NULL in case of error. * * @return: * FreeType error code. 0~means success. * * @note: * Like all other caches, this one will be destroyed with the cache * manager. * */ FT_EXPORT( FT_Error ) FTC_CMapCache_New( FTC_Manager manager, FTC_CMapCache *acache ); /************************************************************************ * * @function: * FTC_CMapCache_Lookup * * @description: * Translate a character code into a glyph index, using the charmap * cache. * * @input: * cache :: * A charmap cache handle. * * face_id :: * The source face ID. * * cmap_index :: * The index of the charmap in the source face. Any negative value * means to use the cache @FT_Face's default charmap. * * char_code :: * The character code (in the corresponding charmap). * * @return: * Glyph index. 0~means `no glyph'. * */ FT_EXPORT( FT_UInt ) FTC_CMapCache_Lookup( FTC_CMapCache cache, FTC_FaceID face_id, FT_Int cmap_index, FT_UInt32 char_code ); /*************************************************************************/ /* */ /* <Section> */ /* cache_subsystem */ /* */ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /***** *****/ /***** IMAGE CACHE OBJECT *****/ /***** *****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /************************************************************************* * * @struct: * FTC_ImageTypeRec * * @description: * A structure used to model the type of images in a glyph cache. * * @fields: * face_id :: * The face ID. * * width :: * The width in pixels. * * height :: * The height in pixels. * * flags :: * The load flags, as in @FT_Load_Glyph. * */ typedef struct FTC_ImageTypeRec_ { FTC_FaceID face_id; FT_Int width; FT_Int height; FT_Int32 flags; } FTC_ImageTypeRec; /************************************************************************* * * @type: * FTC_ImageType * * @description: * A handle to an @FTC_ImageTypeRec structure. * */ typedef struct FTC_ImageTypeRec_* FTC_ImageType; /* */ #define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \ ( (d1)->face_id == (d2)->face_id && \ (d1)->width == (d2)->width && \ (d1)->flags == (d2)->flags ) #ifdef FT_CONFIG_OPTION_OLD_INTERNALS /* this macro is incompatible with LLP64, should not be used */ #define FTC_IMAGE_TYPE_HASH( d ) \ (FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \ ( (d)->width << 8 ) ^ (d)->height ^ \ ( (d)->flags << 4 ) ) #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ /*************************************************************************/ /* */ /* <Type> */ /* FTC_ImageCache */ /* */ /* <Description> */ /* A handle to an glyph image cache object. They are designed to */ /* hold many distinct glyph images while not exceeding a certain */ /* memory threshold. */ /* */ typedef struct FTC_ImageCacheRec_* FTC_ImageCache; /*************************************************************************/ /* */ /* <Function> */ /* FTC_ImageCache_New */ /* */ /* <Description> */ /* Create a new glyph image cache. */ /* */ /* <Input> */ /* manager :: The parent manager for the image cache. */ /* */ /* <Output> */ /* acache :: A handle to the new glyph image cache object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FTC_ImageCache_New( FTC_Manager manager, FTC_ImageCache *acache ); /*************************************************************************/ /* */ /* <Function> */ /* FTC_ImageCache_Lookup */ /* */ /* <Description> */ /* Retrieve a given glyph image from a glyph image cache. */ /* */ /* <Input> */ /* cache :: A handle to the source glyph image cache. */ /* */ /* type :: A pointer to a glyph image type descriptor. */ /* */ /* gindex :: The glyph index to retrieve. */ /* */ /* <Output> */ /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ /* failure. */ /* */ /* anode :: Used to return the address of of the corresponding cache */ /* node after incrementing its reference count (see note */ /* below). */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The returned glyph is owned and managed by the glyph image cache. */ /* Never try to transform or discard it manually! You can however */ /* create a copy with @FT_Glyph_Copy and modify the new one. */ /* */ /* If `anode' is _not_ NULL, it receives the address of the cache */ /* node containing the glyph image, after increasing its reference */ /* count. This ensures that the node (as well as the @FT_Glyph) will */ /* always be kept in the cache until you call @FTC_Node_Unref to */ /* `release' it. */ /* */ /* If `anode' is NULL, the cache node is left unchanged, which means */ /* that the @FT_Glyph could be flushed out of the cache on the next */ /* call to one of the caching sub-system APIs. Don't assume that it */ /* is persistent! */ /* */ FT_EXPORT( FT_Error ) FTC_ImageCache_Lookup( FTC_ImageCache cache, FTC_ImageType type, FT_UInt gindex, FT_Glyph *aglyph, FTC_Node *anode ); /*************************************************************************/ /* */ /* <Function> */ /* FTC_ImageCache_LookupScaler */ /* */ /* <Description> */ /* A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec */ /* to specify the face ID and its size. */ /* */ /* <Input> */ /* cache :: A handle to the source glyph image cache. */ /* */ /* scaler :: A pointer to a scaler descriptor. */ /* */ /* load_flags :: The corresponding load flags. */ /* */ /* gindex :: The glyph index to retrieve. */ /* */ /* <Output> */ /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ /* failure. */ /* */ /* anode :: Used to return the address of of the corresponding */ /* cache node after incrementing its reference count */ /* (see note below). */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The returned glyph is owned and managed by the glyph image cache. */ /* Never try to transform or discard it manually! You can however */ /* create a copy with @FT_Glyph_Copy and modify the new one. */ /* */ /* If `anode' is _not_ NULL, it receives the address of the cache */ /* node containing the glyph image, after increasing its reference */ /* count. This ensures that the node (as well as the @FT_Glyph) will */ /* always be kept in the cache until you call @FTC_Node_Unref to */ /* `release' it. */ /* */ /* If `anode' is NULL, the cache node is left unchanged, which means */ /* that the @FT_Glyph could be flushed out of the cache on the next */ /* call to one of the caching sub-system APIs. Don't assume that it */ /* is persistent! */ /* */ /* Calls to @FT_Set_Char_Size and friends have no effect on cached */ /* glyphs; you should always use the FreeType cache API instead. */ /* */ FT_EXPORT( FT_Error ) FTC_ImageCache_LookupScaler( FTC_ImageCache cache, FTC_Scaler scaler, FT_ULong load_flags, FT_UInt gindex, FT_Glyph *aglyph, FTC_Node *anode ); /*************************************************************************/ /* */ /* <Type> */ /* FTC_SBit */ /* */ /* <Description> */ /* A handle to a small bitmap descriptor. See the @FTC_SBitRec */ /* structure for details. */ /* */ typedef struct FTC_SBitRec_* FTC_SBit; /*************************************************************************/ /* */ /* <Struct> */ /* FTC_SBitRec */ /* */ /* <Description> */ /* A very compact structure used to describe a small glyph bitmap. */ /* */ /* <Fields> */ /* width :: The bitmap width in pixels. */ /* */ /* height :: The bitmap height in pixels. */ /* */ /* left :: The horizontal distance from the pen position to the */ /* left bitmap border (a.k.a. `left side bearing', or */ /* `lsb'). */ /* */ /* top :: The vertical distance from the pen position (on the */ /* baseline) to the upper bitmap border (a.k.a. `top */ /* side bearing'). The distance is positive for upwards */ /* y~coordinates. */ /* */ /* format :: The format of the glyph bitmap (monochrome or gray). */ /* */ /* max_grays :: Maximum gray level value (in the range 1 to~255). */ /* */ /* pitch :: The number of bytes per bitmap line. May be positive */ /* or negative. */ /* */ /* xadvance :: The horizontal advance width in pixels. */ /* */ /* yadvance :: The vertical advance height in pixels. */ /* */ /* buffer :: A pointer to the bitmap pixels. */ /* */ typedef struct FTC_SBitRec_ { FT_Byte width; FT_Byte height; FT_Char left; FT_Char top; FT_Byte format; FT_Byte max_grays; FT_Short pitch; FT_Char xadvance; FT_Char yadvance; FT_Byte* buffer; } FTC_SBitRec; /*************************************************************************/ /* */ /* <Type> */ /* FTC_SBitCache */ /* */ /* <Description> */ /* A handle to a small bitmap cache. These are special cache objects */ /* used to store small glyph bitmaps (and anti-aliased pixmaps) in a */ /* much more efficient way than the traditional glyph image cache */ /* implemented by @FTC_ImageCache. */ /* */ typedef struct FTC_SBitCacheRec_* FTC_SBitCache; /*************************************************************************/ /* */ /* <Function> */ /* FTC_SBitCache_New */ /* */ /* <Description> */ /* Create a new cache to store small glyph bitmaps. */ /* */ /* <Input> */ /* manager :: A handle to the source cache manager. */ /* */ /* <Output> */ /* acache :: A handle to the new sbit cache. NULL in case of error. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FTC_SBitCache_New( FTC_Manager manager, FTC_SBitCache *acache ); /*************************************************************************/ /* */ /* <Function> */ /* FTC_SBitCache_Lookup */ /* */ /* <Description> */ /* Look up a given small glyph bitmap in a given sbit cache and */ /* `lock' it to prevent its flushing from the cache until needed. */ /* */ /* <Input> */ /* cache :: A handle to the source sbit cache. */ /* */ /* type :: A pointer to the glyph image type descriptor. */ /* */ /* gindex :: The glyph index. */ /* */ /* <Output> */ /* sbit :: A handle to a small bitmap descriptor. */ /* */ /* anode :: Used to return the address of of the corresponding cache */ /* node after incrementing its reference count (see note */ /* below). */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The small bitmap descriptor and its bit buffer are owned by the */ /* cache and should never be freed by the application. They might */ /* as well disappear from memory on the next cache lookup, so don't */ /* treat them as persistent data. */ /* */ /* The descriptor's `buffer' field is set to~0 to indicate a missing */ /* glyph bitmap. */ /* */ /* If `anode' is _not_ NULL, it receives the address of the cache */ /* node containing the bitmap, after increasing its reference count. */ /* This ensures that the node (as well as the image) will always be */ /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ /* */ /* If `anode' is NULL, the cache node is left unchanged, which means */ /* that the bitmap could be flushed out of the cache on the next */ /* call to one of the caching sub-system APIs. Don't assume that it */ /* is persistent! */ /* */ FT_EXPORT( FT_Error ) FTC_SBitCache_Lookup( FTC_SBitCache cache, FTC_ImageType type, FT_UInt gindex, FTC_SBit *sbit, FTC_Node *anode ); /*************************************************************************/ /* */ /* <Function> */ /* FTC_SBitCache_LookupScaler */ /* */ /* <Description> */ /* A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec */ /* to specify the face ID and its size. */ /* */ /* <Input> */ /* cache :: A handle to the source sbit cache. */ /* */ /* scaler :: A pointer to the scaler descriptor. */ /* */ /* load_flags :: The corresponding load flags. */ /* */ /* gindex :: The glyph index. */ /* */ /* <Output> */ /* sbit :: A handle to a small bitmap descriptor. */ /* */ /* anode :: Used to return the address of of the corresponding */ /* cache node after incrementing its reference count */ /* (see note below). */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The small bitmap descriptor and its bit buffer are owned by the */ /* cache and should never be freed by the application. They might */ /* as well disappear from memory on the next cache lookup, so don't */ /* treat them as persistent data. */ /* */ /* The descriptor's `buffer' field is set to~0 to indicate a missing */ /* glyph bitmap. */ /* */ /* If `anode' is _not_ NULL, it receives the address of the cache */ /* node containing the bitmap, after increasing its reference count. */ /* This ensures that the node (as well as the image) will always be */ /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ /* */ /* If `anode' is NULL, the cache node is left unchanged, which means */ /* that the bitmap could be flushed out of the cache on the next */ /* call to one of the caching sub-system APIs. Don't assume that it */ /* is persistent! */ /* */ FT_EXPORT( FT_Error ) FTC_SBitCache_LookupScaler( FTC_SBitCache cache, FTC_Scaler scaler, FT_ULong load_flags, FT_UInt gindex, FTC_SBit *sbit, FTC_Node *anode ); /* */ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS /*@***********************************************************************/ /* */ /* <Struct> */ /* FTC_FontRec */ /* */ /* <Description> */ /* A simple structure used to describe a given `font' to the cache */ /* manager. Note that a `font' is the combination of a given face */ /* with a given character size. */ /* */ /* <Fields> */ /* face_id :: The ID of the face to use. */ /* */ /* pix_width :: The character width in integer pixels. */ /* */ /* pix_height :: The character height in integer pixels. */ /* */ typedef struct FTC_FontRec_ { FTC_FaceID face_id; FT_UShort pix_width; FT_UShort pix_height; } FTC_FontRec; /* */ #define FTC_FONT_COMPARE( f1, f2 ) \ ( (f1)->face_id == (f2)->face_id && \ (f1)->pix_width == (f2)->pix_width && \ (f1)->pix_height == (f2)->pix_height ) /* this macro is incompatible with LLP64, should not be used */ #define FTC_FONT_HASH( f ) \ (FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \ ((f)->pix_width << 8) ^ \ ((f)->pix_height) ) typedef FTC_FontRec* FTC_Font; FT_EXPORT( FT_Error ) FTC_Manager_Lookup_Face( FTC_Manager manager, FTC_FaceID face_id, FT_Face *aface ); FT_EXPORT( FT_Error ) FTC_Manager_Lookup_Size( FTC_Manager manager, FTC_Font font, FT_Face *aface, FT_Size *asize ); #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ /* */ FT_END_HEADER #endif /* __FTCACHE_H__ */ /* END */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftlcdfil.h */ /* */ /* FreeType API for color filtering of subpixel bitmap glyphs */ /* (specification). */ /* */ /* Copyright 2006, 2007, 2008, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FT_LCD_FILTER_H__ #define __FT_LCD_FILTER_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************** * * @section: * lcd_filtering * * @title: * LCD Filtering * * @abstract: * Reduce color fringes of LCD-optimized bitmaps. * * @description: * The @FT_Library_SetLcdFilter API can be used to specify a low-pass * filter which is then applied to LCD-optimized bitmaps generated * through @FT_Render_Glyph. This is useful to reduce color fringes * which would occur with unfiltered rendering. * * Note that no filter is active by default, and that this function is * *not* implemented in default builds of the library. You need to * #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file * in order to activate it. */ /**************************************************************************** * * @enum: * FT_LcdFilter * * @description: * A list of values to identify various types of LCD filters. * * @values: * FT_LCD_FILTER_NONE :: * Do not perform filtering. When used with subpixel rendering, this * results in sometimes severe color fringes. * * FT_LCD_FILTER_DEFAULT :: * The default filter reduces color fringes considerably, at the cost * of a slight blurriness in the output. * * FT_LCD_FILTER_LIGHT :: * The light filter is a variant that produces less blurriness at the * cost of slightly more color fringes than the default one. It might * be better, depending on taste, your monitor, or your personal vision. * * FT_LCD_FILTER_LEGACY :: * This filter corresponds to the original libXft color filter. It * provides high contrast output but can exhibit really bad color * fringes if glyphs are not extremely well hinted to the pixel grid. * In other words, it only works well if the TrueType bytecode * interpreter is enabled *and* high-quality hinted fonts are used. * * This filter is only provided for comparison purposes, and might be * disabled or stay unsupported in the future. * * @since: * 2.3.0 */ typedef enum FT_LcdFilter_ { FT_LCD_FILTER_NONE = 0, FT_LCD_FILTER_DEFAULT = 1, FT_LCD_FILTER_LIGHT = 2, FT_LCD_FILTER_LEGACY = 16, FT_LCD_FILTER_MAX /* do not remove */ } FT_LcdFilter; /*****************************************/***************************************************************************/ /* */ /* ftglyph.h */ /* */ /* FreeType convenience functions to handle glyphs (specification). */ /* */ /* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /* */ /* This file contains the definition of several convenience functions */ /* that can be used by client applications to easily retrieve glyph */ /* bitmaps and outlines from a given face. */ /* */ /* These functions should be optional if you are writing a font server */ /* or text layout engine on top of FreeType. However, they are pretty */ /* handy for many other simple uses of the library. */ /* */ /*************************************************************************/ #ifndef __FTGLYPH_H__ #define __FTGLYPH_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* glyph_management */ /* */ /* <Title> */ /* Glyph Management */ /* */ /* <Abstract> */ /* Generic interface to manage individual glyph data. */ /* */ /* <Description> */ /* This section contains definitions used to manage glyph data */ /* through generic FT_Glyph objects. Each of them can contain a */ /* bitmap, a vector outline, or even images in other formats. */ /* */ /*************************************************************************/ /* forward declaration to a private type */ typedef struct FT_Glyph_Class_ FT_Glyph_Class; /*************************************************************************/ /* */ /* <Type> */ /* FT_Glyph */ /* */ /* <Description> */ /* Handle to an object used to model generic glyph images. It is a */ /* pointer to the @FT_GlyphRec structure and can contain a glyph */ /* bitmap or pointer. */ /* */ /* <Note> */ /* Glyph objects are not owned by the library. You must thus release */ /* them manually (through @FT_Done_Glyph) _before_ calling */ /* @FT_Done_FreeType. */ /* */ typedef struct FT_GlyphRec_* FT_Glyph; /*************************************************************************/ /* */ /* <Struct> */ /* FT_GlyphRec */ /* */ /* <Description> */ /* The root glyph structure contains a given glyph image plus its */ /* advance width in 16.16 fixed float format. */ /* */ /* <Fields> */ /* library :: A handle to the FreeType library object. */ /* */ /* clazz :: A pointer to the glyph's class. Private. */ /* */ /* format :: The format of the glyph's image. */ /* */ /* advance :: A 16.16 vector that gives the glyph's advance width. */ /* */ typedef struct FT_GlyphRec_ { FT_Library library; const FT_Glyph_Class* clazz; FT_Glyph_Format format; FT_Vector advance; } FT_GlyphRec; /*************************************************************************/ /* */ /* <Type> */ /* FT_BitmapGlyph */ /* */ /* <Description> */ /* A handle to an object used to model a bitmap glyph image. This is */ /* a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec. */ /* */ typedef struct FT_BitmapGlyphRec_* FT_BitmapGlyph; /*************************************************************************/ /* */ /* <Struct> */ /* FT_BitmapGlyphRec */ /* */ /* <Description> */ /* A structure used for bitmap glyph images. This really is a */ /* `sub-class' of @FT_GlyphRec. */ /* */ /* <Fields> */ /* root :: The root @FT_Glyph fields. */ /* */ /* left :: The left-side bearing, i.e., the horizontal distance */ /* from the current pen position to the left border of the */ /* glyph bitmap. */ /* */ /* top :: The top-side bearing, i.e., the vertical distance from */ /* the current pen position to the top border of the glyph */ /* bitmap. This distance is positive for upwards~y! */ /* */ /* bitmap :: A descriptor for the bitmap. */ /* */ /* <Note> */ /* You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have */ /* `glyph->format == FT_GLYPH_FORMAT_BITMAP'. This lets you access */ /* the bitmap's contents easily. */ /* */ /* The corresponding pixel buffer is always owned by @FT_BitmapGlyph */ /* and is thus created and destroyed with it. */ /* */ typedef struct FT_BitmapGlyphRec_ { FT_GlyphRec root; FT_Int left; FT_Int top; FT_Bitmap bitmap; } FT_BitmapGlyphRec; /*************************************************************************/ /* */ /* <Type> */ /* FT_OutlineGlyph */ /* */ /* <Description> */ /* A handle to an object used to model an outline glyph image. This */ /* is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. */ /* */ typedef struct FT_OutlineGlyphRec_* FT_OutlineGlyph; /*************************************************************************/ /* */ /* <Struct> */ /* FT_OutlineGlyphRec */ /* */ /* <Description> */ /* A structure used for outline (vectorial) glyph images. This */ /* really is a `sub-class' of @FT_GlyphRec. */ /* */ /* <Fields> */ /* root :: The root @FT_Glyph fields. */ /* */ /* outline :: A descriptor for the outline. */ /* */ /* <Note> */ /* You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have */ /* `glyph->format == FT_GLYPH_FORMAT_OUTLINE'. This lets you access */ /* the outline's content easily. */ /* */ /* As the outline is extracted from a glyph slot, its coordinates are */ /* expressed normally in 26.6 pixels, unless the flag */ /* @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */ /* */ /* The outline's tables are always owned by the object and are */ /* destroyed with it. */ /* */ typedef struct FT_OutlineGlyphRec_ { FT_GlyphRec root; FT_Outline outline; } FT_OutlineGlyphRec; /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Glyph */ /* */ /* <Description> */ /* A function used to extract a glyph image from a slot. Note that */ /* the created @FT_Glyph object must be released with @FT_Done_Glyph. */ /* */ /* <Input> */ /* slot :: A handle to the source glyph slot. */ /* */ /* <Output> */ /* aglyph :: A handle to the glyph object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Get_Glyph( FT_GlyphSlot slot, FT_Glyph *aglyph ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Glyph_Copy */ /* */ /* <Description> */ /* A function used to copy a glyph image. Note that the created */ /* @FT_Glyph object must be released with @FT_Done_Glyph. */ /* */ /* <Input> */ /* source :: A handle to the source glyph object. */ /* */ /* <Output> */ /* target :: A handle to the target glyph object. 0~in case of */ /* error. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Glyph_Copy( FT_Glyph source, FT_Glyph *target ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Glyph_Transform */ /* */ /* <Description> */ /* Transform a glyph image if its format is scalable. */ /* */ /* <InOut> */ /* glyph :: A handle to the target glyph object. */ /* */ /* <Input> */ /* matrix :: A pointer to a 2x2 matrix to apply. */ /* */ /* delta :: A pointer to a 2d vector to apply. Coordinates are */ /* expressed in 1/64th of a pixel. */ /* */ /* <Return> */ /* FreeType error code (if not 0, the glyph format is not scalable). */ /* */ /* <Note> */ /* The 2x2 transformation matrix is also applied to the glyph's */ /* advance vector. */ /* */ FT_EXPORT( FT_Error ) FT_Glyph_Transform( FT_Glyph glyph, FT_Matrix* matrix, FT_Vector* delta ); /*************************************************************************/ /* */ /* <Enum> */ /* FT_Glyph_BBox_Mode */ /* */ /* <Description> */ /* The mode how the values of @FT_Glyph_Get_CBox are returned. */ /* */ /* <Values> */ /* FT_GLYPH_BBOX_UNSCALED :: */ /* Return unscaled font units. */ /* */ /* FT_GLYPH_BBOX_SUBPIXELS :: */ /* Return unfitted 26.6 coordinates. */ /* */ /* FT_GLYPH_BBOX_GRIDFIT :: */ /* Return grid-fitted 26.6 coordinates. */ /* */ /* FT_GLYPH_BBOX_TRUNCATE :: */ /* Return coordinates in integer pixels. */ /* */ /* FT_GLYPH_BBOX_PIXELS :: */ /* Return grid-fitted pixel coordinates. */ /* */ typedef enum FT_Glyph_BBox_Mode_ { FT_GLYPH_BBOX_UNSCALED = 0, FT_GLYPH_BBOX_SUBPIXELS = 0, FT_GLYPH_BBOX_GRIDFIT = 1, FT_GLYPH_BBOX_TRUNCATE = 2, FT_GLYPH_BBOX_PIXELS = 3 } FT_Glyph_BBox_Mode; /*************************************************************************/ /* */ /* <Enum> */ /* ft_glyph_bbox_xxx */ /* */ /* <Description> */ /* These constants are deprecated. Use the corresponding */ /* @FT_Glyph_BBox_Mode values instead. */ /* */ /* <Values> */ /* ft_glyph_bbox_unscaled :: See @FT_GLYPH_BBOX_UNSCALED. */ /* ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS. */ /* ft_glyph_bbox_gridfit :: See @FT_GLYPH_BBOX_GRIDFIT. */ /* ft_glyph_bbox_truncate :: See @FT_GLYPH_BBOX_TRUNCATE. */ /* ft_glyph_bbox_pixels :: See @FT_GLYPH_BBOX_PIXELS. */ /* */ #define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED #define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS #define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT #define ft_glyph_bbox_truncate FT_GLYPH_BBOX_TRUNCATE #define ft_glyph_bbox_pixels FT_GLYPH_BBOX_PIXELS /*************************************************************************/ /* */ /* <Function> */ /* FT_Glyph_Get_CBox */ /* */ /* <Description> */ /* Return a glyph's `control box'. The control box encloses all the */ /* outline's points, including Bézier control points. Though it */ /* coincides with the exact bounding box for most glyphs, it can be */ /* slightly larger in some situations (like when rotating an outline */ /* which contains Bézier outside arcs). */ /* */ /* Computing the control box is very fast, while getting the bounding */ /* box can take much more time as it needs to walk over all segments */ /* and arcs in the outline. To get the latter, you can use the */ /* `ftbbox' component which is dedicated to this single task. */ /* */ /* <Input> */ /* glyph :: A handle to the source glyph object. */ /* */ /* mode :: The mode which indicates how to interpret the returned */ /* bounding box values. */ /* */ /* <Output> */ /* acbox :: The glyph coordinate bounding box. Coordinates are */ /* expressed in 1/64th of pixels if it is grid-fitted. */ /* */ /* <Note> */ /* Coordinates are relative to the glyph origin, using the y~upwards */ /* convention. */ /* */ /* If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode' */ /* must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font */ /* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */ /* is another name for this constant. */ /* */ /* Note that the maximum coordinates are exclusive, which means that */ /* one can compute the width and height of the glyph image (be it in */ /* integer or 26.6 pixels) as: */ /* */ /* { */ /* width = bbox.xMax - bbox.xMin; */ /* height = bbox.yMax - bbox.yMin; */ /* } */ /* */ /* Note also that for 26.6 coordinates, if `bbox_mode' is set to */ /* @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted, */ /* which corresponds to: */ /* */ /* { */ /* bbox.xMin = FLOOR(bbox.xMin); */ /* bbox.yMin = FLOOR(bbox.yMin); */ /* bbox.xMax = CEILING(bbox.xMax); */ /* bbox.yMax = CEILING(bbox.yMax); */ /* } */ /* */ /* To get the bbox in pixel coordinates, set `bbox_mode' to */ /* @FT_GLYPH_BBOX_TRUNCATE. */ /* */ /* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */ /* to @FT_GLYPH_BBOX_PIXELS. */ /* */ FT_EXPORT( void ) FT_Glyph_Get_CBox( FT_Glyph glyph, FT_UInt bbox_mode, FT_BBox *acbox ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Glyph_To_Bitmap */ /* */ /* <Description> */ /* Convert a given glyph object to a bitmap glyph object. */ /* */ /* <InOut> */ /* the_glyph :: A pointer to a handle to the target glyph. */ /* */ /* <Input> */ /* render_mode :: An enumeration that describes how the data is */ /* rendered. */ /* */ /* origin :: A pointer to a vector used to translate the glyph */ /* image before rendering. Can be~0 (if no */ /* translation). The origin is expressed in */ /* 26.6 pixels. */ /* */ /* destroy :: A boolean that indicates that the original glyph */ /* image should be destroyed by this function. It is */ /* never destroyed in case of error. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* This function does nothing if the glyph format isn't scalable. */ /* */ /* The glyph image is translated with the `origin' vector before */ /* rendering. */ /* */ /* The first parameter is a pointer to an @FT_Glyph handle, that will */ /* be _replaced_ by this function (with newly allocated data). */ /* Typically, you would use (omitting error handling): */ /* */ /* */ /* { */ /* FT_Glyph glyph; */ /* FT_BitmapGlyph glyph_bitmap; */ /* */ /* */ /* // load glyph */ /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); */ /* */ /* // extract glyph image */ /* error = FT_Get_Glyph( face->glyph, &glyph ); */ /* */ /* // convert to a bitmap (default render mode + destroying old) */ /* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */ /* { */ /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, */ /* 0, 1 ); */ /* if ( error ) // `glyph' unchanged */ /* ... */ /* } */ /* */ /* // access bitmap content by typecasting */ /* glyph_bitmap = (FT_BitmapGlyph)glyph; */ /* */ /* // do funny stuff with it, like blitting/drawing */ /* ... */ /* */ /* // discard glyph image (bitmap or not) */ /* FT_Done_Glyph( glyph ); */ /* } */ /* */ /* */ /* Here another example, again without error handling: */ /* */ /* */ /* { */ /* FT_Glyph glyphs[MAX_GLYPHS] */ /* */ /* */ /* ... */ /* */ /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ /* error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || */ /* FT_Get_Glyph ( face->glyph, &glyph[idx] ); */ /* */ /* ... */ /* */ /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ /* { */ /* FT_Glyph bitmap = glyphs[idx]; */ /* */ /* */ /* ... */ /* */ /* // after this call, `bitmap' no longer points into */ /* // the `glyphs' array (and the old value isn't destroyed) */ /* FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 ); */ /* */ /* ... */ /* */ /* FT_Done_Glyph( bitmap ); */ /* } */ /* */ /* ... */ /* */ /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ /* FT_Done_Glyph( glyphs[idx] ); */ /* } */ /* */ FT_EXPORT( FT_Error ) FT_Glyph_To_Bitmap( FT_Glyph* the_glyph, FT_Render_Mode render_mode, FT_Vector* origin, FT_Bool destroy ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Done_Glyph */ /* */ /* <Description> */ /* Destroy a given glyph. */ /* */ /* <Input> */ /* glyph :: A handle to the target glyph object. */ /* */ FT_EXPORT( void ) FT_Done_Glyph( FT_Glyph glyph ); /* */ /* other helpful functions */ /*************************************************************************/ /* */ /* <Section> */ /* computations */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Function> */ /* FT_Matrix_Multiply */ /* */ /* <Description> */ /* Perform the matrix operation `b = a*b'. */ /* */ /* <Input> */ /* a :: A pointer to matrix `a'. */ /* */ /* <InOut> */ /* b :: A pointer to matrix `b'. */ /* */ /* <Note> */ /* The result is undefined if either `a' or `b' is zero. */ /* */ FT_EXPORT( void ) FT_Matrix_Multiply( const FT_Matrix* a, FT_Matrix* b ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Matrix_Invert */ /* */ /* <Description> */ /* Invert a 2x2 matrix. Return an error if it can't be inverted. */ /* */ /* <InOut> */ /* matrix :: A pointer to the target matrix. Remains untouched in */ /* case of error. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Matrix_Invert( FT_Matrix* matrix ); /* */ FT_END_HEADER #endif /* __FTGLYPH_H__ */ /* END */ /* Local Variables: */ /* coding: utf-8 */ /* End: */ ������������������������������������������������������������������������������������������������������������������������������������������������������� @FT_Load_Glyph or @FT_Load_Char only use the one which has been */ /* activated last to determine the `current character pixel size'. */ /* */ /* This function can be used to `activate' a previously created size */ /* object. */ /* */ /* <Input> */ /* size :: A handle to a target size object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* If `face' is the size's parent face object, this function changes */ /* the value of `face->size' to the input size handle. */ /* */ FT_EXPORT( FT_Error ) FT_Activate_Size( FT_Size size ); /* */ FT_END_HEADER #endif /* __FTSIZES_H__ */ /* END */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������********************************* * * @func: * FT_Library_SetLcdFilter * * @description: * This function is used to apply color filtering to LCD decimated * bitmaps, like the ones used when calling @FT_Render_Glyph with * @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V. * * @input: * library :: * A handle to the target library instance. * * filter :: * The filter type. * * You can use @FT_LCD_FILTER_NONE here to disable this feature, or * @FT_LCD_FILTER_DEFAULT to use a default filter that should work * well on most LCD screens. * * @return: * FreeType error code. 0~means success. * * @note: * This feature is always disabled by default. Clients must make an * explicit call to this function with a `filter' value other than * @FT_LCD_FILTER_NONE in order to enable it. * * Due to *PATENTS* covering subpixel rendering, this function doesn't * do anything except returning `FT_Err_Unimplemented_Feature' if the * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not * defined in your build of the library, which should correspond to all * default builds of FreeType. * * The filter affects glyph bitmaps rendered through @FT_Render_Glyph, * @FT_Outline_Get_Bitmap, @FT_Load_Glyph, and @FT_Load_Char. * * It does _not_ affect the output of @FT_Outline_Render and * @FT_Outline_Get_Bitmap. * * If this feature is activated, the dimensions of LCD glyph bitmaps are * either larger or taller than the dimensions of the corresponding * outline with regards to the pixel grid. For example, for * @FT_RENDER_MODE_LCD, the filter adds up to 3~pixels to the left, and * up to 3~pixels to the right. * * The bitmap offset values are adjusted correctly, so clients shouldn't * need to modify their layout and glyph positioning code when enabling * the filter. * * @since: * 2.3.0 */ FT_EXPORT( FT_Error ) FT_Library_SetLcdFilter( FT_Library library, FT_LcdFilter filter ); /************************************************************************** * * @func: * FT_Library_SetLcdFilterWeights * * @description: * Use this function to override the filter weights selected by * @FT_Library_SetLcdFilter. By default, FreeType uses the quintuple * (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10, * 0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and * FT_LCD_FILTER_LEGACY. * * @input: * library :: * A handle to the target library instance. * * weights :: * A pointer to an array; the function copies the first five bytes and * uses them to specify the filter weights. * * @return: * FreeType error code. 0~means success. * * @note: * Due to *PATENTS* covering subpixel rendering, this function doesn't * do anything except returning `FT_Err_Unimplemented_Feature' if the * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not * defined in your build of the library, which should correspond to all * default builds of FreeType. * * This function must be called after @FT_Library_SetLcdFilter to have * any effect. * * @since: * 2.4.0 */ FT_EXPORT( FT_Error ) FT_Library_SetLcdFilterWeights( FT_Library library, unsigned char *weights ); /* */ FT_END_HEADER #endif /* __FT_LCD_FILTER_H__ */ /* END */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftincrem.h */ /* */ /* FreeType incremental loading (specification). */ /* */ /* Copyright 2002, 2003, 2006, 2007, 2008, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTINCREM_H__ #define __FTINCREM_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************** * * @section: * incremental * * @title: * Incremental Loading * * @abstract: * Custom Glyph Loading. * * @description: * This section contains various functions used to perform so-called * `incremental' glyph loading. This is a mode where all glyphs loaded * from a given @FT_Face are provided by the client application, * * Apart from that, all other tables are loaded normally from the font * file. This mode is useful when FreeType is used within another * engine, e.g., a PostScript Imaging Processor. * * To enable this mode, you must use @FT_Open_Face, passing an * @FT_Parameter with the @FT_PARAM_TAG_INCREMENTAL tag and an * @FT_Incremental_Interface value. See the comments for * @FT_Incremental_InterfaceRec for an example. * */ /*************************************************************************** * * @type: * FT_Incremental * * @description: * An opaque type describing a user-provided object used to implement * `incremental' glyph loading within FreeType. This is used to support * embedded fonts in certain environments (e.g., PostScript interpreters), * where the glyph data isn't in the font file, or must be overridden by * different values. * * @note: * It is up to client applications to create and implement @FT_Incremental * objects, as long as they provide implementations for the methods * @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc * and @FT_Incremental_GetGlyphMetricsFunc. * * See the description of @FT_Incremental_InterfaceRec to understand how * to use incremental objects with FreeType. * */ typedef struct FT_IncrementalRec_* FT_Incremental; /*************************************************************************** * * @struct: * FT_Incremental_MetricsRec * * @description: * A small structure used to contain the basic glyph metrics returned * by the @FT_Incremental_GetGlyphMetricsFunc method. * * @fields: * bearing_x :: * Left bearing, in font units. * * bearing_y :: * Top bearing, in font units. * * advance :: * Horizontal component of glyph advance, in font units. * * advance_v :: * Vertical component of glyph advance, in font units. * * @note: * These correspond to horizontal or vertical metrics depending on the * value of the `vertical' argument to the function * @FT_Incremental_GetGlyphMetricsFunc. * */ typedef struct FT_Incremental_MetricsRec_ { FT_Long bearing_x; FT_Long bearing_y; FT_Long advance; FT_Long advance_v; /* since 2.3.12 */ } FT_Incremental_MetricsRec; /*************************************************************************** * * @struct: * FT_Incremental_Metrics * * @description: * A handle to an @FT_Incremental_MetricsRec structure. * */ typedef struct FT_Incremental_MetricsRec_* FT_Incremental_Metrics; /*************************************************************************** * * @type: * FT_Incremental_GetGlyphDataFunc * * @description: * A function called by FreeType to access a given glyph's data bytes * during @FT_Load_Glyph or @FT_Load_Char if incremental loading is * enabled. * * Note that the format of the glyph's data bytes depends on the font * file format. For TrueType, it must correspond to the raw bytes within * the `glyf' table. For PostScript formats, it must correspond to the * *unencrypted* charstring bytes, without any `lenIV' header. It is * undefined for any other format. * * @input: * incremental :: * Handle to an opaque @FT_Incremental handle provided by the client * application. * * glyph_index :: * Index of relevant glyph. * * @output: * adata :: * A structure describing the returned glyph data bytes (which will be * accessed as a read-only byte block). * * @return: * FreeType error code. 0~means success. * * @note: * If this function returns successfully the method * @FT_Incremental_FreeGlyphDataFunc will be called later to release * the data bytes. * * Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for * compound glyphs. * */ typedef FT_Error (*FT_Incremental_GetGlyphDataFunc)( FT_Incremental incremental, FT_UInt glyph_index, FT_Data* adata ); /*************************************************************************** * * @type: * FT_Incremental_FreeGlyphDataFunc * * @description: * A function used to release the glyph data bytes returned by a * successful call to @FT_Incremental_GetGlyphDataFunc. * * @input: * incremental :: * A handle to an opaque @FT_Incremental handle provided by the client * application. * * data :: * A structure describing the glyph data bytes (which will be accessed * as a read-only byte block). * */ typedef void (*FT_Incremental_FreeGlyphDataFunc)( FT_Incremental incremental, FT_Data* data ); /*************************************************************************** * * @type: * FT_Incremental_GetGlyphMetricsFunc * * @description: * A function used to retrieve the basic metrics of a given glyph index * before accessing its data. This is necessary because, in certain * formats like TrueType, the metrics are stored in a different place from * the glyph images proper. * * @input: * incremental :: * A handle to an opaque @FT_Incremental handle provided by the client * application. * * glyph_index :: * Index of relevant glyph. * * vertical :: * If true, return vertical metrics. * * ametrics :: * This parameter is used for both input and output. * The original glyph metrics, if any, in font units. If metrics are * not available all the values must be set to zero. * * @output: * ametrics :: * The replacement glyph metrics in font units. * */ typedef FT_Error (*FT_Incremental_GetGlyphMetricsFunc) ( FT_Incremental incremental, FT_UInt glyph_index, FT_Bool vertical, FT_Incremental_MetricsRec *ametrics ); /************************************************************************** * * @struct: * FT_Incremental_FuncsRec * * @description: * A table of functions for accessing fonts that load data * incrementally. Used in @FT_Incremental_InterfaceRec. * * @fields: * get_glyph_data :: * The function to get glyph data. Must not be null. * * free_glyph_data :: * The function to release glyph data. Must not be null. * * get_glyph_metrics :: * The function to get glyph metrics. May be null if the font does * not provide overriding glyph metrics. * */ typedef struct FT_Incremental_FuncsRec_ { FT_Incremental_GetGlyphDataFunc get_glyph_data; FT_Incremental_FreeGlyphDataFunc free_glyph_data; FT_Incremental_GetGlyphMetricsFunc get_glyph_metrics; } FT_Incremental_FuncsRec; /*************************************************************************** * * @struct: * FT_Incremental_InterfaceRec * * @description: * A structure to be used with @FT_Open_Face to indicate that the user * wants to support incremental glyph loading. You should use it with * @FT_PARAM_TAG_INCREMENTAL as in the following example: * * { * FT_Incremental_InterfaceRec inc_int; * FT_Parameter parameter; * FT_Open_Args open_args; * * * // set up incremental descriptor * inc_int.funcs = my_funcs; * inc_int.object = my_object; * * // set up optional parameter * parameter.tag = FT_PARAM_TAG_INCREMENTAL; * parameter.data = &inc_int; * * // set up FT_Open_Args structure * open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; * open_args.pathname = my_font_pathname; * open_args.num_params = 1; * open_args.params = ¶meter; // we use one optional argument * * // open the font * error = FT_Open_Face( library, &open_args, index, &face ); * ... * } * */ typedef struct FT_Incremental_InterfaceRec_ { const FT_Incremental_FuncsRec* funcs; FT_Incremental object; } FT_Incremental_InterfaceRec; /*************************************************************************** * * @type: * FT_Incremental_Interface * * @description: * A pointer to an @FT_Incremental_InterfaceRec structure. * */ typedef FT_Incremental_InterfaceRec* FT_Incremental_Interface; /*************************************************************************** * * @constant: * FT_PARAM_TAG_INCREMENTAL * * @description: * A constant used as the tag of @FT_Parameter structures to indicate * an incremental loading object to be used by FreeType. * */ #define FT_PARAM_TAG_INCREMENTAL FT_MAKE_TAG( 'i', 'n', 'c', 'r' ) /* */ FT_END_HEADER #endif /* __FTINCREM_H__ */ /* END */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libpng Description: Loads and saves PNG files Version: 1.4.5 Libs: -L${libdir} -lpng -lz -lm Cflags: -I${includedir} �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftlist.h */ /* */ /* Generic list support for FreeType (specification). */ /* */ /* Copyright 1996-2001, 2003, 2007, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /* */ /* This file implements functions relative to list processing. Its */ /* data structures are defined in `freetype.h'. */ /* */ /*************************************************************************/ #ifndef __FTLIST_H__ #define __FTLIST_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* list_processing */ /* */ /* <Title> */ /* List Processing */ /* */ /* <Abstract> */ /* Simple management of lists. */ /* */ /* <Description> */ /* This section contains various definitions related to list */ /* processing using doubly-linked nodes. */ /* */ /* <Order> */ /* FT_List */ /* FT_ListNode */ /* FT_ListRec */ /* FT_ListNodeRec */ /* */ /* FT_List_Add */ /* FT_List_Insert */ /* FT_List_Find */ /* FT_List_Remove */ /* FT_List_Up */ /* FT_List_Iterate */ /* FT_List_Iterator */ /* FT_List_Finalize */ /* FT_List_Destructor */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Function> */ /* FT_List_Find */ /* */ /* <Description> */ /* Find the list node for a given listed object. */ /* */ /* <Input> */ /* list :: A pointer to the parent list. */ /* data :: The address of the listed object. */ /* */ /* <Return> */ /* List node. NULL if it wasn't found. */ /* */ FT_EXPORT( FT_ListNode ) FT_List_Find( FT_List list, void* data ); /*************************************************************************/ /* */ /* <Function> */ /* FT_List_Add */ /* */ /* <Description> */ /* Append an element to the end of a list. */ /* */ /* <InOut> */ /* list :: A pointer to the parent list. */ /* node :: The node to append. */ /* */ FT_EXPORT( void ) FT_List_Add( FT_List list, FT_ListNode node ); /*************************************************************************/ /* */ /* <Function> */ /* FT_List_Insert */ /* */ /* <Description> */ /* Insert an element at the head of a list. */ /* */ /* <InOut> */ /* list :: A pointer to parent list. */ /* node :: The node to insert. */ /* */ FT_EXPORT( void ) FT_List_Insert( FT_List list, FT_ListNode node ); /*************************************************************************/ /* */ /* <Function> */ /* FT_List_Remove */ /* */ /* <Description> */ /* Remove a node from a list. This function doesn't check whether */ /* the node is in the list! */ /* */ /* <Input> */ /* node :: The node to remove. */ /* */ /* <InOut> */ /* list :: A pointer to the parent list. */ /* */ FT_EXPORT( void ) FT_List_Remove( FT_List list, FT_ListNode node ); /*************************************************************************/ /* */ /* <Function> */ /* FT_List_Up */ /* */ /* <Description> */ /* Move a node to the head/top of a list. Used to maintain LRU */ /* lists. */ /* */ /* <InOut> */ /* list :: A pointer to the parent list. */ /* node :: The node to move. */ /* */ FT_EXPORT( void ) FT_List_Up( FT_List list, FT_ListNode node ); /*************************************************************************/ /* */ /* <FuncType> */ /* FT_List_Iterator */ /* */ /* <Description> */ /* An FT_List iterator function which is called during a list parse */ /* by @FT_List_Iterate. */ /* */ /* <Input> */ /* node :: The current iteration list node. */ /* */ /* user :: A typeless pointer passed to @FT_List_Iterate. */ /* Can be used to point to the iteration's state. */ /* */ typedef FT_Error (*FT_List_Iterator)( FT_ListNode node, void* user ); /*************************************************************************/ /* */ /* <Function> */ /* FT_List_Iterate */ /* */ /* <Description> */ /* Parse a list and calls a given iterator function on each element. */ /* Note that parsing is stopped as soon as one of the iterator calls */ /* returns a non-zero value. */ /* */ /* <Input> */ /* list :: A handle to the list. */ /* iterator :: An iterator function, called on each node of the list. */ /* user :: A user-supplied field which is passed as the second */ /* argument to the iterator. */ /* */ /* <Return> */ /* The result (a FreeType error code) of the last iterator call. */ /* */ FT_EXPORT( FT_Error ) FT_List_Iterate( FT_List list, FT_List_Iterator iterator, void* user ); /*************************************************************************/ /* */ /* <FuncType> */ /* FT_List_Destructor */ /* */ /* <Description> */ /* An @FT_List iterator function which is called during a list */ /* finalization by @FT_List_Finalize to destroy all elements in a */ /* given list. */ /* */ /* <Input> */ /* system :: The current system object. */ /* */ /* data :: The current object to destroy. */ /* */ /* user :: A typeless pointer passed to @FT_List_Iterate. It can */ /* be used to point to the iteration's state. */ /* */ typedef void (*FT_List_Destructor)( FT_Memory memory, void* data, void* user ); /*************************************************************************/ /* */ /* <Function> */ /* FT_List_Finalize */ /* */ /* <Description> */ /* Destroy all elements in the list as well as the list itself. */ /* */ /* <Input> */ /* list :: A handle to the list. */ /* */ /* destroy :: A list destructor that will be applied to each element */ /* of the list. */ /* */ /* memory :: The current memory object which handles deallocation. */ /* */ /* user :: A user-supplied field which is passed as the last */ /* argument to the destructor. */ /* */ /* <Note> */ /* This function expects that all nodes added by @FT_List_Add or */ /* @FT_List_Insert have been dynamically alloca/***************************************************************************/ /* */ /* ftlzw.h */ /* */ /* LZW-compressed stream support. */ /* */ /* Copyright 2004, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTLZW_H__ #define __FTLZW_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* lzw */ /* */ /* <Title> */ /* LZW Streams */ /* */ /* <Abstract> */ /* Using LZW-compressed font files. */ /* */ /* <Description> */ /* This section contains the declaration of LZW-specific functions. */ /* */ /*************************************************************************/ /************************************************************************ * * @function: * FT_Stream_OpenLZW * * @description: * Open a new stream to parse LZW-compressed font files. This is * mainly used to support the compressed `*.pcf.Z' fonts that come * with XFree86. * * @input: * stream :: The target embedding stream. * * source :: The source stream. * * @return: * FreeType error code. 0~means success. * * @note: * The source stream must be opened _before_ calling this function. * * Calling the internal function `FT_Stream_Close' on the new stream will * *not* call `FT_Stream_Close' on the source stream. None of the stream * objects will be released to the heap. * * The stream implementation is very basic and resets the decompression * process each time seeking backwards is needed within the stream * * In certain builds of the library, LZW compression recognition is * automatically handled when calling @FT_New_Face or @FT_Open_Face. * This means that if no font driver is capable of handling the raw * compressed file, the library will try to open a LZW stream from it * and re-open the face with it. * * This function may return `FT_Err_Unimplemented_Feature' if your build * of FreeType was not compiled with LZW support. */ FT_EXP/***************************************************************************/ /* */ /* ftmoderr.h */ /* */ /* FreeType module error offsets (specification). */ /* */ /* Copyright 2001, 2002, 2003, 2004, 2005 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /* */ /* This file is used to define the FreeType module error offsets. */ /* */ /* The lower byte gives the error code, the higher byte gives the */ /* module. The base module has error offset 0. For example, the error */ /* `FT_Err_Invalid_File_Format' has value 0x003, the error */ /* `TT_Err_Invalid_File_Format' has value 0x1103, the error */ /* `T1_Err_Invalid_File_Format' has value 0x1203, etc. */ /* */ /* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */ /* to make the higher byte always zero (disabling the module error */ /* mechanism). */ /* */ /* It can also be used to create a module error message table easily */ /* with something like */ /* */ /* { */ /* #undef __FTMODERR_H__ */ /* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, */ /* #define FT_MODERR_START_LIST { */ /* #define FT_MODERR_END_LIST { 0, 0 } }; */ /* */ /* const struct */ /* { */ /* int mod_err_offset; */ /* const char* mod_err_msg */ /* } ft_mod_errors[] = */ /* */ /* #include FT_MODULE_ERRORS_H */ /* } */ /* */ /* To use such a table, all errors must be ANDed with 0xFF00 to remove */ /* the error code. */ /* */ /*************************************************************************/ #ifndef __FTMODERR_H__ #define __FTMODERR_H__ /*******************************************************************/ /*******************************************************************/ /***** *****/ /***** SETUP MACROS *****/ /***** *****/ /*******************************************************************/ /*******************************************************************/ #undef FT_NEED_EXTERN_C #ifndef FT_MODERRDEF #ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS #define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = v, #else #define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = 0, #endif #define FT_MODERR_START_LIST enum { #define FT_MODERR_END_LIST FT_Mod_Err_Max }; #ifdef __cplusplus #define FT_NEED_EXTERN_C extern "C" { #endif #endif /* !FT_MODERRDEF */ /*******************************************************************/ /*******************************************************************/ /***** *****/ /***** LIST MODULE ERROR BASES *****/ /***** *****/ /*******************************************************************/ /*******************************************************************/ #ifdef FT_MODERR_START_LIST FT_MODERR_START_LIST #endif FT_MODERRDEF( Base, 0x000, "base module" ) FT_MODERRDEF( Autofit, 0x100, "autofitter module" ) FT_MODERRDEF( BDF, 0x200, "BDF module" ) FT_MODERRDEF( Cache, 0x300, "cache module" ) FT_MODERRDEF( CFF, 0x400, "CFF module" ) FT_MODERRDEF( CID, 0x500, "CID module" ) FT_MODERRDEF( Gzip, 0x600, "Gzip module" ) FT_MODERRDEF( LZW, 0x700, "LZW module" ) FT_MODERRDEF( OTvalid, 0x800, "OpenType validation module" ) FT_MODERRDEF( PCF, 0x900, "PCF module" ) FT_MODERRDEF( PFR, 0xA00, "PFR module" ) FT_MODERRDEF( PSaux, 0xB00, "PS auxiliary module" ) FT_MODERRDEF( PShinter, 0xC00, "PS hinter module" ) FT_MODERRDEF( PSnames, 0xD00, "PS names module" ) FT_MODERRDEF( Raster, 0xE00, "raster module" ) FT_MODERRDEF( SFNT, 0xF00, "SFNT module" ) FT_MODERRDEF( Smooth, 0x1000, "smooth raster module" ) FT_MODERRDEF( TrueType, 0x1100, "TrueType module" ) FT_MODERRDEF( Type1, 0x1200, "Type 1 module" ) FT_MODERRDEF( Type42, 0x1300, "Type 42 module" ) FT_MODERRDEF( Winfonts, 0x1400, "Windows FON/FNT module" ) #ifdef FT_MODERR_END_LIST FT_MODERR_END_LIST #endif /*******************************************************************/ /*******************************************************************/ /***** *****/ /***** CLEANUP *****/ /***** *****/ /*******************************************************************/ /*******************************************************************/ #ifdef FT_NEED_EXTERN_C } #endif #undef FT_MODERR_START_LIST #undef FT_MODERR_END_LIST #undef FT_MODERRDEF #undef FT_NEED_EXTERN_C #endif /* __FTMODERR_H__ */ /* END */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libart Description: LGPL version of the libart library Version: 2.3.21 Libs: -L${libdir} -lart_lgpl_2 Cflags: -I${includedir}/libart-2.0 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftotval.h */ /* */ /* FreeType API for validating OpenType tables (specification). */ /* */ /* Copyright 2004, 2005, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /***************************************************************************/ /* */ /* */ /* Warning: This module might be moved to a different library in the */ /* future to avoid a tight dependency between FreeType and the */ /* OpenType specification. */ /* */ /* */ /***************************************************************************/ #ifndef __FTOTVAL_H__ #define __FTOTVAL_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* ot_validation */ /* */ /* <Title> */ /* OpenType Validation */ /* */ /* <Abstract> */ /* An API to validate OpenType tables. */ /* */ /* <Description> */ /* This section contains the declaration of functions to validate */ /* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). */ /* */ /*************************************************************************/ /********************************************************************** * * @enum: * FT_VALIDATE_OTXXX * * @description: * A list of bit-field constants used with @FT_OpenType_Validate to * indicate which OpenType tables should be validated. * * @values: * FT_VALIDATE_BASE :: * Validate BASE table. * * FT_VALIDATE_GDEF :: * Validate GDEF table. * * FT_VALIDATE_GPOS :: * Validate GPOS table. * * FT_VALIDATE_GSUB :: * Validate GSUB table. * * FT_VALIDATE_JSTF :: * Validate JSTF table./***************************************************************************/ /* */ /* ftimage.h */ /* */ /* FreeType glyph image formats and default raster interface */ /* (specification). */ /* */ /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ /* 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /* */ /* Note: A `raster' is simply a scan-line converter, used to render */ /* FT_Outlines into FT_Bitmaps. */ /* */ /*************************************************************************/ #ifndef __FTIMAGE_H__ #define __FTIMAGE_H__ /* _STANDALONE_ is from ftgrays.c */ #ifndef _STANDALONE_ #include <ft2build.h> #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* basic_types */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Type> */ /* FT_Pos */ /* */ /* <Description> */ /* The type FT_Pos is used to store vectorial coordinates. Depending */ /* on the context, these can represent distances in integer font */ /* units, or 16.16, or 26.6 fixed float pixel coordinates. */ /* */ typedef signed long FT_Pos; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Vector */ /* */ /* <Description> */ /* A simple structure used to store a 2D vector; coordinates are of */ /* the FT_Pos type. */ /* */ /* <Fields> */ /* x :: The horizontal coordinate. */ /* y :: The vertical coordinate. */ /* */ typedef struct FT_Vector_ { FT_Pos x; FT_Pos y; } FT_Vector; /*************************************************************************/ /* */ /* <Struct> */ /* FT_BBox */ /* */ /* <Description> */ /* A structure used to hold an outline's bounding box, i.e., the */ /* coordinates of its extrema in the horizontal and vertical */ /* directions. */ /* */ /* <Fields> */ /* xMin :: The horizontal minimum (left-most). */ /* */ /* yMin :: The vertical minimum (bottom-most). */ /* */ /* xMax :: The horizontal maximum (right-most). */ /* */ /* yMax :: The vertical maximum (top-most). */ /* */ /* <Note> */ /* The bounding box is specified with the coordinates of the lower */ /* left and the upper right corner. In PostScript, those values are */ /* often called (llx,lly) and (urx,ury), respectively. */ /* */ /* If `yMin' is negative, this value gives the glyph's descender. */ /* Otherwise, the glyph doesn't descend below the baseline. */ /* Similarly, if `ymax' is positive, this value gives the glyph's */ /* ascender. */ /* */ /* `xMin' gives the horizontal distance from the glyph's origin to */ /* the left edge of the glyph's bounding box. If `xMin' is negative, */ /* the glyph extends to the left of the origin. */ /* */ typedef struct FT_BBox_ { FT_Pos xMin, yMin; FT_Pos xMax, yMax; } FT_BBox; /*************************************************************************/ /* */ /* <Enum> */ /* FT_Pixel_Mode */ /* */ /* <Description> */ /* An enumeration type used to describe the format of pixels in a */ /* given bitmap. Note that additional formats may be added in the */ /* future. */ /* */ /* <Values> */ /* FT_PIXEL_MODE_NONE :: */ /* Value~0 is reserved. */ /* */ /* FT_PIXEL_MODE_MONO :: */ /* A monochrome bitmap, using 1~bit per pixel. Note that pixels */ /* are stored in most-significant order (MSB), which means that */ /* the left-most pixel in a byte has value 128. */ /* */ /* FT_PIXEL_MODE_GRAY :: */ /* An 8-bit bitmap, generally used to represent anti-aliased glyph */ /* images. Each pixel is stored in one byte. Note that the number */ /* of `gray' levels is stored in the `num_grays' field of the */ /* @FT_Bitmap structure (it generally is 256). */ /* */ /* FT_PIXEL_MODE_GRAY2 :: */ /* A 2-bit per pixel bitmap, used to represent embedded */ /* anti-aliased bitmaps in font files according to the OpenType */ /* specification. We haven't found a single font using this */ /* format, however. */ /* */ /* FT_PIXEL_MODE_GRAY4 :: */ /* A 4-bit per pixel bitmap, representing embedded anti-aliased */ /* bitmaps in font files according to the OpenType specification. */ /* We haven't found a single font using this format, however. */ /* */ /* FT_PIXEL_MODE_LCD :: */ /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ /* used for display on LCD displays; the bitmap is three times */ /* wider than the original glyph image. See also */ /* @FT_RENDER_MODE_LCD. */ /* */ /* FT_PIXEL_MODE_LCD_V :: */ /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ /* used for display on rotated LCD displays; the bitmap is three */ /* times taller than the original glyph image. See also */ /* @FT_RENDER_MODE_LCD_V. */ /* */ typedef enum FT_Pixel_Mode_ { FT_PIXEL_MODE_NONE = 0, FT_PIXEL_MODE_MONO, FT_PIXEL_MODE_GRAY, FT_PIXEL_MODE_GRAY2, FT_PIXEL_MODE_GRAY4, FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V, FT_PIXEL_MODE_MAX /* do not remove */ } FT_Pixel_Mode; /*************************************************************************/ /* */ /* <Enum> */ /* ft_pixel_mode_xxx */ /* */ /* <Description> */ /* A list of deprecated constants. Use the corresponding */ /* @FT_Pixel_Mode values instead. */ /* */ /* <Values> */ /* ft_pixel_mode_none :: See @FT_PIXEL_MODE_NONE. */ /* ft_pixel_mode_mono :: See @FT_PIXEL_MODE_MONO. */ /* ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY. */ /* ft_pixel_mode_pal2 :: See @FT_PIXEL_MODE_GRAY2. */ /* ft_pixel_mode_pal4 :: See @FT_PIXEL_MODE_GRAY4. */ /* */ #define ft_pixel_mode_none FT_PIXEL_MODE_NONE #define ft_pixel_mode_mono FT_PIXEL_MODE_MONO #define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY #define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2 #define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4 /* */ #if 0 /*************************************************************************/ /* */ /* <Enum> */ /* FT_Palette_Mode */ /* */ /* <Description> */ /* THIS TYPE IS DEPRECATED. DO NOT USE IT! */ /* */ /* An enumeration type to describe the format of a bitmap palette, */ /* used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */ /* */ /* <Values> */ /* ft_palette_mode_rgb :: The palette is an array of 3-byte RGB */ /* records. */ /* */ /* ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA */ /* records. */ /* */ /* <Note> */ /* As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by */ /* FreeType, these types are not handled by the library itself. */ /* */ typedef enum FT_Palette_Mode_ { ft_palette_mode_rgb = 0, ft_palette_mode_rgba, ft_palette_mode_max /* do not remove */ } FT_Palette_Mode; /* */ #endif /*************************************************************************/ /* */ /* <Struct> */ /* FT_Bitmap */ /* */ /* <Description> */ /* A structure used to describe a bitmap or pixmap to the raster. */ /* Note that we now manage pixmaps of various depths through the */ /* `pixel_mode' field. */ /* */ /* <Fields> */ /* rows :: The number of bitmap rows. */ /* */ /* width :: The number of pixels in bitmap row. */ /* */ /* pitch :: The pitch's absolute value is the number of bytes */ /* taken by one bitmap row, including padding. */ /* However, the pitch is positive when the bitmap has */ /* a `down' flow, and negative when it has an `up' */ /* flow. In all cases, the pitch is an offset to add */ /* to a bitmap pointer in order to go down one row. */ /* */ /* Note that `padding' means the alignment of a */ /* bitmap to a byte border, and FreeType functions */ /* normally align to the smallest possible integer */ /* value. */ /* */ /* For the B/W rasterizer, `pitch' is always an even */ /* number. */ /* */ /* To change the pitch of a bitmap (say, to make it a */ /* multiple of 4), use @FT_Bitmap_Convert. */ /* Alternatively, you might use callback functions to */ /* directly render to the application's surface; see */ /* the file `example2.cpp' in the tutorial for a */ /* demonstration. */ /* */ /* buffer :: A typeless pointer to the bitmap buffer. This */ /* value should be aligned on 32-bit boundaries in */ /* most cases. */ /* */ /* num_grays :: This field is only used with */ /* @FT_PIXEL_MODE_GRAY; it gives the number of gray */ /* levels used in the bitmap. */ /* */ /* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */ /* See @FT_Pixel_Mode for possible values. */ /* */ /* palette_mode :: This field is intended for paletted pixel modes; */ /* it indicates how the palette is stored. Not */ /* used currently. */ /* */ /* palette :: A typeless pointer to the bitmap palette; this */ /* field is intended for paletted pixel modes. Not */ /* used currently. */ /* */ /* <Note> */ /* For now, the only pixel modes supported by FreeType are mono and */ /* grays. However, drivers might be added in the future to support */ /* more `colorful' options. */ /* */ typedef struct FT_Bitmap_ { int rows; int width; int pitch; unsigned char* buffer; short num_grays; char pixel_mode; char palette_mode; void* palette; } FT_Bitmap; /*************************************************************************/ /* */ /* <Section> */ /* outline_processing */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Struct> */ /* FT_Outline */ /* */ /* <Description> */ /* This structure is used to describe an outline to the scan-line */ /* converter. */ /* */ /* <Fields> */ /* n_contours :: The number of contours in the outline. */ /* */ /* n_points :: The number of points in the outline. */ /* */ /* points :: A pointer to an array of `n_points' @FT_Vector */ /* elements, giving the outline's point coordinates. */ /* */ /* tags :: A pointer to an array of `n_points' chars, giving */ /* each outline point's type. */ /* */ /* If bit~0 is unset, the point is `off' the curve, */ /* i.e., a Bézier control point, while it is `on' if */ /* set. */ /* */ /* Bit~1 is meaningful for `off' points only. If set, */ /* it indicates a third-order Bézier arc control point; */ /* and a second-order control point if unset. */ /* */ /* If bit~2 is set, bits 5-7 contain the drop-out mode */ /* (as defined in the OpenType specification; the value */ /* is the same as the argument to the SCANMODE */ /* instruction). */ /* */ /* Bits 3 and~4 are reserved for internal purposes. */ /* */ /* contours :: An array of `n_contours' shorts, giving the end */ /* point of each contour within the outline. For */ /* example, the first contour is defined by the points */ /* `0' to `contours[0]', the second one is defined by */ /* the points `contours[0]+1' to `contours[1]', etc. */ /* */ /* flags :: A set of bit flags used to characterize the outline */ /* and give hints to the scan-converter and hinter on */ /* how to convert/grid-fit it. See @FT_OUTLINE_FLAGS. */ /* */ /* <Note> */ /* The B/W rasterizer only checks bit~2 in the `tags' array for the */ /* first point of each contour. The drop-out mode as given with */ /* @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and */ /* @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden. */ /* */ typedef struct FT_Outline_ { short n_contours; /* number of contours in glyph */ short n_points; /* number of points in the glyph */ FT_Vector* points; /* the outline's points */ char* tags; /* the points flags */ short* contours; /* the contour end points */ int flags; /* outline masks */ } FT_Outline; /* Following limits must be consistent with */ /* FT_Outline.{n_contours,n_points} */ #define FT_OUTLINE_CONTOURS_MAX SHRT_MAX #define FT_OUTLINE_POINTS_MAX SHRT_MAX /*************************************************************************/ /* */ /* <Enum> */ /* FT_OUTLINE_FLAGS */ /* */ /* <Description> */ /* A list of bit-field constants use for the flags in an outline's */ /* `flags' field. */ /* */ /* <Values> */ /* FT_OUTLINE_NONE :: */ /* Value~0 is reserved. */ /* */ /* FT_OUTLINE_OWNER :: */ /* If set, this flag indicates that the outline's field arrays */ /* (i.e., `points', `flags', and `contours') are `owned' by the */ /* outline object, and should thus be freed when it is destroyed. */ /* */ /* FT_OUTLINE_EVEN_ODD_FILL :: */ /* By default, outlines are filled using the non-zero winding rule. */ /* If set to 1, the outline will be filled using the even-odd fill */ /* rule (only works with the smooth rasterizer). */ /* */ /* FT_OUTLINE_REVERSE_FILL :: */ /* By default, outside contours of an outline are oriented in */ /* clock-wise direction, as defined in the TrueType specification. */ /* This flag is set if the outline uses the opposite direction */ /* (typically for Type~1 fonts). This flag is ignored by the scan */ /* converter. */ /* */ /* FT_OUTLINE_IGNORE_DROPOUTS :: */ /* By default, the scan converter will try to detect drop-outs in */ /* an outline and correct the glyph bitmap to ensure consistent */ /* shape continuity. If set, this flag hints the scan-line */ /* converter to ignore such cases. See below for more information. */ /* */ /* FT_OUTLINE_SMART_DROPOUTS :: */ /* Select smart dropout control. If unset, use simple dropout */ /* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See */ /* below for more information. */ /* */ /* FT_OUTLINE_INCLUDE_STUBS :: */ /* If set, turn pixels on for `stubs', otherwise exclude them. */ /* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for */ /* more information. */ /* */ /* FT_OUTLINE_HIGH_PRECISION :: */ /* This flag indicates that the scan-line converter should try to */ /* convert this outline to bitmaps with the highest possible */ /* quality. It is typically set for small character sizes. Note */ /* that this is only a hint that might be completely ignored by a */ /* given scan-converter. */ /* */ /* FT_OUTLINE_SINGLE_PASS :: */ /* This flag is set to force a given scan-converter to only use a */ /* single pass over the outline to render a bitmap glyph image. */ /* Normally, it is set for very large character sizes. It is only */ /* a hint that might be completely ignored by a given */ /* scan-converter. */ /* */ /* <Note> */ /* The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */ /* and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth */ /* rasterizer. */ /* */ /* There exists a second mechanism to pass the drop-out mode to the */ /* B/W rasterizer; see the `tags' field in @FT_Outline. */ /* */ /* Please refer to the description of the `SCANTYPE' instruction in */ /* the OpenType specification (in file `ttinst1.doc') how simple */ /* drop-outs, smart drop-outs, and stubs are defined. */ /* */ #define FT_OUTLINE_NONE 0x0 #define FT_OUTLINE_OWNER 0x1 #define FT_OUTLINE_EVEN_ODD_FILL 0x2 #define FT_OUTLINE_REVERSE_FILL 0x4 #define FT_OUTLINE_IGNORE_DROPOUTS 0x8 #define FT_OUTLINE_SMART_DROPOUTS 0x10 #define FT_OUTLINE_INCLUDE_STUBS 0x20 #define FT_OUTLINE_HIGH_PRECISION 0x100 #define FT_OUTLINE_SINGLE_PASS 0x200 /************************************************************************* * * @enum: * ft_outline_flags * * @description: * These constants are deprecated. Please use the corresponding * @FT_OUTLINE_FLAGS values. * * @values: * ft_outline_none :: See @FT_OUTLINE_NONE. * ft_outline_owner :: See @FT_OUTLINE_OWNER. * ft_outline_even_odd_fill :: See @FT_OUTLINE_EVEN_ODD_FILL. * ft_outline_reverse_fill :: See @FT_OUTLINE_REVERSE_FILL. * ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS. * ft_outline_high_precision :: See @FT_OUTLINE_HIGH_PRECISION. * ft_outline_single_pass :: See @FT_OUTLINE_SINGLE_PASS. */ #define ft_outline_none FT_OUTLINE_NONE #define ft_outline_owner FT_OUTLINE_OWNER #define ft_outline_even_odd_fill FT_OUTLINE_EVEN_ODD_FILL #define ft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL #define ft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS #define ft_outline_high_precision FT_OUTLINE_HIGH_PRECISION #define ft_outline_single_pass FT_OUTLINE_SINGLE_PASS /* */ #define FT_CURVE_TAG( flag ) ( flag & 3 ) #define FT_CURVE_TAG_ON 1 #define FT_CURVE_TAG_CONIC 0 #define FT_CURVE_TAG_CUBIC 2 #define FT_CURVE_TAG_HAS_SCANMODE 4 #define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */ #define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */ #define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \ FT_CURVE_TAG_TOUCH_Y ) #define FT_Curve_Tag_On FT_CURVE_TAG_ON #define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC #define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC #define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X #define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Outline_MoveToFunc */ /* */ /* <Description> */ /* A function pointer type used to describe the signature of a `move */ /* to' function during outline walking/decomposition. */ /* */ /* A `move to' is emitted to start a new contour in an outline. */ /* */ /* <Input> */ /* to :: A pointer to the target point of the `move to'. */ /* */ /* user :: A typeless pointer which is passed from the caller of the */ /* decomposition function. */ /* */ /* <Return> */ /* Error code. 0~means success. */ /* */ typedef int (*FT_Outline_MoveToFunc)( const FT_Vector* to, void* user ); #define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Outline_LineToFunc */ /* */ /* <Description> */ /* A function pointer type used to describe the signature of a `line */ /* to' function during outline walking/decomposition. */ /* */ /* A `line to' is emitted to indicate a segment in the outline. */ /* */ /* <Input> */ /* to :: A pointer to the target point of the `line to'. */ /* */ /* user :: A typeless pointer which is passed from the caller of the */ /* decomposition function. */ /* */ /* <Return> */ /* Error code. 0~means success. */ /* */ typedef int (*FT_Outline_LineToFunc)( const FT_Vector* to, void* user ); #define FT_Outline_LineTo_Func FT_Outline_LineToFunc /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Outline_ConicToFunc */ /* */ /* <Description> */ /* A function pointer type used to describe the signature of a `conic */ /* to' function during outline walking or decomposition. */ /* */ /* A `conic to' is emitted to indicate a second-order Bézier arc in */ /* the outline. */ /* */ /* <Input> */ /* control :: An intermediate control point between the last position */ /* and the new target in `to'. */ /* */ /* to :: A pointer to the target end point of the conic arc. */ /* */ /* user :: A typeless pointer which is passed from the caller of */ /* the decomposition function. */ /* */ /* <Return> */ /* Error code. 0~means success. */ /* */ typedef int (*FT_Outline_ConicToFunc)( const FT_Vector* control, const FT_Vector* to, void* user ); #define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Outline_CubicToFunc */ /* */ /* <Description> */ /* A function pointer type used to describe the signature of a `cubic */ /* to' function during outline walking or decomposition. */ /* */ /* A `cubic to' is emitted to indicate a third-order Bézier arc. */ /* */ /* <Input> */ /* control1 :: A pointer to the first Bézier control point. */ /* */ /* control2 :: A pointer to the second Bézier control point. */ /* */ /* to :: A pointer to the target end point. */ /* */ /* user :: A typeless pointer which is passed from the caller of */ /* the decomposition function. */ /* */ /* <Return> */ /* Error code. 0~means success. */ /* */ typedef int (*FT_Outline_CubicToFunc)( const FT_Vector* control1, const FT_Vector* control2, const FT_Vector* to, void* user ); #define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc /*************************************************************************/ /* */ /* <Struct> */ /* FT_Outline_Funcs */ /* */ /* <Description> */ /* A structure to hold various function pointers used during outline */ /* decomposition in order to emit segments, conic, and cubic Béziers. */ /* */ /* <Fields> */ /* move_to :: The `move to' emitter. */ /* */ /* line_to :: The segment emitter. */ /* */ /* conic_to :: The second-order Bézier arc emitter. */ /* */ /* cubic_to :: The third-order Bézier arc emitter. */ /* */ /* shift :: The shift that is applied to coordinates before they */ /* are sent to the emitter. */ /* */ /* delta :: The delta that is applied to coordinates before they */ /* are sent to the emitter, but after the shift. */ /* */ /* <Note> */ /* The point coordinates sent to the emitters are the transformed */ /* version of the original coordinates (this is important for high */ /* accuracy during scan-conversion). The transformation is simple: */ /* */ /* { */ /* x' = (x << shift) - delta */ /* y' = (x << shift) - delta */ /* } */ /* */ /* Set the values of `shift' and `delta' to~0 to get the original */ /* point coordinates. */ /* */ typedef struct FT_Outline_Funcs_ { FT_Outline_MoveToFunc move_to; FT_Outline_LineToFunc line_to; FT_Outline_ConicToFunc conic_to; FT_Outline_CubicToFunc cubic_to; int shift; FT_Pos delta; } FT_Outline_Funcs; /*************************************************************************/ /* */ /* <Section> */ /* basic_types */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Macro> */ /* FT_IMAGE_TAG */ /* */ /* <Description> */ /* This macro converts four-letter tags to an unsigned long type. */ /* */ /* <Note> */ /* Since many 16-bit compilers don't like 32-bit enumerations, you */ /* should redefine this macro in case of problems to something like */ /* this: */ /* */ /* { */ /* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */ /* } */ /* */ /* to get a simple enumeration without assigning special numbers. */ /* */ #ifndef FT_IMAGE_TAG #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) \ value = ( ( (unsigned long)_x1 << 24 ) | \ ( (unsigned long)_x2 << 16 ) | \ ( (unsigned long)_x3 << 8 ) | \ (unsigned long)_x4 ) #endif /* FT_IMAGE_TAG */ /*************************************************************************/ /* */ /* <Enum> */ /* FT_Glyph_Format */ /* */ /* <Description> */ /* An enumeration type used to describe the format of a given glyph */ /* image. Note that this version of FreeType only supports two image */ /* formats, even though future font drivers will be able to register */ /* their own format. */ /* */ /* <Values> */ /* FT_GLYPH_FORMAT_NONE :: */ /* The value~0 is reserved. */ /* */ /* FT_GLYPH_FORMAT_COMPOSITE :: */ /* The glyph image is a composite of several other images. This */ /* format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to */ /* report compound glyphs (like accented characters). */ /* */ /* FT_GLYPH_FORMAT_BITMAP :: */ /* The glyph image is a bitmap, and can be described as an */ /* @FT_Bitmap. You generally need to access the `bitmap' field of */ /* the @FT_GlyphSlotRec structure to read it. */ /* */ /* FT_GLYPH_FORMAT_OUTLINE :: */ /* The glyph image is a vectorial outline made of line segments */ /* and Bézier arcs; it can be described as an @FT_Outline; you */ /* generally want to access the `outline' field of the */ /* @FT_GlyphSlotRec structure to read it. */ /* */ /* FT_GLYPH_FORMAT_PLOTTER :: */ /* The glyph image is a vectorial path with no inside and outside */ /* contours. Some Type~1 fonts, like those in the Hershey family, */ /* contain glyphs in this format. These are described as */ /* @FT_Outline, but FreeType isn't currently capable of rendering */ /* them correctly. */ /* */ typedef enum FT_Glyph_Format_ { FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ), FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ), FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP, 'b', 'i', 't', 's' ), FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE, 'o', 'u', 't', 'l' ), FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER, 'p', 'l', 'o', 't' ) } FT_Glyph_Format; /*************************************************************************/ /* */ /* <Enum> */ /* ft_glyph_format_xxx */ /* */ /* <Description> */ /* A list of deprecated constants. Use the corresponding */ /* @FT_Glyph_Format values instead. */ /* */ /* <Values> */ /* ft_glyph_format_none :: See @FT_GLYPH_FORMAT_NONE. */ /* ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE. */ /* ft_glyph_format_bitmap :: See @FT_GLYPH_FORMAT_BITMAP. */ /* ft_glyph_format_outline :: See @FT_GLYPH_FORMAT_OUTLINE. */ /* ft_glyph_format_plotter :: See @FT_GLYPH_FORMAT_PLOTTER. */ /* */ #define ft_glyph_format_none FT_GLYPH_FORMAT_NONE #define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE #define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP #define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE #define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /***** *****/ /***** R A S T E R D E F I N I T I O N S *****/ /***** *****/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* A raster is a scan converter, in charge of rendering an outline into */ /* a a bitmap. This section contains the public API for rasters. */ /* */ /* Note that in FreeType 2, all rasters are now encapsulated within */ /* specific modules called `renderers'. See `freetype/ftrender.h' for */ /* more details on renderers. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Section> */ /* raster */ /* */ /* <Title> */ /* Scanline Converter */ /* */ /* <Abstract> */ /* How vectorial outlines are converted into bitmaps and pixmaps. */ /* */ /* <Description> */ /* This section contains technical definitions. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Type> */ /* FT_Raster */ /* */ /* <Description> */ /* A handle (pointer) to a raster object. Each object can be used */ /* independently to convert an outline into a bitmap or pixmap. */ /* */ typedef struct FT_RasterRec_* FT_Raster; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Span */ /* */ /* <Description> */ /* A structure used to model a single span of gray (or black) pixels */ /* when rendering a monochrome or anti-aliased bitmap. */ /* */ /* <Fields> */ /* x :: The span's horizontal start position. */ /* */ /* len :: The span's length in pixels. */ /* */ /* coverage :: The span color/coverage, ranging from 0 (background) */ /* to 255 (foreground). Only used for anti-aliased */ /* rendering. */ /* */ /* <Note> */ /* This structure is used by the span drawing callback type named */ /* @FT_SpanFunc which takes the y~coordinate of the span as a */ /* a parameter. */ /* */ /* The coverage value is always between 0 and 255. If you want less */ /* gray values, the callback function has to reduce them. */ /* */ typedef struct FT_Span_ { short x; unsigned short len; unsigned char coverage; } FT_Span; /*************************************************************************/ /* */ /* <FuncType> */ /* FT_SpanFunc */ /* */ /* <Description> */ /* A function used as a call-back by the anti-aliased renderer in */ /* order to let client applications draw themselves the gray pixel */ /* spans on each scan line. */ /* */ /* <Input> */ /* y :: The scanline's y~coordinate. */ /* */ /* count :: The number of spans to draw on this scanline. */ /* */ /* spans :: A table of `count' spans to draw on the scanline. */ /* */ /* user :: User-supplied data that is passed to the callback. */ /* */ /* <Note> */ /* This callback allows client applications to directly render the */ /* gray spans of the anti-aliased bitmap to any kind of surfaces. */ /* */ /* This can be used to write anti-aliased outlines directly to a */ /* given background bitmap, and even perform translucency. */ /* */ /* Note that the `count' field cannot be greater than a fixed value */ /* defined by the `FT_MAX_GRAY_SPANS' configuration macro in */ /* `ftoption.h'. By default, this value is set to~32, which means */ /* that if there are more than 32~spans on a given scanline, the */ /* callback is called several times with the same `y' parameter in */ /* order to draw all callbacks. */ /* */ /* Otherwise, the callback is only called once per scan-line, and */ /* only for those scanlines that do have `gray' pixels on them. */ /* */ typedef void (*FT_SpanFunc)( int y, int count, const FT_Span* spans, void* user ); #define FT_Raster_Span_Func FT_SpanFunc /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Raster_BitTest_Func */ /* */ /* <Description> */ /* THIS TYPE IS DEPRECATED. DO NOT USE IT. */ /* */ /* A function used as a call-back by the monochrome scan-converter */ /* to test whether a given target pixel is already set to the drawing */ /* `color'. These tests are crucial to implement drop-out control */ /* per-se the TrueType spec. */ /* */ /* <Input> */ /* y :: The pixel's y~coordinate. */ /* */ /* x :: The pixel's x~coordinate. */ /* */ /* user :: User-supplied data that is passed to the callback. */ /* */ /* <Return> */ /* 1~if the pixel is `set', 0~otherwise. */ /* */ typedef int (*FT_Raster_BitTest_Func)( int y, int x, void* user ); /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Raster_BitSet_Func */ /* */ /* <Description> */ /* THIS TYPE IS DEPRECATED. DO NOT USE IT. */ /* */ /* A function used as a call-back by the monochrome scan-converter */ /* to set an individual target pixel. This is crucial to implement */ /* drop-out control according to the TrueType specification. */ /* */ /* <Input> */ /* y :: The pixel's y~coordinate. */ /* */ /* x :: The pixel's x~coordinate. */ /* */ /* user :: User-supplied data that is passed to the callback. */ /* */ /* <Return> */ /* 1~if the pixel is `set', 0~otherwise. */ /* */ typedef void (*FT_Raster_BitSet_Func)( int y, int x, void* user ); /*************************************************************************/ /* */ /* <Enum> */ /* FT_RASTER_FLAG_XXX */ /* */ /* <Description> */ /* A list of bit flag constants as used in the `flags' field of a */ /* @FT_Raster_Params structure. */ /* */ /* <Values> */ /* FT_RASTER_FLAG_DEFAULT :: This value is 0. */ /* */ /* FT_RASTER_FLAG_AA :: This flag is set to indicate that an */ /* anti-aliased glyph image should be */ /* generated. Otherwise, it will be */ /* monochrome (1-bit). */ /* */ /* FT_RASTER_FLAG_DIRECT :: This flag is set to indicate direct */ /* rendering. In this mode, client */ /* applications must provide their own span */ /* callback. This lets them directly */ /* draw or compose over an existing bitmap. */ /* If this bit is not set, the target */ /* pixmap's buffer _must_ be zeroed before */ /* rendering. */ /* */ /* Note that for now, direct rendering is */ /* only possible with anti-aliased glyphs. */ /* */ /* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */ /* rendering mode. If set, the output will */ /* be clipped to a box specified in the */ /* `clip_box' field of the */ /* @FT_Raster_Params structure. */ /* */ /* Note that by default, the glyph bitmap */ /* is clipped to the target pixmap, except */ /* in direct rendering mode where all spans */ /* are generated if no clipping box is set. */ /* */ #define FT_RASTER_FLAG_DEFAULT 0x0 #define FT_RASTER_FLAG_AA 0x1 #define FT_RASTER_FLAG_DIRECT 0x2 #define FT_RASTER_FLAG_CLIP 0x4 /* deprecated */ #define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT #define ft_raster_flag_aa FT_RASTER_FLAG_AA #define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT #define ft_raster_flag_clip FT_RASTER_FLAG_CLIP /*************************************************************************/ /* */ /* <Struct> */ /* FT_Raster_Params */ /* */ /* <Description> */ /* A structure to hold the arguments used by a raster's render */ /* function. */ /* */ /* <Fields> */ /* target :: The target bitmap. */ /* */ /* source :: A pointer to the source glyph image (e.g., an */ /* @FT_Outline). */ /* */ /* flags :: The rendering flags. */ /* */ /* gray_spans :: The gray span drawing callback. */ /* */ /* black_spans :: The black span drawing callback. UNIMPLEMENTED! */ /* */ /* bit_test :: The bit test callback. UNIMPLEMENTED! */ /* */ /* bit_set :: The bit set callback. UNIMPLEMENTED! */ /* */ /* user :: User-supplied data that is passed to each drawing */ /* callback. */ /* */ /* clip_box :: An optional clipping box. It is only used in */ /* direct rendering mode. Note that coordinates here */ /* should be expressed in _integer_ pixels (and not in */ /* 26.6 fixed-point units). */ /* */ /* <Note> */ /* An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA */ /* bit flag is set in the `flags' field, otherwise a monochrome */ /* bitmap is generated. */ /* */ /* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */ /* raster will call the `gray_spans' callback to draw gray pixel */ /* spans, in the case of an aa glyph bitmap, it will call */ /* `black_spans', and `bit_test' and `bit_set' in the case of a */ /* monochrome bitmap. This allows direct composition over a */ /* pre-existing bitmap through user-provided callbacks to perform the */ /* span drawing/composition. */ /* */ /* Note that the `bit_test' and `bit_set' callbacks are required when */ /* rendering a monochrome bitmap, as they are crucial to implement */ /* correct drop-out control as defined in the TrueType specification. */ /* */ typedef struct FT_Raster_Params_ { const FT_Bitmap* target; const void* source; int flags; FT_SpanFunc gray_spans; FT_SpanFunc black_spans; /* doesn't work! */ FT_Raster_BitTest_Func bit_test; /* doesn't work! */ FT_Raster_BitSet_Func bit_set; /* doesn't work! */ void* user; FT_BBox clip_box; } FT_Raster_Params; /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Raster_NewFunc */ /* */ /* <Description> */ /* A function used to create a new raster object. */ /* */ /* <Input> */ /* memory :: A handle to the memory allocator. */ /* */ /* <Output> */ /* raster :: A handle to the new raster object. */ /* */ /* <Return> */ /* Error code. 0~means success. */ /* */ /* <Note> */ /* The `memory' parameter is a typeless pointer in order to avoid */ /* un-wanted dependencies on the rest of the FreeType code. In */ /* practice, it is an @FT_Memory object, i.e., a handle to the */ /* standard FreeType memory allocator. However, this field can be */ /* completely ignored by a given raster implementation. */ /* */ typedef int (*FT_Raster_NewFunc)( void* memory, FT_Raster* raster ); #define FT_Raster_New_Func FT_Raster_NewFunc /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Raster_DoneFunc */ /* */ /* <Description> */ /* A function used to destroy a given raster object. */ /* */ /* <Input> */ /* raster :: A handle to the raster object. */ /* */ typedef void (*FT_Raster_DoneFunc)( FT_Raster raster ); #define FT_Raster_Done_Func FT_Raster_DoneFunc /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Raster_ResetFunc */ /* */ /* <Description> */ /* FreeType provides an area of memory called the `render pool', */ /* available to all registered rasters. This pool can be freely used */ /* during a given scan-conversion but is shared by all rasters. Its */ /* content is thus transient. */ /* */ /* This function is called each time the render pool changes, or just */ /* after a new raster object is created. */ /* */ /* <Input> */ /* raster :: A handle to the new raster object. */ /* */ /* pool_base :: The address in memory of the render pool. */ /* */ /* pool_size :: The size in bytes of the render pool. */ /* */ /* <Note> */ /* Rasters can ignore the render pool and rely on dynamic memory */ /* allocation if they want to (a handle to the memory allocator is */ /* passed to the raster constructor). However, this is not */ /* recommended for efficiency purposes. */ /* */ typedef void (*FT_Raster_ResetFunc)( FT_Raster raster, unsigned char* pool_base, unsigned long pool_size ); #define FT_Raster_Reset_Func FT_Raster_ResetFunc /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Raster_SetModeFunc */ /* */ /* <Description> */ /* This function is a generic facility to change modes or attributes */ /* in a given raster. This can be used for debugging purposes, or */ /* simply to allow implementation-specific `features' in a given */ /* raster module. */ /* */ /* <Input> */ /* raster :: A handle to the new raster object. */ /* */ /* mode :: A 4-byte tag used to name the mode or property. */ /* */ /* args :: A pointer to the new mode/property to use. */ /* */ typedef int (*FT_Raster_SetModeFunc)( FT_Raster raster, unsigned long mode, void* args ); #define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Raster_RenderFunc */ /* */ /* <Description> */ /* Invoke a given raster to scan-convert a given glyph image into a */ /* target bitmap. */ /* */ /* <Input> */ /* raster :: A handle to the raster object. */ /* */ /* params :: A pointer to an @FT_Raster_Params structure used to */ /* store the rendering parameters. */ /* */ /* <Return> */ /* Error code. 0~means success. */ /* */ /* <Note> */ /* The exact format of the source image depends on the raster's glyph */ /* format defined in its @FT_Raster_Funcs structure. It can be an */ /* @FT_Outline or anything else in order to support a large array of */ /* glyph formats. */ /* */ /* Note also that the render function can fail and return a */ /* `FT_Err_Unimplemented_Feature' error code if the raster used does */ /* not support direct composition. */ /* */ /* XXX: For now, the standard raster doesn't support direct */ /* composition but this should change for the final release (see */ /* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */ /* for examples of distinct implementations which support direct */ /* composition). */ /* */ typedef int (*FT_Raster_RenderFunc)( FT_Raster raster, const FT_Raster_Params* params ); #define FT_Raster_Render_Func FT_Raster_RenderFunc /*************************************************************************/ /* */ /* <Struct> */ /* FT_Raster_Funcs */ /* */ /* <Description> */ /* A structure used to describe a given raster class to the library. */ /* */ /* <Fields> */ /* glyph_format :: The supported glyph format for this raster. */ /* */ /* raster_new :: The raster constructor. */ /* */ /* raster_reset :: Used to reset the render pool within the raster. */ /* */ /* raster_render :: A function to render a glyph into a given bitmap. */ /* */ /* raster_done :: The raster destructor. */ /* */ typedef struct FT_Raster_Funcs_ { FT_Glyph_Format glyph_format; FT_Raster_NewFunc raster_new; FT_Raster_ResetFunc raster_reset; FT_Raster_SetModeFunc raster_set_mode; FT_Raster_RenderFunc raster_render; FT_Raster_DoneFunc raster_done; } FT_Raster_Funcs; /* */ FT_END_HEADER #endif /* __FTIMAGE_H__ */ /* END */ /* Local Variables: */ /* coding: utf-8 */ /* End: */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� * * FT_VALIDATE_MATH :: * Validate MATH table. * * FT_VALIDATE_OT :: * Validate all OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). * */ #define FT_VALIDATE_BASE 0x0100 #define FT_VALIDATE_GDEF 0x0200 #define FT_VALIDATE_GPOS 0x0400 #define FT_VALIDATE_GSUB 0x0800 #define FT_VALIDATE_JSTF 0x1000 #define FT_VALIDATE_MATH 0x2000 #define FT_VALIDATE_OT FT_VALIDATE_BASE | \ FT_VALIDATE_GDEF | \ FT_VALIDATE_GPOS | \ FT_VALIDATE_GSUB | \ FT_VALIDATE_JSTF | \ FT_VALIDATE_MATH /* */ /********************************************************************** * * @function: * FT_OpenType_Validate * * @description: * Validate various OpenType tables to assure that all offsets and * indices are valid. The idea is that a higher-level library which * actually does the text layout can access those tables without * error checking (which can be quite time consuming). * * @input: * face :: * A handle to the input face. * * validation_flags :: * A bit field which specifies the tables to be validated. See * @FT_VALIDATE_OTXXX for possible values. * * @output: * BASE_table :: * A pointer to the BASE table. * * GDEF_table :: * A pointer to the GDEF table. * * GPOS_table :: * A pointer to the GPOS table. * * GSUB_table :: * A pointer to the GSUB table. * * JSTF_table :: * A pointer to the JSTF table. * * @return: * FreeType error code. 0~means success. * * @note: * This function only works with OpenType fonts, returning an error * otherwise. * * After use, the application should deallocate the five tables with * @FT_OpenType_Free. A NULL value indicates that the table either * doesn't exist in the font, or the application hasn't asked for * validation. */ FT_EXPORT( FT_Error ) FT_OpenType_Validate( FT_Face face, FT_UInt validation_flags, FT_Bytes *BASE_table, FT_Bytes *GDEF_table, FT_Bytes *GPOS_table, FT_Bytes *GSUB_table, FT_Bytes *JSTF_table ); /* */ /********************************************************************** * * @function: * FT_OpenType_Free * * @description: * Free the buffer allocated by OpenType validator. * * @input: * face :: * A handle to the input face. * * table :: * The pointer to the buffer that is allocated by * @FT_OpenType_Validate. * * @note: * This function must be used to free the buffer allocated by * @FT_OpenType_Validate only. */ FT_EXPORT( void ) FT_OpenType_Free( FT_Face face, FT_Bytes table ); /* */ FT_END_HEADER #endif /* __FTOTVAL_H__ */ /* END */ ��������������������������������6�������������������������������������������������6P�����6�������������������������������������������������6P�����6�����������������������������������������������8P�����8�������������������� �������������������������������������8���������������������������������������������������������:�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������WP�����W�������������������������������������������������WP�����W�������������������������������������������������WP�����W�������������������������������������������������WP�����W������������������������������������������������XP�����X������(����������������������������������������������������X���������������������������������������������������������Z������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftmac.h */ /* */ /* Additional Mac-specific API. */ /* */ /* Copyright 1996-2001, 2004, 2006, 2007 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /***************************************************************************/ /* */ /* NOTE: Include this file after <freetype/freetype.h> and after any */ /* Mac-specific headers (because this header uses Mac types such as */ /* Handle, FSSpec, FSRef, etc.) */ /* */ /***************************************************************************/ #ifndef __FTMAC_H__ #define __FTMAC_H__ #include <ft2build.h> FT_BEGIN_HEADER /* gcc-3.4.1 and later can warn about functions tagged as deprecated */ #ifndef FT_DEPRECATED_ATTRIBUTE #if defined(__GNUC__) && \ ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) #define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) #else #define FT_DEPRECATED_ATTRIBUTE #endif #endif /*************************************************************************/ /* */ /* <Section> */ /* mac_specific */ /* */ /* <Title> */ /* Mac Specific Interface */ /* */ /* <Abstract> */ /* Only available on the Macintosh. */ /* */ /* <Description> */ /* The following definitions are only available if FreeType is */ /* compiled on a Macintosh. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Function> */ /* FT_New_Face_From_FOND */ /* */ /* <Description> */ /* Create a new face object from a FOND resource. */ /* */ /* <InOut> */ /* library :: A handle to the library resource. */ /* */ /* <Input> */ /* fond :: A FOND resource. */ /* */ /* face_index :: Only supported for the -1 `sanity check' special */ /* case. */ /* */ /* <Output> */ /* aface :: A handle to a new face object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Notes> */ /* This function can be used to create @FT_Face objects from fonts */ /* that are installed in the system as follows. */ /* */ /* { */ /* fond = GetResource( 'FOND', fontName ); */ /* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */ /* } */ /* */ FT_EXPORT( FT_Error ) FT_New_Face_From_FOND( FT_Library library, Handle fond, FT_Long face_index, FT_Face *aface ) FT_DEPRECATED_ATTRIBUTE; /*************************************************************************/ /* */ /* <Function> */ /* FT_GetFile_From_Mac_Name */ /* */ /* <Description> */ /* Return an FSSpec for the disk file containing the named font. */ /* */ /* <Input> */ /* fontName :: Mac OS name of the font (e.g., Times New Roman */ /* Bold). */ /* */ /* <Output> */ /* pathSpec :: FSSpec to the file. For passing to */ /* @FT_New_Face_From_FSSpec. */ /* */ /* face_index :: Index of the face. For passing to */ /* @FT_New_Face_From_FSSpec. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_GetFile_From_Mac_Name( const char* fontName, FSSpec* pathSpec, FT_Long* face_index ) FT_DEPRECATED_ATTRIBUTE; /*************************************************************************/ /* */ /* <Function> */ /* FT_GetFile_From_Mac_ATS_Name */ /* */ /* <Description> */ /* Return an FSSpec for the disk file containing the named font. */ /* */ /* <Input> */ /* fontName :: Mac OS name of the font in ATS framework. */ /* */ /* <Output> */ /* pathSpec :: FSSpec to the file. For passing to */ /* @FT_New_Face_From_FSSpec. */ /* */ /* face_index :: Index of the face. For passing to */ /* @FT_New_Face_From_FSSpec. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_GetFile_From_Mac_ATS_Name( const char* fontName, FSSpec* pathSpec, FT_Long* face_index ) FT_DEPRECATED_ATTRIBUTE; /*************************************************************************/ /* */ /* <Function> */ /* FT_GetFilePath_From_Mac_ATS_Name */ /* */ /* <Description> */ /* Return a pathname of the disk file and face index for given font */ /* name which is handled by ATS framework. */ /* */ /* <Input> */ /* fontName :: Mac OS name of the font in ATS framework. */ /* */ /* <Output> */ /* path :: Buffer to store pathname of the file. For passing */ /* to @FT_New_Face. The client must allocate this */ /* buffer before calling this function. */ /* */ /* maxPathSize :: Lengths of the buffer `path' that client allocated. */ /* */ /* face_index :: Index of the face. For passing to @FT_New_Face. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_GetFilePath_From_Mac_ATS_Name( const char* fontName, UInt8* path, UInt32 maxPathSize, FT_Long* face_index ) FT_DEPRECATED_ATTRIBUTE; /*************************************************************************/ /* */ /* <Function> */ /* FT_New_Face_From_FSSpec */ /* */ /* <Description> */ /* Create a new face object from a given resource and typeface index */ /* using an FSSpec to the font file. */ /* */ /* <InOut> */ /* library :: A handle to the library resource. */ /* */ /* <Input> */ /* spec :: FSSpec to the font file. */ /* */ /* face_index :: The index of the face within the resource. The */ /* first face has index~0. */ /* <Output> */ /* aface :: A handle to a new face object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* @FT_New_Face_From_FSSpec is identical to @FT_New_Face except */ /* it accepts an FSSpec instead of a path. */ /* */ FT_EXPORT( FT_Error ) FT_New_Face_From_FSSpec( FT_Library library, const FSSpec *spec, FT_Long face_index, FT_Face *aface ) FT_DEPRECATED_ATTRIBUTE; /*************************************************************************/ /* */ /* <Function> */ /* FT_New_Face_From_FSRef */ /* */ /* <Description> */ /* Create a new face object from a given resource and typeface index */ /* using an FSRef to the font file. */ /* */ /* <InOut> */ /* library :: A handle to the library resource. */ /* */ /* <Input> */ /* spec :: FSRef to the font file. */ /* */ /* face_index :: The index of the face within the resource. The */ /* first face has index~0. */ /* <Output> */ /* aface :: A handle to a new face object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* /***************************************************************************/ /* */ /* ftmm.h */ /* */ /* FreeType Multiple Master font interface (specification). */ /* */ /* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTMM_H__ #define __FTMM_H__ #include <ft2build.h> #include FT_TYPE1_TABLES_H FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* multiple_masters */ /* */ /* <Title> */ /* Multiple Masters */ /* */ /* <Abstract> */ /* How to manage Multiple Masters fonts. */ /* */ /* <Description> */ /* The following types and functions are used to manage Multiple */ /* Master fonts, i.e., the selection of specific design instances by */ /* setting design axis coordinates. */ /* */ /* George Williams has extended this interface to make it work with */ /* both Type~1 Multiple Masters fonts and GX distortable (var) */ /* fonts. Some of these routines only work with MM fonts, others */ /* will work with both types. They are similar enough that a */ /* consistent interface makes sense. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Struct> */ /* FT_MM_Axis */ /* */ /* <Description> */ /* A simple structure used to model a given axis in design space for */ /* Multiple Masters fonts. */ /* */ /* This structure can't be used for GX var fonts. */ /* */ /* <Fields> */ /* name :: The axis's name. */ /* */ /* minimum :: The axis's minimum design coordinate. */ /* */ /* maximum :: The axis's maximum design coordinate. */ /* */ typedef struct FT_MM_Axis_ { FT_String* name; FT_Long minimum; FT_Long maximum; } FT_MM_Axis; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Multi_Master */ /* */ /* <Description> */ /* A structure used to model the axes and space of a Multiple Masters */ /* font. */ /* */ /* This structure can't be used for GX var fonts. */ /* */ /* <Fields> */ /* num_axis :: Number of axes. Cannot exceed~4. */ /* */ /* num_designs :: Number of designs; should be normally 2^num_axis */ /* even though the Type~1 specification strangely */ /* allows for intermediate designs to be present. This */ /* number cannot exceed~16. */ /* */ /* axis :: A table of axis descriptors. */ /* */ typedef struct FT_Multi_Master_ { FT_UInt num_axis; FT_UInt num_designs; FT_MM_Axis axis[T1_MAX_MM_AXIS]; } FT_Multi_Master; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Var_Axis */ /* */ /* <Description> */ /* A simple structure used to model a given axis in design space for */ /* Multiple Masters and GX var fonts. */ /* */ /* <Fields> */ /* name :: The axis's name. */ /* Not always meaningful for GX. */ /* */ /* minimum :: The axis's minimum design coordinate. */ /* */ /* def :: The axis's default design coordinate. */ /* FreeType computes meaningful default values for MM; it */ /* is then an integer value, not in 16.16 format. */ /* */ /* maximum :: The axis's maximum design coordinate. */ /* */ /* tag :: The axis's tag (the GX equivalent to `name'). */ /* FreeType provides default values for MM if possible. */ /* */ /* strid :: The entry in `name' table (another GX version of */ /* `name'). */ /* Not meaningful for MM. */ /* */ typedef struct FT_Var_Axis_ { FT_String* name; FT_Fixed minimum; FT_Fixed def; FT_Fixed maximum; FT_ULong tag; FT_UInt strid; } FT_Var_Axis; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Var_Named_Style */ /* */ /* <Description> */ /* A simple structure used to model a named style in a GX var font. */ /* */ /* This structure can't be used for MM fonts. */ /* */ /* <Fields> */ /* coords :: The design coordinates for this style. */ /* This is an array with one entry for each axis. */ /* */ /* strid :: The entry in `name' table identifying this style. */ /* */ typedef struct FT_Var_Named_Style_ { FT_Fixed* coords; FT_UInt strid; } FT_Var_Named_Style; /*************************************************************************/ /* */ /* <Struct> */ /* FT_MM_Var */ /* */ /* <Description> */ /* A structure used to model the axes and space of a Multiple Masters */ /* or GX var distortable font. */ /* */ /* Some fields are specific to one format and not to the other. */ /* */ /* <Fields> */ /* num_axis :: The number of axes. The maximum value is~4 for */ /* MM; no limit in GX. */ /* */ /* num_designs :: The number of designs; should be normally */ /* 2^num_axis for MM fonts. Not meaningful for GX */ /* (where every glyph could have a different */ /* number of designs). */ /* */ /* num_namedstyles :: The number of named styles; only meaningful for */ /* GX which allows certain design coordinates to */ /* have a string ID (in the `name' table) */ /* associated with them. The font can tell the */ /* user that, for example, Weight=1.5 is `Bold'. */ /* */ /* axis :: A table of axis descriptors. */ /* GX fonts contain slightly more data than MM. */ /* */ /* namedstyles :: A table of named styles. */ /* Only meaningful with GX. */ /* */ typedef struct FT_MM_Var_ { FT_UInt num_axis; FT_UInt num_designs; FT_UInt num_namedstyles; FT_Var_Axis* axis; FT_Var_Named_Style* namedstyle; } FT_MM_Var; /* */ /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Multi_Master */ /* */ /* <Description> */ /* Retrieve the Multiple Master descriptor of a given font. */ /* */ /* This function can't be used with GX fonts. */ /* */ /* <Input> */ /* face :: A handle to the source face. */ /* */ /* <Output> */ /* amaster :: The Multiple Masters descriptor. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Get_Multi_Master( FT_Face face, FT_Multi_Master *amaster ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_MM_Var */ /* */ /* <Description> */ /* Retrieve the Multiple Master/GX var descriptor of a given font. */ /* */ /* <Input> */ /* face :: A handle to the source face. */ /* */ /* <Output> */ /* amaster :: The Multiple Masters/GX var descriptor. */ /* Allocates a data structure, which the user must free */ /* (a single call to FT_FREE will do it). */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Get_MM_Var( FT_Face face, FT_MM_Var* *amaster ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Set_MM_Design_Coordinates */ /* */ /* <Description> */ /* For Multiple Masters fonts, choose an interpolated font design */ /* through design coordinates. */ /* */ /* This function can't be used with GX fonts. */ /* */ /* <InOut> */ /* face :: A handle to the source face. */ /* */ /* <Input> */ /* num_coords :: The number of design coordinates (must be equal to */ /* the number of axes in the font). */ /* */ /* coords :: An array of design coordinates. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Set_MM_Design_Coordinates( FT_Face face, FT_UInt num_coords, FT_Long* coords ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Set_Var_Design_Coordinates */ /* */ /* <Description> */ /* For Multiple Master or GX Var fonts, choose an interpolated font */ /* design through design coordinates. */ /* */ /* <InOut> */ /* face :: A handle to the source face. */ /* */ /* <Input> */ /* num_coords :: The number of design coordinates (must be equal to */ /* the number of axes in the font). */ /* */ /* coords :: An array of design coordinates. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Set_Var_Design_Coordinates( FT_Face face, FT_UInt num_coords, FT_Fixed* coords ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Set_MM_Blend_Coordinates */ /* */ /* <Description> */ /* For Multiple Masters and GX var fonts, choose an interpolated font */ /* design through normalized blend coordinates. */ /* */ /* <InOut> */ /* face :: A handle to the source face. */ /* */ /* <Input> */ /* num_coords :: The number of design coordinates (must be equal to */ /* the number of axes in the font). */ /* */ /* coords :: The design coordinates array (each element must be */ /* between 0 and 1.0). */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Set_MM_Blend_Coordinates( FT_Face face, FT_UInt num_coords, FT_Fixed* coords ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Set_Var_Blend_Coordinates */ /* */ /* <Description> */ /* This is another name of @FT_Set_MM_Blend_Coordinates. */ /* */ FT_EXPORT( FT_Error ) FT_Set_Var_Blend_Coordinates( FT_Face face, FT_UInt num_coords, FT_Fixed* coords ); /* */ FT_END_HEADER #endif /* __FTMM_H__ */ /* END */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������E, RELATIVE_TO_END_TIME } timetype; #define TIME_OK NULL struct rrd_time_value { timetype type; long offset; struct tm tm; }; char *parsetime(const char *spec, struct rrd_time_value *ptv); /* END parsetime.h */ struct rrd_context { int len; int errlen; char *lib_errstr; char *rrd_error; }; /* returns the current per-thread rrd_context */ struct rrd_context *rrd_get_context(void); int proc_start_end (struct rrd_time_value *, struct rrd_time_value *, time_t *, time_t *); /* HELPER FUNCTIONS */ void rrd_set_error(char *,...); void rrd_clear_error(void); int rrd_test_error(void); char *rrd_get_error(void); /** MULTITHREADED HELPER FUNCTIONS */ struct rrd_context *rrd_new_context(void); void rrd_free_context (struct rrd_context *buf); /* void rrd_set_error_r (struct rrd_context *, char *, ...); */ /* void rrd_clear_error_r(struct rrd_context *); */ /* int rrd_test_error_r (struct rrd_context *); */ /* char *rrd_get_error_r (struct rrd_context *); */ int LockRRD(FILE *); #endif /* _RRDLIB_H */ #ifdef __cplusplus } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftmodapi.h */ /* */ /* FreeType modules public interface (specification). */ /* */ /* Copyright 1996-2001, 2002, 2003, 2006, 2008, 2009, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTMODAPI_H__ #define __FTMODAPI_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* module_management */ /* */ /* <Title> */ /* Module Management */ /* */ /* <Abstract> */ /* How to add, upgrade, and remove modules from FreeType. */ /* */ /* <Description> */ /* The definitions below are used to manage modules within FreeType. */ /* Modules can be added, upgraded, and removed at runtime. */ /* */ /*************************************************************************/ /* module bit flags */ #define FT_MODULE_FONT_DRIVER 1 /* this module is a font driver */ #define FT_MODULE_RENDERER 2 /* this module is a renderer */ #define FT_MODULE_HINTER 4 /* this module is a glyph hinter */ #define FT_MODULE_STYLER 8 /* this module is a styler */ #define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */ /* scalable fonts */ #define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */ /* support vector outlines */ #define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */ /* own hinter */ /* deprecated values */ #define ft_module_font_driver FT_MODULE_FONT_DRIVER #define ft_module_renderer FT_MODULE_RENDERER #define ft_module_hinter FT_MODULE_HINTER #define ft_module_styler FT_MODULE_STYLER #define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE #define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES #define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER typedef FT_Pointer FT_Module_Interface; /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Module_Constructor */ /* */ /* <Description> */ /* A function used to initialize (not create) a new module object. */ /* */ /* <Input> */ /* module :: The module to initialize. */ /* */ typedef FT_Error (*FT_Module_Constructor)( FT_Module module ); /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Module_Destructor */ /* */ /* <Description> */ /* A function used to finalize (not destroy) a given module object. */ /* */ /* <Input> */ /* module :: The module to finalize. */ /* */ typedef void (*FT_Module_Destructor)( FT_Module module ); /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Module_Requester */ /* */ /* <Description> */ /* A function used to query a given module for a specific interface. */ /* */ /* <Input> */ /* module :: The module to finalize. */ /* */ /* name :: The name of the interface in the module. */ /* */ typedef FT_Module_Interface (*FT_Module_Requester)( FT_Module module, const char* name ); /*************************************************************************/ /* */ /* <Struct> */ /* FT_Module_Class */ /* */ /* <Description> */ /* The module class descriptor. */ /* */ /* <Fields> */ /* module_flags :: Bit flags describing the module. */ /* */ /* module_size :: The size of one module object/instance in */ /* bytes. */ /* */ /* module_name :: The name of the module. */ /* */ /* module_version :: The version, as a 16.16 fixed number */ /* (major.minor). */ /* */ /* module_requires :: The version of FreeType this module requires, */ /* as a 16.16 fixed number (major.minor). Starts */ /* at version 2.0, i.e., 0x20000. */ /* */ /* module_init :: The initializing function. */ /* */ /* module_done :: The finalizing function. */ /* */ /* get_interface :: The interface requesting function. */ /* */ typedef struct FT_Module_Class_ { FT_ULong module_flags; FT_Long module_size; const FT_String* module_name; FT_Fixed module_version; FT_Fixed module_requires; const void* module_interface; FT_Module_Constructor module_init; FT_Module_Destructor module_done; FT_Module_Requester get_interface; } FT_Module_Class; /*************************************************************************/ /* */ /* <Function> */ /* FT_Add_Module */ /* */ /* <Description> */ /* Add a new module to a given library instance. */ /* */ /* <InOut> */ /* library :: A handle to the library object. */ /* */ /* <Input> */ /* clazz :: A pointer to class descriptor for the module. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* An error will be returned if a module already exists by that name, */ /* or if the module requires a version of FreeType that is too great. */ /* */ FT_EXPORT( FT_Error ) FT_Add_Module( FT_Library library, const FT_Module_Class* clazz ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Module */ /* */ /* <Description> */ /* Find a module by its name. */ /* */ /* <Input> */ /* library :: A handle to the library object. */ /* */ /* module_name :: The module's name (as an ASCII string). */ /* */ /* <Return> */ /* A module handle. 0~if none was found. */ /* */ /* <Note> */ /* FreeType's internal modules aren't documented very well, and you */ /* should look up the source code for details. */ /* */ FT_EXPORT( FT_Module ) FT_Get_Module( FT_Library library, const char* module_name ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Remove_Module */ /* */ /* <Description> */ /* Remove a given module from a library instance. */ /* */ /* <InOut> */ /* library :: A handle to a library object. */ /* */ /* <Input> */ /* module :: A handle to a module object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The module object is destroyed by the function in case of success. */ /* */ FT_EXPORT( FT_Error ) FT_Remove_Module( FT_Library library, FT_Module module ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Reference_Library */ /* */ /* <Description> */ /* A counter gets initialized to~1 at the time an @FT_Library */ /* structure is created. This function increments the counter. */ /* @FT_Done_Library then only destroys a library if the counter is~1, */ /* otherwise it simply decrements the counter. */ /* */ /* This function helps in managing life-cycles of structures which */ /* reference @FT_Library objects. */ /* */ /* <Input> */ /* library :: A handle to a target library object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Since> */ /* 2.4.2 */ /* */ FT_EXPORT( FT_Error ) FT_Reference_Library( FT_Library library ); /*************************************************************************/ /* */ /* <Function> */ /* FT_New_Library */ /* */ /* <Description> */ /* This function is used to create a new FreeType library instance */ /* from a given memory object. It is thus possible to use libraries */ /* with distinct memory allocators within the same program. */ /* */ /* Normally, you would call this function (followed by a call to */ /* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */ /* instead of @FT_Init_FreeType to initialize the FreeType library. */ /* */ /* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */ /* library instance. */ /* */ /* <Input> */ /* memory :: A handle to the original memory object. */ /* */ /* <Output> */ /* alibrary :: A pointer to handle of a new library object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* See the discussion of reference counters in the description of */ /* @FT_Reference_Library. */ /* */ FT_EXPORT( FT_Error ) FT_New_Library( FT_Memory memory, FT_Library *alibrary ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Done_Library */ /* */ /* <Description> */ /* Discard a given library object. This closes all drivers and */ /* discards all resource objects. */ /* */ /* <Input> */ /* library :: A handle to the target library. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* See the discussion of reference counters in the description of */ /* @FT_Reference_Library. */ /* */ FT_EXPORT( FT_Error ) FT_Done_Library( FT_Library library ); /* */ typedef void (*FT_DebugHook_Func)( void* arg ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Set_Debug_Hook */ /* */ /* <Description> */ /* Set a debug hook function for debugging the interpreter of a font */ /* format. */ /* */ /* <InOut> */ /* library :: A handle to the library object. */ /* */ /* <Input> */ /* hook_index :: The index of the debug hook. You should use the */ /* values defined in `ftobjs.h', e.g., */ /* `FT_DEBUG_HOOK_TRUETYPE'. */ /* */ /* debug_hook :: The function used to debug the interpreter. */ /* */ /* <Note> */ /* Currently, four debug hook slots are available, but only two (for */ /* the TrueType and the Type~1 interpreter) are defined. */ /* */ /* Since the internal headers of FreeType are no longer installed, */ /* the symbol `FT_DEBUG_HOOK_TRUETYPE' isn't available publicly. */ /* This is a bug and will be fixed in a forthcoming release. */ /* */ FT_EXPORT( void ) FT_Set_Debug_Hook( FT_Library library, FT_UInt hook_index, FT_DebugHook_Func debug_hook ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Add_Default_Modules */ /* */ /* <Description> */ /* Add the set of default drivers to a given library object. */ /* This is only useful when you create a library object with */ /* @FT_New_Library (usually to plug a custom memory manager). */ /* */ /* <InOut> */ /* library :: A handle to a new library object. */ /* */ FT_EXPORT( void ) FT_Add_Default_Modules( FT_Library library ); /************************************************************************** * * @section: * truetype_engine * * @title: * The TrueType Engine * * @abstract: * TrueType bytecode support. * * @description: * This section contains a function used to query the level of TrueType * bytecode support compiled in this version of the library. * */ /************************************************************************** * * @enum: * FT_TrueTypeEngineType * * @description: * A list of values describing which kind of TrueType bytecode * engine is implemented in a given FT_Library instance. It is used * by the @FT_Get_TrueType_Engine_Type function. * * @values: * FT_TRUETYPE_ENGINE_TYPE_NONE :: * The library doesn't implement any kind of bytecode interpreter. * * FT_TRUETYPE_ENGINE_TYPE_UNPATENTED :: * The library implements a bytecode interpreter that doesn't * support the patented operations of the TrueType virtual machine. * * Its main use is to load certain Asian fonts which position and * scale glyph components with bytecode instructions. It produces * bad output for most other fonts. * * FT_TRUETYPE_ENGINE_TYPE_PATENTED :: * The library implements a bytecode interpreter that covers * the full instruction set of the TrueType virtual machine (this * was governed by patents until May 2010, hence the name). * * @since: * 2.2 * */ typedef enum FT_TrueTypeEngineType_ { FT_TRUETYPE_ENGINE_TYPE_NONE = 0, FT_TRUETYPE_ENGINE_TYPE_UNPATENTED, FT_TRUETYPE_ENGINE_TYPE_PATENTED } FT_TrueTypeEngineType; /************************************************************************** * * @func: * FT_Get_TrueType_Engine_Type * * @description: * Return an @FT_TrueTypeEngineType value to indicate which level of * the TrueType virtual machine a given library instance supports. * * @input: * library :: * A library instance. * * @return: * A value indicating which level is supported. * * @since: * 2.2 * */ FT_EXPORT( FT_TrueTypeEngineType ) FT_Get_TrueType_Engine_Type( FT_Library library ); /* */ FT_END_HEADER #endif /* __FTMODAPI_H__ */ /* END */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������P@�����P������h��������������������������/�������������@����������������������������������������7���o�������^ @�����^ ������^����������������������������D���o������� @����� ������ ����������������������������S������������� @����� ������`����������������������������]�������������@ @�����@ ���������������� �����������������g�������������@ @�����@ ������������������������������������b�������������T @�����T ����������������������������������m�������������p@�����p�����������������������������������s�������������8 @�����8 ������������������������������������y�������������` @�����` �������������������� ����������������������������&@�����&��������������������������������������������������'P������'��������������������� ����������������������������'P�����'������������������������������������������������)P�����)����������������������������������������������8+P�����8+�������������������������������������������������H+P�����H+�������������������������������������������������X+P�����X+�������������������������������������������������`+P�����`+�����������������������������������������������,P�����,����������������������������������������������������������,���������������������������������������������������������$.����������������������������������������������������������������������������������������������������������������������������������������������������������������������������L��� �.���K��� �..��M����config�S���� freetype.h�>T���� ftadvanc.h�>U����ftbbox.h�>V����ftbdf.h�W���� ftbitmap.h�>X���� ftcache.h�>Y���� ftchapters.h�Z����ftcid.h�[���� fterrdef.h�>\���� fterrors.h�>]����ftgasp.h�>^���� ftglyph.h�>_���� ftgxval.h�>`����ftgzip.h�>a���� ftimage.h�>b���� ftincrem.h�>c���� ftlcdfil.h�>d����ftlist.h�>e����ftlzw.h�f����ftmac.h�g����ftmm.h�h���� ftmodapi.h�>i���� ftmoderr.h�>j���� ftotval.h�>��������k���� ftoutln.h�>l����ftpfr.h�m���� ftrender.h�>n���� ftsizes.h�>o���� ftsnames.h�>p���� ftstroke.h�>q���� ftsynth.h�>r���� ftsystem.h�>s���� fttrigon.h�>t���� fttypes.h�>u���� ftwinfnt.h�>v����ftxf86.h�>w���� t1tables.h�>x���� ttnameid.h�>y���� tttables.h�>z����tttags.h�>{���� ttunpat.h�>��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������*aoutline_resolution, FT_UInt *ametrics_resolution, FT_Fixed *ametrics_x_scale, FT_Fixed *ametrics_y_scale ); /********************************************************************** * * @function: * FT_Get_PFR_Kerning * * @description: * Return the kerning pair corresponding to two glyphs in a PFR face. * The distance is expressed in metrics units, unlike the result of * @FT_Get_Kerning. * * @input: * face :: A handle to the input face. * * left :: Index of the left glyph. * * right :: Index of the right glyph. * * @output: * avector :: A kerning vector. * * @return: * FreeType error code. 0~means success. * * @note: * This function always return distances in original PFR metrics * units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED * mode, which always returns distances converted to outline units. * * You can use the value of the `x_scale' and `y_scale' parameters * returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels. */ FT_EXPORT( FT_Error ) FT_Get_PFR_Kerning( FT_Face face, FT_UInt left, FT_UInt right, FT_Vector *avector ); /********************************************************************** * * @function: * FT_Get_PFR_Advance * * @description: * Return a given glyph advance, expressed in original metrics units, * from a PFR font. * * @input: * face :: A handle to the input face. * * gindex :: The glyph index. * * @output: * aadvance :: The glyph advance in metrics units. * * @return: * FreeType error code. 0~means success. * * @note: * You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics * to convert the advance to device sub-pixels (i.e., 1/64th of pixels). */ FT_EXPORT( FT_Error ) FT_Get_PFR_Advance( FT_Face face, FT_UInt gindex, FT_Pos *aadvance ); /* */ FT_END_HEADER #endif /* __FTPFR_H__ */ /* END */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: FreeType 2 Description: A free, high-quality, and portable font engine. Version: 12.2.6 Requires: Libs: -L${libdir} -lfreetype Libs.private: -lz Cflags: -I${includedir}/freetype2 -I${includedir} ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftoutln.h */ /* */ /* Support for the FT_Outline type used to store glyph shapes of */ /* most scalable font formats (specification). */ /* */ /* Copyright 1996-2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTOUTLN_H__ #define __FTOUTLN_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* outline_processing */ /* */ /* <Title> */ /* Outline Processing */ /* */ /* <Abstract> */ /* Functions to create, transform, and render vectorial glyph images. */ /* */ /* <Description> */ /* This section contains routines used to create and destroy scalable */ /* glyph images known as `outlines'. These can also be measured, */ /* transformed, and converted into bitmaps and pixmaps. */ /* */ /* <Order> */ /* FT_Outline */ /* FT_OUTLINE_FLAGS */ /* FT_Outline_New */ /* FT_Outline_Done */ /* FT_Outline_Copy */ /* FT_Outline_Translate */ /* FT_Outline_Transform */ /* FT_Outline_Embolden */ /* FT_Outline_Reverse */ /* FT_Outline_Check */ /* */ /* FT_Outline_Get_CBox */ /* FT_Outline_Get_BBox */ /* */ /* FT_Outline_Get_Bitmap */ /* FT_Outline_Render */ /* */ /* FT_Outline_Decompose */ /* FT_Outline_Funcs */ /* FT_Outline_MoveTo_Func */ /* FT_Outline_LineTo_Func */ /* FT_Outline_ConicTo_Func */ /* FT_Outline_CubicTo_Func */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_Decompose */ /* */ /* <Description> */ /* Walk over an outline's structure to decompose it into individual */ /* segments and Bézier arcs. This function also emits `move to' */ /* operations to indicate the start of new contours in the outline. */ /* */ /* <Input> */ /* outline :: A pointer to the source target. */ /* */ /* func_interface :: A table of `emitters', i.e., function pointers */ /* called during decomposition to indicate path */ /* operations. */ /* */ /* <InOut> */ /* user :: A typeless pointer which is passed to each */ /* emitter during the decomposition. It can be */ /* used to store the state during the */ /* decomposition. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Outline_Decompose( FT_Outline* outline, const FT_Outline_Funcs* func_interface, void* user ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_New */ /* */ /* <Description> */ /* Create a new outline of a given size. */ /* */ /* <Input> */ /* library :: A handle to the library object from where the */ /* outline is allocated. Note however that the new */ /* outline will *not* necessarily be *freed*, when */ /* destroying the library, by @FT_Done_FreeType. */ /* */ /* numPoints :: The maximal number of points within the outline. */ /* */ /* numContours :: The maximal number of contours within the outline. */ /* */ /* <Output> */ /* anoutline :: A handle to the new outline. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The reason why this function takes a `library' parameter is simply */ /* to use the library's memory allocator. */ /* */ FT_EXPORT( FT_Error ) FT_Outline_New( FT_Library library, FT_UInt numPoints, FT_Int numContours, FT_Outline *anoutline ); FT_EXPORT( FT_Error ) FT_Outline_New_Internal( FT_Memory memory, FT_UInt numPoints, FT_Int numContours, FT_Outline *anoutline ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_Done */ /* */ /* <Description> */ /* Destroy an outline created with @FT_Outline_New. */ /* */ /* <Input> */ /* library :: A handle of the library object used to allocate the */ /* outline. */ /* */ /* outline :: A pointer to the outline object to be discarded. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* If the outline's `owner' field is not set, only the outline */ /* descriptor will be released. */ /* */ /* The reason why this function takes an `library' parameter is */ /* simply to use ft_mem_free(). */ /* */ FT_EXPORT( FT_Error ) FT_Outline_Done( FT_Library library, FT_Outline* outline ); FT_EXPORT( FT_Error ) FT_Outline_Done_Internal( FT_Memory memory, FT_Outline* outline ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_Check */ /* */ /* <Description> */ /* Check the contents of an outline descriptor. */ /* */ /* <Input> */ /* outline :: A handle to a source outline. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Outline_Check( FT_Outline* outline ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_Get_CBox */ /* */ /* <Description> */ /* Return an outline's `control box'. The control box encloses all */ /* the outline's points, including Bézier control points. Though it */ /* coincides with the exact bounding box for most glyphs, it can be */ /* slightly larger in some situations (like when rotating an outline */ /* which contains Bézier outside arcs). */ /* */ /* Computing the control box is very fast, while getting the bounding */ /* box can take much more time as it needs to walk over all segments */ /* and arcs in the outline. To get the latter, you can use the */ /* `ftbbox' component which is dedicated to this single task. */ /* */ /* <Input> */ /* outline :: A pointer to the source outline descriptor. */ /* */ /* <Output> */ /* acbox :: The outline's control box. */ /* */ FT_EXPORT( void ) FT_Outline_Get_CBox( const FT_Outline* outline, FT_BBox *acbox ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_Translate */ /* */ /* <Description> */ /* Apply a simple translation to the points of an outline. */ /* */ /* <InOut> */ /* outline :: A pointer to the target outline descriptor. */ /* */ /* <Input> */ /* xOffset :: The horizontal offset. */ /* */ /* yOffset :: The vertical offset. */ /* */ FT_EXPORT( void ) FT_Outline_Translate( const FT_Outline* outline, FT_Pos xOffset, FT_Pos yOffset ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_Copy */ /* */ /* <Description> */ /* Copy an outline into another one. Both objects must have the */ /* same sizes (number of points & number of contours) when this */ /* function is called. */ /* */ /* <Input> */ /* source :: A handle to the source outline. */ /* */ /* <Output> */ /* target :: A handle to the target outline. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Outline_Copy( const FT_Outline* source, FT_Outline *target ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_Transform */ /* */ /* <Description> */ /* Apply a simple 2x2 matrix to all of an outline's points. Useful */ /* for applying rotations, slanting, flipping, etc. */ /* */ /* <InOut> */ /* outline :: A pointer to the target outline descriptor. */ /* */ /* <Input> */ /* matrix :: A pointer to the transformation matrix. */ /* */ /* <Note> */ /* You can use @FT_Outline_Translate if you need to translate the */ /* outline's points. */ /* */ FT_EXPORT( void ) FT_Outline_Transform( const FT_Outline* outline, const FT_Matrix* matrix ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_Embolden */ /* */ /* <Description> */ /* Embolden an outline. The new outline will be at most 4~times */ /* `strength' pixels wider and higher. You may think of the left and */ /* bottom borders as unchanged. */ /* */ /* Negative `strength' values to reduce the outline thickness are */ /* possible also. */ /* */ /* <InOut> */ /* outline :: A handle to the target outline. */ /* */ /* <Input> */ /* strength :: How strong the glyph is emboldened. Expressed in */ /* 26.6 pixel format. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The used algorithm to increase or decrease the thickness of the */ /* glyph doesn't change the number of points; this means that certain */ /* situations like acute angles or intersections are sometimes */ /* handled incorrectly. */ /* */ /* If you need `better' metrics values you should call */ /* @FT_Outline_Get_CBox ot @FT_Outline_Get_BBox. */ /* */ /* Example call: */ /* */ /* { */ /* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */ /* if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE ) */ /* FT_Outline_Embolden( &face->slot->outline, strength ); */ /* } */ /* */ FT_EXPORT( FT_Error ) FT_Outline_Embolden( FT_Outline* outline, FT_Pos strength ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_Reverse */ /* */ /* <Description> */ /* Reverse the drawing direction of an outline. This is used to */ /* ensure consistent fill conventions for mirrored glyphs. */ /* */ /* <InOut> */ /* outline :: A pointer to the target outline descriptor. */ /* */ /* <Note> */ /* This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in */ /* the outline's `flags' field. */ /* */ /* It shouldn't be used by a normal client application, unless it */ /* knows what it is doing. */ /* */ FT_EXPORT( void ) FT_Outline_Reverse( FT_Outline* outline ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_Get_Bitmap */ /* */ /* <Description> */ /* Render an outline within a bitmap. The outline's image is simply */ /* OR-ed to the target bitmap. */ /* */ /* <Input> */ /* library :: A handle to a FreeType library object. */ /* */ /* outline :: A pointer to the source outline descriptor. */ /* */ /* <InOut> */ /* abitmap :: A pointer to the target bitmap descriptor. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* This function does NOT CREATE the bitmap, it only renders an */ /* outline image within the one you pass to it! Consequently, the */ /* various fields in `abitmap' should be set accordingly. */ /* */ /* It will use the raster corresponding to the default glyph format. */ /* */ /* The value of the `num_grays' field in `abitmap' is ignored. If */ /* you select the gray-level rasterizer, and you want less than 256 */ /* gray levels, you have to use @FT_Outline_Render directly. */ /* */ FT_EXPORT( FT_Error ) FT_Outline_Get_Bitmap( FT_Library library, FT_Outline* outline, const FT_Bitmap *abitmap ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Outline_Render */ /* */ /* <Description> */ /* Render an outline within a bitmap using the current scan-convert. */ /* This function uses an @FT_Raster_Params structure as an argument, */ /* allowing advanced features like direct composition, translucency, */ /* etc. */ /* */ /* <Input> */ /* library :: A handle to a FreeType library object. */ /* */ /* outline :: A pointer to the source outline descriptor. */ /* */ /* <InOut> */ /* params :: A pointer to an @FT_Raster_Params structure used to */ /* describe the rendering operation. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* You should know what you are doing and how @FT_Raster_Params works */ /* to use this function. */ /* */ /* The field `params.source' will be set to `outline' before the scan */ /* converter is called, which means that the value you give to it is */ /* actually ignored. */ /* */ /* The gray-level rasterizer always uses 256 gray levels. If you */ /* want less gray levels, you have to provide your own span callback. */ /* See the @FT_RASTER_FLAG_DIRECT value of the `flags' field in the */ /* @FT_Raster_Params structure for more details. */ /* */ FT_EXPORT( FT_Error ) FT_Outline_Render( FT_Library library, FT_Outline* outline, FT_Raster_Params* params ); /************************************************************************** * * @enum: * FT_Orientation * * @description: * A list of values used to describe an outline's contour orientation. * * The TrueType and PostScript specifications use different conventions * to determine whether outline contours should be filled or unfilled. * * @values: * FT_ORIENTATION_TRUETYPE :: * According to the TrueType specification, clockwise contours must * be filled, and counter-clockwise ones must be unfilled. * * FT_ORIENTATION_POSTSCRIPT :: * According to the PostScript specification, counter-clockwise contours * must be filled, and clockwise ones must be unfilled. * * FT_ORIENTATION_FILL_RIGHT :: * This is identical to @FT_ORIENTATION_TRUETYPE, but is used to * remember that in TrueType, everything that is to the right of * the drawing direction of a contour must be filled. * * FT_ORIENTATION_FILL_LEFT :: * This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to * remember that in PostScript, everything that is to the left of * the drawing direction of a contour must be filled. * * FT_ORIENTATION_NONE :: * The orientation cannot be determined. That is, different parts of * the glyph have different orientation. * */ typedef enum FT_Orientation_ { FT_ORIENTATION_TRUETYPE = 0, FT_ORIENTATION_POSTSCRIPT = 1, FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE, FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT, FT_ORIENTATION_NONE } FT_Orientation; /************************************************************************** * * @function: * FT_Outline_Get_Orientation * * @description: * This function analyzes a glyph outline and tries to compute its * fill orientation (see @FT_Orientation). This is done by computing * the direction of each global horizontal and/or vertical extrema * within the outline. * * Note that this will return @FT_ORIENTATION_TRUETYPE for empty * outlines. * * @input: * outline :: * A handle to the source outline. * * @return: * The orientation. * */ FT_EXPORT( FT_Orientation ) FT_Outline_Get_Orientation( FT_Outline* outline ); /* */ FT_END_HEADER #endif /* __FTOUTLN_H__ */ /* END */ /* Local Variables: */ /* coding: utf-8 */ /* End: */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftpfr.h */ /* */ /* FreeType API for accessing PFR-specific data (specification only). */ /* */ /* Copyright 2002, 2003, 2004, 2006, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTPFR_H__ #define __FTPFR_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* pfr_fonts */ /* */ /* <Title> */ /* PFR Fonts */ /* */ /* <Abstract> */ /* PFR/TrueDoc specific API. */ /* */ /* <Description> */ /* This section contains the declaration of PFR-specific functions. */ /* */ /*************************************************************************/ /********************************************************************** * * @function: * FT_Get_PFR_Metrics * * @description: * Return the outline and metrics resolutions of a given PFR face. * * @input: * face :: Handle to the input face. It can be a non-PFR face. * * @output: * aoutline_resolution :: * Outline resolution. This is equivalent to `face->units_per_EM' * for non-PFR fonts. Optional (parameter can be NULL). * * ametrics_resolution :: * Metrics resolution. This is equivalent to `outline_resolution' * for non-PFR fonts. Optional (parameter can be NULL). * * ametrics_x_scale :: * A 16.16 fixed-point number used to scale distance expressed * in metrics units to device sub-pixels. This is equivalent to * `face->size->x_scale', but for metrics only. Optional (parameter * can be NULL). * * ametrics_y_scale :: * Same as `ametrics_x_scale' but for the vertical direction. * optional (parameter can be NULL). * * @return: * FreeType error code. 0~means success. * * @note: * If the input face is not a PFR, this function will return an error. * However, in all cases, it will return valid values. */ FT_EXPORT( FT_Error ) FT_Get_PFR_Metrics( FT_Face face, FT_UInt /***************************************************************************/ /* */ /* ftrender.h */ /* */ /* FreeType renderer modules public interface (specification). */ /* */ /* Copyright 1996-2001, 2005, 2006, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTRENDER_H__ #define __FTRENDER_H__ #include <ft2build.h> #include FT_MODULE_H #include FT_GLYPH_H FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* module_management */ /* */ /*************************************************************************/ /* create a new glyph object */ typedef FT_Error (*FT_Glyph_InitFunc)( FT_Glyph glyph, FT_GlyphSlot slot ); /* destroys a given glyph object */ typedef void (*FT_Glyph_DoneFunc)( FT_Glyph glyph ); typedef void (*FT_Glyph_TransformFunc)( FT_Glyph glyph, const FT_Matrix* matrix, const FT_Vector* delta ); typedef void (*FT_Glyph_GetBBoxFunc)( FT_Glyph glyph, FT_BBox* abbox ); typedef FT_Error (*FT_Glyph_CopyFunc)( FT_Glyph source, FT_Glyph target ); typedef FT_Error (*FT_Glyph_PrepareFunc)( FT_Glyph glyph, FT_GlyphSlot slot ); /* deprecated */ #define FT_Glyph_Init_Func FT_Glyph_InitFunc #define FT_Glyph_Done_Func FT_Glyph_DoneFunc #define FT_Glyph_Transform_Func FT_Glyph_TransformFunc #define FT_Glyph_BBox_Func FT_Glyph_GetBBoxFunc #define FT_Glyph_Copy_Func FT_Glyph_CopyFunc #define FT_Glyph_Prepare_Func FT_Glyph_PrepareFunc struct FT_Glyph_Class_ { FT_Long glyph_size; FT_Glyph_Format glyph_format; FT_Glyph_InitFunc glyph_init; FT_Glyph_DoneFunc glyph_done; FT_Glyph_CopyFunc glyph_copy; FT_Glyph_TransformFunc glyph_transform; FT_Glyph_GetBBoxFunc glyph_bbox; FT_Glyph_PrepareFunc glyph_prepare; }; typedef FT_Error (*FT_Renderer_RenderFunc)( FT_Renderer renderer, FT_GlyphSlot slot, FT_UInt mode, const FT_Vector* origin ); typedef FT_Error (*FT_Renderer_TransformFunc)( FT_Renderer renderer, FT_GlyphSlot slot, const FT_Matrix* matrix, const FT_Vector* delta ); typedef void (*FT_Renderer_GetCBoxFunc)( FT_Renderer renderer, FT_GlyphSlot slot, FT_BBox* cbox ); typedef FT_Error (*FT_Renderer_SetModeFunc)( FT_Renderer renderer, FT_ULong mode_tag, FT_Pointer mode_ptr ); /* deprecated identifiers */ #define FTRenderer_render FT_Renderer_RenderFunc #define FTRenderer_transform FT_Renderer_TransformFunc #define FTRenderer_getCBox FT_Renderer_GetCBoxFunc #define FTRenderer_setMode FT_Renderer_SetModeFunc /*************************************************************************/ /* */ /* <Struct> */ /* FT_Renderer_Class */ /* */ /* <Description> */ /* The renderer module class descriptor. */ /* */ /* <Fields> */ /* root :: The root @FT_Module_Class fields. */ /* */ /* glyph_format :: The glyph image format this renderer handles. */ /* */ /* render_glyph :: A method used to render the image that is in a */ /* given glyph slot into a bitmap. */ /* */ /* transform_glyph :: A method used to transform the image that is in */ /* a given glyph slot. */ /* */ /* get_glyph_cbox :: A method used to access the glyph's cbox. */ /* */ /* set_mode :: A method used to pass additional parameters. */ /* */ /* raster_class :: For @FT_GLYPH_FORMAT_OUTLINE renderers only. */ /* This is a pointer to its raster's class. */ /* */ typedef struct FT_Renderer_Class_ { FT_Module_Class root; FT_Glyph_Format glyph_format; FT_Renderer_RenderFunc render_glyph; FT_Renderer_TransformFunc transform_glyph; FT_Renderer_GetCBoxFunc get_glyph_cbox; FT_Renderer_SetModeFunc set_mode; FT_Raster_Funcs* raster_class; } FT_Renderer_Class; /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Renderer */ /* */ /* <Description> */ /* Retrieve the current renderer for a given glyph format. */ /* */ /* <Input> */ /* library :: A handle to the library object. */ /* */ /* format :: The glyph format. */ /* */ /* <Return> */ /* A renderer handle. 0~if none found. */ /* */ /* <Note> */ /* An error will be returned if a module already exists by that name, */ /* or if the module requires a version of FreeType that is too great. */ /* */ /* To add a new renderer, simply use @FT_Add_Module. To retrieve a */ /* renderer by its name, use @FT_Get_Module. */ /* */ FT_EXPORT( FT_Renderer ) FT_Get_Renderer( FT_Library library, FT_Glyph_Format format ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Set_Renderer */ /* */ /* <Description> */ /* Set the current renderer to use, and set additional mode. */ /* */ /* <InOut> */ /* library :: A handle to the library object. */ /* */ /* <Input> */ /* renderer :: A handle to the renderer object. */ /* */ /* num_params :: The number of additional parameters. */ /* */ /* parameters :: Additional parameters. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* In case of success, the renderer will be used to convert glyph */ /* images in the renderer's known format into bitmaps. */ /* */ /* This doesn't change the current renderer for other formats. */ /* */ FT_EXPORT( FT_Error ) FT_Set_Renderer( FT_Library library, FT_Renderer renderer, FT_UInt num_params, FT_Parameter* parameters ); /* */ FT_END_HEADER #endif /* __FTRENDER_H__ */ /* END */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ����������������������������J@�����J��������������������������������������������������PP������P������l�������������� ����������������������������pSP�����pS������������������������������������������������WP�����W����������������������������������������������YP�����Y������������������������������������������������� YP����� Y�������������������������������������������������0YP�����0Y�������������������������������������������������8YP�����8Y�����������������������������������������������@ZP�����@Z������P�������������� �������������������������������������@Z������G���������������������������������������������������[��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftsizes.h */ /* */ /* FreeType size objects management (specification). */ /* */ /* Copyright 1996-2001, 2003, 2004, 2006, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /* */ /* Typical application would normally not need to use these functions. */ /* However, they have been placed in a public API for the rare cases */ /* where they are needed. */ /* */ /*************************************************************************/ #ifndef __FTSIZES_H__ #define __FTSIZES_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* sizes_management */ /* */ /* <Title> */ /* Size Management */ /* */ /* <Abstract> */ /* Managing multiple sizes per face. */ /* */ /* <Description> */ /* When creating a new face object (e.g., with @FT_New_Face), an */ /* @FT_Size object is automatically created and used to store all */ /* pixel-size dependent information, available in the `face->size' */ /* field. */ /* */ /* It is however possible to create more sizes for a given face, */ /* mostly in order to manage several character pixel sizes of the */ /* same font family and style. See @FT_New_Size and @FT_Done_Size. */ /* */ /* Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only */ /* modify the contents of the current `active' size; you thus need */ /* to use @FT_Activate_Size to change it. */ /* */ /* 99% of applications won't need the functions provided here, */ /* especially if they use the caching sub-system, so be cautious */ /* when using these. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Function> */ /* FT_New_Size */ /* */ /* <Description> */ /* Create a new size object from a given face object. */ /* */ /* <Input> */ /* face :: A handle to a parent face object. */ /* */ /* <Output> */ /* asize :: A handle to a new size object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* You need to call @FT_Activate_Size in order to select the new size */ /* for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size, */ /* @FT_Load_Glyph, @FT_Load_Char, etc. */ /* */ FT_EXPORT( FT_Error ) FT_New_Size( FT_Face face, FT_Size* size ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Done_Size */ /* */ /* <Description> */ /* Discard a given size object. Note that @FT_Done_Face */ /* automatically discards all size objects allocated with */ /* @FT_New_Size. */ /* */ /* <Input> */ /* size :: A handle to a target size object. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FT_Done_Size( FT_Size size ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Activate_Size */ /* */ /* <Description> */ /* Even though it is possible to create several size objects for a */ /* given face (see @FT_New_Size for details), functions like */ /* /***************************************************************************/ /* */ /* ftsnames.h */ /* */ /* Simple interface to access SFNT name tables (which are used */ /* to hold font names, copyright info, notices, etc.) (specification). */ /* */ /* This is _not_ used to retrieve glyph names! */ /* */ /* Copyright 1996-2001, 2002, 2003, 2006, 2009, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FT_SFNT_NAMES_H__ #define __FT_SFNT_NAMES_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* sfnt_names */ /* */ /* <Title> */ /* SFNT Names */ /* */ /* <Abstract> */ /* Access the names embedded in TrueType and OpenType files. */ /* */ /* <Description> */ /* The TrueType and OpenType specifications allow the inclusion of */ /* a special `names table' in font files. This table contains */ /* textual (and internationalized) information regarding the font, */ /* like family name, copyright, version, etc. */ /* */ /* The definitions below are used to access them if available. */ /* */ /* Note that this has nothing to do with glyph names! */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Struct> */ /* FT_SfntName */ /* */ /* <Description> */ /* A structure used to model an SFNT `name' table entry. */ /* */ /* <Fields> */ /* platform_id :: The platform ID for `string'. */ /* */ /* encoding_id :: The encoding ID for `string'. */ /* */ /* language_id :: The language ID for `string'. */ /* */ /* name_id :: An identifier for `string'. */ /* */ /* string :: The `name' string. Note that its format differs */ /* depending on the (platform,encoding) pair. It can */ /* be a Pascal String, a UTF-16 one, etc. */ /* */ /* Generally speaking, the string is not */ /* zero-terminated. Please refer to the TrueType */ /* specification for details. */ /* */ /* string_len :: The length of `string' in bytes. */ /* */ /* <Note> */ /* Possible values for `platform_id', `encoding_id', `language_id', */ /* and `name_id' are given in the file `ttnameid.h'. For details */ /* please refer to the TrueType or OpenType specification. */ /* */ /* See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */ /* @TT_ISO_ID_XXX, and @TT_MS_ID_XXX. */ /* */ typedef struct FT_SfntName_ { FT_UShort platform_id; FT_UShort encoding_id; FT_UShort language_id; FT_UShort name_id; FT_Byte* string; /* this string is *not* null-terminated! */ FT_UInt string_len; /* in bytes */ } FT_SfntName; /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Sfnt_Name_Count */ /* */ /* <Description> */ /* Retrieve the number of name strings in the SFNT `name' table. */ /* */ /* <Input> */ /* face :: A handle to the source face. */ /* */ /* <Return> */ /* The number of strings in the `name' table. */ /* */ FT_EXPORT( FT_UInt ) FT_Get_Sfnt_Name_Count( FT_Face face ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Sfnt_Name */ /* */ /* <Description> */ /* Retrieve a string of the SFNT `name' table for a given index. */ /* */ /* <Input> */ /* face :: A handle to the source face. */ /* */ /* idx :: The index of the `name' string. */ /* */ /* <Output> */ /* aname :: The indexed @FT_SfntName structure. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ /* <Note> */ /* The `string' array returned in the `aname' structure is not */ /* null-terminated. The application should deallocate it if it is no */ /* longer in use. */ /* */ /* Use @FT_Get_Sfnt_Name_Count to get the total number of available */ /* `name' table entries, then do a loop until you get the right */ /* platform, encoding, and name ID. */ /* */ FT_EXPORT( FT_Error ) FT_Get_Sfnt_Name( FT_Face face, FT_UInt idx, FT_SfntName *aname ); /*************************************************************************** * * @constant: * FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY * * @description: * A constant used as the tag of @FT_Parameter structures to make * FT_Open_Face() ignore preferred family subfamily names in `name' * table since OpenType version 1.4. For backwards compatibility with * legacy systems which has 4-face-per-family restriction. * */ #define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) /*************************************************************************** * * @constant: * FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY * * @description: * A constant used as the tag of @FT_Parameter structures to make * FT_Open_Face() ignore preferred subfamily names in `name' table since * OpenType version 1.4. For backwards compatibility with legacy * systems which has 4-face-per-family restriction. * */ #define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' ) /* */ FT_END_HEADER #endif /* __FT_SFNT_NAMES_H__ */ /* END */ �������������������������������������������������������������������������������������������������y�������������8?@�����8?������ �������������������������������������������I@������I��������������������������������������������������PP������P������ �������������� ����������������������������SP�����S������������������������������������������������VP�����V����������������������������������������������XP�����X�������������������������������������������������XP�����X�������������������������������������������������XP�����X�������������������������������������������������XP�����X������X����������������������������������������� ZP����� Z�������������������� ������������������������������������� Z���������������������������������������������������������[��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftstroke.h */ /* */ /* FreeType path stroker (specification). */ /* */ /* Copyright 2002, 2003, 2004, 2005, 2006, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FT_STROKE_H__ #define __FT_STROKE_H__ #include <ft2build.h> #include FT_OUTLINE_H #include FT_GLYPH_H FT_BEGIN_HEADER /************************************************************************ * * @section: * glyph_stroker * * @title: * Glyph Stroker * * @abstract: * Generating bordered and stroked glyphs. * * @description: * This component generates stroked outlines of a given vectorial * glyph. It also allows you to retrieve the `outside' and/or the * `inside' borders of the stroke. * * This can be useful to generate `bordered' glyph, i.e., glyphs * displayed with a coloured (and anti-aliased) border around their * shape. */ /************************************************************** * * @type: * FT_Stroker * * @description: * Opaque handler to a path stroker object. */ typedef struct FT_StrokerRec_* FT_Stroker; /************************************************************** * * @enum: * FT_Stroker_LineJoin * * @description: * These values determine how two joining lines are rendered * in a stroker. * * @values: * FT_STROKER_LINEJOIN_ROUND :: * Used to render rounded line joins. Circular arcs are used * to join two lines smoothly. * * FT_STROKER_LINEJOIN_BEVEL :: * Used to render beveled line joins; i.e., the two joining lines * are extended until they intersect. * * FT_STROKER_LINEJOIN_MITER :: * Same as beveled rendering, except that an additional line * break is added if the angle between the two joining lines * is too closed (this is useful to avoid unpleasant spikes * in beveled rendering). */ typedef enum FT_Stroker_LineJoin_ { FT_STROKER_LINEJOIN_ROUND = 0, FT_STROKER_LINEJOIN_BEVEL, FT_STROKER_LINEJOIN_MITER } FT_Stroker_LineJoin; /************************************************************** * * @enum: * FT_Stroker_LineCap * * @description: * These values determine how the end of opened sub-paths are * rendered in a stroke. * * @values: * FT_STROKER_LINECAP_BUTT :: * The end of lines is rendered as a full stop on the last * point itself. * * FT_STROKER_LINECAP_ROUND :: * The end of lines is rendered as a half-circle around the * last point. * * FT_STROKER_LINECAP_SQUARE :: * The end of lines is rendered as a square around the * last point. */ typedef enum FT_Stroker_LineCap_ { FT_STROKER_LINECAP_BUTT = 0, FT_STROKER_LINECAP_ROUND, FT_STROKER_LINECAP_SQUARE } FT_Stroker_LineCap; /************************************************************** * * @enum: * FT_StrokerBorder * * @description: * These values are used to select a given stroke border * in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder. * * @values: * FT_STROKER_BORDER_LEFT :: * Select the left border, relative to the drawing direction. * * FT_STROKER_BORDER_RIGHT :: * Select the right border, relative to the drawing direction. * * @note: * Applications are generally interested in the `inside' and `outside' * borders. However, there is no direct mapping between these and the * `left' and `right' ones, since this really depends on the glyph's * drawing orientation, which varies between font formats. * * You can however use @FT_Outline_GetInsideBorder and * @FT_Outline_GetOutsideBorder to get these. */ typedef enum FT_StrokerBorder_ { FT_STROKER_BORDER_LEFT = 0, FT_STROKER_BORDER_RIGHT } FT_StrokerBorder; /************************************************************** * * @function: * FT_Outline_GetInsideBorder * * @description: * Retrieve the @FT_StrokerBorder value corresponding to the * `inside' borders of a given outline. * * @input: * outline :: * The source outline handle. * * @return: * The border index. @FT_STROKER_BORDER_RIGHT for empty or invalid * outlines. */ FT_EXPORT( FT_StrokerBorder ) FT_Outline_GetInsideBorder( FT_Outline* outline ); /************************************************************** * * @function: * FT_Outline_GetOutsideBorder * * @description: * Retrieve the @FT_StrokerBorder value corresponding to the * `outside' borders of a given outline. * * @input: * outline :: * The source outline handle. * * @return: * The border index. @FT_STROKER_BORDER_LEFT for empty or invalid * outlines. */ FT_EXPORT( FT_StrokerBorder ) FT_Outline_GetOutsideBorder( FT_Outline* outline ); /************************************************************** * * @function: * FT_Stroker_New * * @description: * Create a new stroker object. * * @input: * library :: * FreeType library handle. * * @output: * astroker :: * A new stroker object handle. NULL in case of error. * * @return: * FreeType error code. 0~means success. */ FT_EXPORT( FT_Error ) FT_Stroker_New( FT_Library library, FT_Stroker *astroker ); /************************************************************** * * @function: * FT_Stroker_Set * * @description: * Reset a stroker object's attributes. * * @input: * stroker :: * The target stroker handle. * * radius :: * The border radius. * * line_cap :: * The line cap style. * * line_join :: * The line join style. * * miter_limit :: * The miter limit for the FT_STROKER_LINEJOIN_MITER style, * expressed as 16.16 fixed point value. * * @note: * The radius is expressed in the same units as the outline * coordinates. */ FT_EXPORT( void ) FT_Stroker_Set( FT_Stroker stroker, FT_Fixed radius, FT_Stroker_LineCap line_cap, FT_Stroker_LineJoin line_join, FT_Fixed miter_limit ); /************************************************************** * * @function: * FT_Stroker_Rewind * * @description: * Reset a stroker object without changing its attributes. * You should call this function before beginning a new * series of calls to @FT_Stroker_BeginSubPath or * @FT_Stroker_EndSubPath. * * @input: * stroker :: * The target stroker handle. */ FT_EXPORT( void ) FT_Stroker_Rewind( FT_Stroker stroker ); /************************************************************** * * @function: * FT_Stroker_ParseOutline * * @description: * A convenience function used to parse a whole outline with * the stroker. The resulting outline(s) can be retrieved * later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export. * * @input: * stroker :: * The target stroker handle. * * outline :: * The source outline. * * opened :: * A boolean. If~1, the outline is treated as an open path instead * of a closed one. * * @return: * FreeType error code. 0~means success. * * @note: * If `opened' is~0 (the default), the outline is treated as a closed * path, and the stroker generates two distinct `border' outlines. * * If `opened' is~1, the outline is processed as an open path, and the * stroker generates a single `stroke' outline. * * This function calls @FT_Stroker_Rewind automatically. */ FT_EXPORT( FT_Error ) FT_Stroker_ParseOutline( FT_Stroker stroker, FT_Outline* outline, FT_Bool opened ); /************************************************************** * * @function: * FT_Stroker_BeginSubPath * * @description: * Start a new sub-path in the stroker. * * @input: * stroker :: * The target stroker handle. * * to :: * A pointer to the start vector. * * open :: * A boolean. If~1, the sub-path is treated as an open one. * * @return: * FreeType error code. 0~means success. * * @note: * This function is useful when you need to stroke a path that is * not stored as an @FT_Outline object. */ FT_EXPORT( FT_Error ) FT_Stroker_BeginSubPath( FT_Stroker stroker, FT_Vector* to, FT_Bool open ); /************************************************************** * * @function: * FT_Stroker_EndSubPath * * @description: * Close the current sub-path in the stroker. * * @input: * stroker :: * The target stroker handle. * * @return: * FreeType error code. 0~means success. * * @note: * You should call this function after @FT_Stroker_BeginSubPath. * If the subpath was not `opened', this function `draws' a * single line segment to the start position when needed. */ FT_EXPORT( FT_Error ) FT_Stroker_EndSubPath( FT_Stroker stroker ); /************************************************************** * * @function: * FT_Stroker_LineTo * * @description: * `Draw' a single line segment in the stroker's current sub-path, * from the last position. * * @input: * stroker :: * The target stroker handle. * * to :: * A pointer to the destination point. * * @return: * FreeType error code. 0~means success. * * @note: * You should call this function between @FT_Stroker_BeginSubPath and * @FT_Stroker_EndSubPath. */ FT_EXPORT( FT_Error ) FT_Stroker_LineTo( FT_Stroker stroker, FT_Vector* to ); /************************************************************** * * @function: * FT_Stroker_ConicTo * * @description: * `Draw' a single quadratic Bézier in the stroker's current sub-path, * from the last position. * * @input: * stroker :: * The target stroker handle. * * control :: * A pointer to a Bézier control point. * * to :: * A pointer to the destination point. * * @return: * FreeType error code. 0~means success. * * @note: * You should call this function between @FT_Stroker_BeginSubPath and * @FT_Stroker_EndSubPath. */ FT_EXPORT( FT_Error ) FT_Stroker_ConicTo( FT_Stroker stroker, FT_Vector* control, FT_Vector* to ); /************************************************************** * * @function: * FT_Stroker_CubicTo * * @description: * `Draw' a single cubic Bézier in the stroker's current sub-path, * from the last position. * * @input: * stroker :: * The target stroker handle. * * control1 :: * A pointer to the first Bézier control point. * * control2 :: * A pointer to second Bézier control point. * * to :: * A pointer to the destination point. * * @return: * FreeType error code. 0~means success. * * @note: * You should call this function between @FT_Stroker_BeginSubPath and * @FT_Stroker_EndSubPath. */ FT_EXPORT( FT_Error ) FT_Stroker_CubicTo( FT_Stroker stroker, FT_Vector* control1, FT_Vector* control2, FT_Vector* to ); /************************************************************** * * @function: * FT_Stroker_GetBorderCounts * * @description: * Call this function once you have finished parsing your paths * with the stroker. It returns the number of points and * contours necessary to export one of the `border' or `stroke' * outlines generated by the stroker. * * @input: * stroker :: * The target stroker handle. * * border :: * The border index. * * @output: * anum_points :: * The number of points. * * anum_contours :: * The number of contours. * * @return: * FreeType error code. 0~means success. * * @note: * When an outline, or a sub-path, is `closed', the stroker generates * two independent `border' outlines, named `left' and `right'. * * When the outline, or a sub-path, is `opened', the stroker merges * the `border' outlines with caps. The `left' border receives all * points, while the `right' border becomes empty. * * Use the function @FT_Stroker_GetCounts instead if you want to * retrieve the counts associated to both borders. */ FT_EXPORT( FT_Error ) FT_Stroker_GetBorderCounts( FT_Stroker stroker, FT_StrokerBorder border, FT_UInt *anum_points, FT_UInt *anum_contours ); /************************************************************** * * @function: * FT_Stroker_ExportBorder * * @description: * Call this function after @FT_Stroker_GetBorderCounts to * export the corresponding border to your own @FT_Outline * structure. * * Note that this function appends the border points and * contours to your outline, but does not try to resize its * arrays. * * @input: * stroker :: * The target stroker handle. * * border :: * The border index. * * outline :: * The target outline handle. * * @note: * Always call this function after @FT_Stroker_GetBorderCounts to * get sure that there is enough room in your @FT_Outline object to * receive all new data. * * When an outline, or a sub-path, is `closed', the stroker generates * two independent `border' outlines, named `left' and `right' * * When the outline, or a sub-path, is `opened', the stroker merges * the `border' outlines with caps. The `left' border receives all * points, while the `right' border becomes empty. * * Use the function @FT_Stroker_Export instead if you want to * retrieve all borders at once. */ FT_EXPORT( void ) FT_Stroker_ExportBorder( FT_Stroker stroker, FT_StrokerBorder border, FT_Outline* outline ); /************************************************************** * * @function: * FT_Stroker_GetCounts * * @description: * Call this function once you have finished parsing your paths * with the stroker. It returns the number of points and * contours necessary to export all points/borders from the stroked * outline/path. * * @input: * stroker :: * The target stroker handle. * * @output: * anum_points :: * The number of points. * * anum_contours :: * The number of contours. * * @return: * FreeType error code. 0~means success. */ FT_EXPORT( FT_Error ) FT_Stroker_GetCounts( FT_Stroker stroker, FT_UInt *anum_points, FT_UInt *anum_contours ); /************************************************************** * * @function: * FT_Stroker_Export * * @description: * Call this function after @FT_Stroker_GetBorderCounts to * export all borders to your own @FT_Outline structure. * * Note that this function appends the border points and * contours to your outline, but does not try to resize its * arrays. * * @input: * stroker :: * The target stroker handle. * * outline :: * The target outline handle. */ FT_EXPORT( void ) FT_Stroker_Export( FT_Stroker stroker, FT_Outline* outline ); /************************************************************** * * @function: * FT_Stroker_Done * * @description: * Destroy a stroker object. * * @input: * stroker :: * A stroker handle. Can be NULL. */ FT_EXPORT( void ) FT_Stroker_Done( FT_Stroker stroker ); /************************************************************** * * @function: * FT_Glyph_Stroke * * @description: * Stroke a given outline glyph object with a given stroker. * * @inout: * pglyph :: * Source glyph handle on input, new glyph handle on output. * * @input: * stroker :: * A stroker handle. * * destroy :: * A Boolean. If~1, the source glyph object is destroyed * on success. * * @return: * FreeType error code. 0~means success. * * @note: * The source glyph is untouched in case of error. */ FT_EXPORT( FT_Error ) FT_Glyph_Stroke( FT_Glyph *pglyph, FT_Stroker stroker, FT_Bool destroy ); /************************************************************** * * @function: * FT_Glyph_StrokeBorder * * @description: * Stroke a given outline glyph object with a given stroker, but * only return either its inside or outside border. * * @inout: * pglyph :: * Source glyph handle on input, new glyph handle on output. * * @input: * stroker :: * A stroker handle. * * inside :: * A Boolean. If~1, return the inside border, otherwise * the outside border. * * destroy :: * A Boolean. If~1, the source glyph object is destroyed * on success. * * @return: * FreeType error code. 0~means success. * * @note: * The source glyph is untouched in case of error. */ FT_EXPORT( FT_Error ) FT_Glyph_StrokeBorder( FT_Glyph *pglyph, FT_Stroker stroker, FT_Bool inside, FT_Bool destroy ); /* */ FT_END_HEADER #endif /* __FT_STROKE_H__ */ /* END */ /* Local Variables: */ /* coding: utf-8 */ /* End: */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� �.������..����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftsynth.h */ /* */ /* FreeType synthesizing code for emboldening and slanting */ /* (specification). */ /* */ /* Copyright 2000-2001, 2003, 2006, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /********* *********/ /********* WARNING, THIS IS ALPHA CODE! THIS API *********/ /********* IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE *********/ /********* FREETYPE DEVELOPMENT TEAM *********/ /********* *********/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* Main reason for not lifting the functions in this module to a */ /* `standard' API is that the used parameters for emboldening and */ /* slanting are not configurable. Consider the functions as a */ /* code resource which should be copied into the application and */ /* adapted to the particular needs. */ #ifndef __FTSYNTH_H__ #define __FTSYNTH_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /* Embolden a glyph by a `reasonable' value (which is highly a matter of */ /* taste). This function is actually a convenience function, providing */ /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */ /* */ /* For emboldened outlines the metrics are estimates only; if you need */ /* precise values you should call @FT_Outline_Get_CBox. */ FT_EXPORT( void ) FT_GlyphSlot_Embolden( FT_GlyphSlot slot ); /* Slant an outline glyph to the right by about 12 degrees. */ FT_EXPORT( void ) FT_GlyphSlot_Oblique( FT_GlyphSlot slot ); /* */ FT_END_HEADER #endif /* __FTSYNTH_H__ */ /* END */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftsystem.h */ /* */ /* FreeType low-level system interface definition (specification). */ /* */ /* Copyright 1996-2001, 2002, 2005, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTSYSTEM_H__ #define __FTSYSTEM_H__ #include <ft2build.h> FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* system_interface */ /* */ /* <Title> */ /* System Interface */ /* */ /* <Abstract> */ /* How FreeType manages memory and i/o. */ /* */ /* <Description> */ /* This section contains various definitions related to memory */ /* management and i/o access. You need to understand this */ /* information if you want to use a custom memory manager or you own */ /* i/o streams. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* M E M O R Y M A N A G E M E N T */ /* */ /*************************************************************************/ /************************************************************************* * * @type: * FT_Memory * * @description: * A handle to a given memory manager object, defined with an * @FT_MemoryRec structure. * */ typedef struct FT_MemoryRec_* FT_Memory; /************************************************************************* * * @functype: * FT_Alloc_Func * * @description: * A function used to allocate `size' bytes from `memory'. * * @input: * memory :: * A handle to the source memory manager. * * size :: * The size in bytes to allocate. * * @return: * Address of new memory block. 0~in case of failure. * */ typedef void* (*FT_Alloc_Func)( FT_Memory memory, long size ); /************************************************************************* * * @functype: * FT_Free_Func * * @description: * A function used to release a given block of memory. * * @input: * memory :: * A handle to the source memory manager. * * block :: * The address of the target memory block. * */ typedef void (*FT_Free_Func)( FT_Memory memory, void* block ); /************************************************************************* * * @functype: * FT_Realloc_Func * * @description: * A function used to re-allocate a given block of memory. * * @input: * memory :: * A handle to the source memory manager. * * cur_size :: * The block's current size in bytes. * * new_size :: * The block's requested new size. * * block :: * The block's current address. * * @return: * New block address. 0~in case of memory shortage. * * @note: * In case of error, the old block must still be available. * */ typedef void* (*FT_Realloc_Func)( FT_Memory memory, long cur_size, long new_size, void* block ); /************************************************************************* * * @struct: * FT_MemoryRec * * @description: * A structure used to describe a given memory manager to FreeType~2. * * @fields: * user :: * A generic typeless pointer for user data. * * alloc :: * A pointer type to an allocation function. * * free :: * A pointer type to an memory freeing function. * * realloc :: * A pointer type to a reallocation function. * */ struct FT_MemoryRec_ { void* user; FT_Alloc_Func alloc; FT_Free_Func free; FT_Realloc_Func realloc; }; /*************************************************************************/ /* */ /* I / O M A N A G E M E N T */ /* */ /*************************************************************************/ /************************************************************************* * * @type: * FT_Stream * * @description: * A handle to an input stream. * */ typedef struct FT_StreamRec_* FT_Stream; /************************************************************************* * * @struct: * FT_StreamDesc * * @description: * A union type used to store either a long or a pointer. This is used * to store a file descriptor or a `FILE*' in an input stream. * */ typedef union FT_StreamDesc_ { long value; void* pointer; } FT_StreamDesc; /************************************************************************* * * @functype: * FT_Stream_IoFunc * * @description: * A function used to seek and read data from a given input stream. * * @input: * stream :: * A handle to the source stream. * * offset :: * The offset of read in stream (always from start). * * buffer :: * The address of the read buffer. * * count :: * The number of bytes to read from the stream. * * @return: * The number of bytes effectively read by the stream. * * @note: * This function might be called to perform a seek or skip operation * with a `count' of~0. A non-zero return value then indicates an * error. * */ typedef unsigned long (*FT_Stream_IoFunc)( FT_Stream stream, unsigned long offset, unsigned char* buffer, unsigned long count ); /************************************************************************* * * @functype: * FT_Stream_CloseFunc * * @description: * A function used to close a given input stream. * * @input: * stream :: * A handle to the target stream. * */ typedef void (*FT_Stream_CloseFunc)( FT_Stream stream ); /************************************************************************* * * @struct: * FT_StreamRec * * @description: * A structure used to describe an input stream. * * @input: * base :: * For memory-based streams, this is the address of the first stream * byte in memory. This field should always be set to NULL for * disk-based streams. * * size :: * The stream size in bytes. * * pos :: * The current position within the stream. * * descriptor :: * This field is a union that can hold an integer or a pointer. It is * used by stream implementations to store file descriptors or `FILE*' * pointers. * * pathname :: * This field is completely ignored by FreeType. However, it is often * useful during debugging to use it to store the stream's filename * (where available). * * read :: * The stream's input function. * * close :: * The stream's close function. * * memory :: * The memory manager to use to preload frames. This is set * internally by FreeType and shouldn't be touched by stream * implementations. * * cursor :: * This field is set and used internally by FreeType when parsing * frames. * * limit :: * This field is set and used internally by FreeType when parsing * frames. * */ typedef struct FT_StreamRec_ { unsigned char* base; unsigned long size; unsigned long pos; FT_StreamDesc descriptor; FT_StreamDesc pathname; FT_Stream_IoFunc read; FT_Stream_CloseFunc close; FT_Memory memory; unsigned char* cursor; unsigned char* limit; } FT_StreamRec; /* */ FT_END_HEADER #endif /* __FTSYSTEM_H__ */ /* END */ �������������������������������������������.dynsym�.dynstr�.gnu.version�.gnu.version_r�.rela.dyn�.rela.plt�.init�.text�.fini�.rodata�.eh_frame_hdr�.data�.eh_frame�.dynamic�.ctors�.dtors�.jcr�.got�.bss�.comment������������������������������������������������������������������ �������������@������������������������������������������������������@�����������������������������������������!�������������@���������������������������������������'��� ����������@�������������������������������������/�������������@�����������������������������������������7���o�������@�����������,����������������������������D���o�������@����������� ����������������������������S�������������@���������������������������������������]�������������@��������������������� �����������������g�������������@�����������������������������������������b������������� @����� �����������������������������������m�������������@�����������(�����������������������������s������������� @����� ������������������������������������y������������� @����� ������������������������������������������������ @����� ������������������������������������������������� P����� �������������������������������������������������8 P�����8 �������������������������������������������������� P������ ���������������������������������������������� P����� ������������������������������������������������� P����� ������������������������������������������������� P����� ������������������������������������������������� P����� ������h������������������������������������������0P�����0����������������������������������������������������������0���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* fttrigon.h */ /* */ /* FreeType trigonometric functions (specification). */ /* */ /* Copyright 2001, 2003, 2005, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTTRIGON_H__ #define __FTTRIGON_H__ #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* computations */ /* */ /*************************************************************************/ /************************************************************************* * * @type: * FT_Angle * * @description: * This type is used to model angle values in FreeType. Note that the * angle is a 16.16 fixed float value expressed in degrees. * */ typedef FT_Fixed FT_Angle; /************************************************************************* * * @macro: * FT_ANGLE_PI * * @description: * The angle pi expressed in @FT_Angle units. * */ #define FT_ANGLE_PI ( 180L << 16 ) /************************************************************************* * * @macro: * FT_ANGLE_2PI * * @description: * The angle 2*pi expressed in @FT_Angle units. * */ #define FT_ANGLE_2PI ( FT_ANGLE_PI * 2 ) /************************************************************************* * * @macro: * FT_ANGLE_PI2 * * @description: * The angle pi/2 expressed in @FT_Angle units. * */ #define FT_ANGLE_PI2 ( FT_ANGLE_PI / 2 ) /************************************************************************* * * @macro: * FT_ANGLE_PI4 * * @description: * The angle pi/4 expressed in @FT_Angle units. * */ #define FT_ANGLE_PI4 ( FT_ANGLE_PI / 4 ) /************************************************************************* * * @function: * FT_Sin * * @description: * Return the sinus of a given angle in fixed point format. * * @input: * angle :: * The input angle. * * @return: * The sinus value. * * @note: * If you need both the sinus and cosinus for a given angle, use the * function @FT_Vector_Unit. * */ FT_EXPORT( FT_Fixed ) FT_Sin( FT_Angle angle ); /************************************************************************* * * @function: * FT_Cos * * @description: * Return the cosinus of a given angle in fixed point format. * * @input: * angle :: * The input angle. * * @return: * The cosinus value. * * @note: * If you need both the sinus and cosinus for a given angle, use the * function @FT_Vector_Unit. * */ FT_EXPORT( FT_Fixed ) FT_Cos( FT_Angle angle ); /************************************************************************* * * @function: * FT_Tan * * @description: * Return the tangent of a given angle in fixed point format. * * @input: * angle :: * The input angle. * * @return: * The tangent value. * */ FT_EXPORT( FT_Fixed ) FT_Tan( FT_Angle angle ); /************************************************************************* * * @function: * FT_Atan2 * * @description: * Return the arc-tangent corresponding to a given vector (x,y) in * the 2d plane. * * @input: * x :: * The horizontal vector coordinate. * * y :: * The vertical vector coordinate. * * @return: * The arc-tangent value (i.e. angle). * */ FT_EXPORT( FT_Angle ) FT_Atan2( FT_Fixed x, FT_Fixed y ); /************************************************************************* * * @function: * FT_Angle_Diff * * @description: * Return the difference between two angles. The result is always * constrained to the ]-PI..PI] interval. * * @input: * angle1 :: * First angle. * * angle2 :: * Second angle. * * @return: * Constrained value of `value2-value1'. * */ FT_EXPORT( FT_Angle ) FT_Angle_Diff( FT_Angle angle1, FT_Angle angle2 ); /************************************************************************* * * @function: * FT_Vector_Unit * * @description: * Return the unit vector corresponding to a given angle. After the * call, the value of `vec.x' will be `sin(angle)', and the value of * `vec.y' will be `cos(angle)'. * * This function is useful to retrieve both the sinus and cosinus of a * given angle quickly. * * @output: * vec :: * The address of target vector. * * @input: * angle :: * The address of angle. * */ FT_EXPORT( void ) FT_Vector_Unit( FT_Vector* vec, FT_Angle angle ); /************************************************************************* * * @function: * FT_Vector_Rotate * * @description: * Rotate a vector by a given angle. * * @inout: * vec :: * The address of target vector. * * @input: * angle :: * The address of angle. * */ FT_EXPORT( void ) FT_Vector_Rotate( FT_Vector* vec, FT_Angle angle ); /************************************************************************* * * @function: * FT_Vector_Length * * @description: * Return the length of a given vector. * * @input: * vec :: * The address of target vector. * * @return: * The vector length, expressed in the same units that the original * vector coordinates. * */ FT_EXPORT( FT_Fixed ) FT_Vector_Length( FT_Vector* vec ); /************************************************************************* * * @function: * FT_Vector_Polarize * * @description: * Compute both the length and angle of a given vector. * * @input: * vec :: * The address of source vector. * * @output: * length :: * The vector length. * * angle :: * The vector angle. * */ FT_EXPORT( void ) FT_Vector_Polarize( FT_Vector* vec, FT_Fixed *length, FT_Angle *angle ); /************************************************************************* * * @function: * FT_Vector_From_Polar * * @description: * Compute vector coordinates from a length and angle. * * @output: * vec :: * The address of source vector. * * @input: * length :: * The vector length. * * angle :: /***************************************************************************/ /* */ /* fttypes.h */ /* */ /* FreeType simple types definitions (specification only). */ /* */ /* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTTYPES_H__ #define __FTTYPES_H__ #include <ft2build.h> #include FT_CONFIG_CONFIG_H #include FT_SYSTEM_H #include FT_IMAGE_H #include <stddef.h> FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* basic_types */ /* */ /* <Title> */ /* Basic Data Types */ /* */ /* <Abstract> */ /* The basic data types defined by the library. */ /* */ /* <Description> */ /* This section contains the basic data types defined by FreeType~2, */ /* ranging from simple scalar types to bitmap descriptors. More */ /* font-specific structures are defined in a different section. */ /* */ /* <Order> */ /* FT_Byte */ /* FT_Bytes */ /* FT_Char */ /* FT_Int */ /* FT_UInt */ /* FT_Int16 */ /* FT_UInt16 */ /* FT_Int32 */ /* FT_UInt32 */ /* FT_Short */ /* FT_UShort */ /* FT_Long */ /* FT_ULong */ /* FT_Bool */ /* FT_Offset */ /* FT_PtrDist */ /* FT_String */ /* FT_Tag */ /* FT_Error */ /* FT_Fixed */ /* FT_Pointer */ /* FT_Pos */ /* FT_Vector */ /* FT_BBox */ /* FT_Matrix */ /* FT_FWord */ /* FT_UFWord */ /* FT_F2Dot14 */ /* FT_UnitVector */ /* FT_F26Dot6 */ /* */ /* */ /* FT_Generic */ /* FT_Generic_Finalizer */ /* */ /* FT_Bitmap */ /* FT_Pixel_Mode */ /* FT_Palette_Mode */ /* FT_Glyph_Format */ /* FT_IMAGE_TAG */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Type> */ /* FT_Bool */ /* */ /* <Description> */ /* A typedef of unsigned char, used for simple booleans. As usual, */ /* values 1 and~0 represent true and false, respectively. */ /* */ typedef unsigned char FT_Bool; /*************************************************************************/ /* */ /* <Type> */ /* FT_FWord */ /* */ /* <Description> */ /* A signed 16-bit integer used to store a distance in original font */ /* units. */ /* */ typedef signed short FT_FWord; /* distance in FUnits */ /*************************************************************************/ /* */ /* <Type> */ /* FT_UFWord */ /* */ /* <Description> */ /* An unsigned 16-bit integer used to store a distance in original */ /* font units. */ /* */ typedef unsigned short FT_UFWord; /* unsigned distance */ /*************************************************************************/ /* */ /* <Type> */ /* FT_Char */ /* */ /* <Description> */ /* A simple typedef for the _signed_ char type. */ /* */ typedef signed char FT_Char; /*************************************************************************/ /* */ /* <Type> */ /* FT_Byte */ /* */ /* <Description> */ /* A simple typedef for the _unsigned_ char type. */ /* */ typedef unsigned char FT_Byte; /*************************************************************************/ /* */ /* <Type> */ /* FT_Bytes */ /* */ /* <Description> */ /* A typedef for constant memory areas. */ /* */ typedef const FT_Byte* FT_Bytes; /*************************************************************************/ /* */ /* <Type> */ /* FT_Tag */ /* */ /* <Description> */ /* A typedef for 32-bit tags (as used in the SFNT format). */ /* */ typedef FT_UInt32 FT_Tag; /*************************************************************************/ /* */ /* <Type> */ /* FT_String */ /* */ /* <Description> */ /* A simple typedef for the char type, usually used for strings. */ /* */ typedef char FT_String; /*************************************************************************/ /* */ /* <Type> */ /* FT_Short */ /* */ /* <Description> */ /* A typedef for signed short. */ /* */ typedef signed short FT_Short; /*************************************************************************/ /* */ /* <Type> */ /* FT_UShort */ /* */ /* <Description> */ /* A typedef for unsigned short. */ /* */ typedef unsigned short FT_UShort; /*************************************************************************/ /* */ /* <Type> */ /* FT_Int */ /* */ /* <Description> */ /* A typedef for the int type. */ /* */ typedef signed int FT_Int; /*************************************************************************/ /* */ /* <Type> */ /* FT_UInt */ /* */ /* <Description> */ /* A typedef for the unsigned int type. */ /* */ typedef unsigned int FT_UInt; /*************************************************************************/ /* */ /* <Type> */ /* FT_Long */ /* */ /* <Description> */ /* A typedef for signed long. */ /* */ typedef signed long FT_Long; /*************************************************************************/ /* */ /* <Type> */ /* FT_ULong */ /* */ /* <Description> */ /* A typedef for unsigned long. */ /* */ typedef unsigned long FT_ULong; /*************************************************************************/ /* */ /* <Type> */ /* FT_F2Dot14 */ /* */ /* <Description> */ /* A signed 2.14 fixed float type used for unit vectors. */ /* */ typedef signed short FT_F2Dot14; /*************************************************************************/ /* */ /* <Type> */ /* FT_F26Dot6 */ /* */ /* <Description> */ /* A signed 26.6 fixed float type used for vectorial pixel */ /* coordinates. */ /* */ typedef signed long FT_F26Dot6; /*************************************************************************/ /* */ /* <Type> */ /* FT_Fixed */ /* */ /* <Description> */ /* This type is used to store 16.16 fixed float values, like scaling */ /* values or matrix coefficients. */ /* */ typedef signed long FT_Fixed; /*************************************************************************/ /* */ /* <Type> */ /* FT_Error */ /* */ /* <Description> */ /* The FreeType error code type. A value of~0 is always interpreted */ /* as a successful operation. */ /* */ typedef int FT_Error; /*************************************************************************/ /* */ /* <Type> */ /* FT_Pointer */ /* */ /* <Description> */ /* A simple typedef for a typeless pointer. */ /* */ typedef void* FT_Pointer; /*************************************************************************/ /* */ /* <Type> */ /* FT_Offset */ /* */ /* <Description> */ /* This is equivalent to the ANSI~C `size_t' type, i.e., the largest */ /* _unsigned_ integer type used to express a file size or position, */ /* or a memory block size. */ /* */ typedef size_t FT_Offset; /*************************************************************************/ /* */ /* <Type> */ /* FT_PtrDist */ /* */ /* <Description> */ /* This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the */ /* largest _signed_ integer type used to express the distance */ /* between two pointers. */ /* */ typedef ft_ptrdiff_t FT_PtrDist; /*************************************************************************/ /* */ /* <Struct> */ /* FT_UnitVector */ /* */ /* <Description> */ /* A simple structure used to store a 2D vector unit vector. Uses */ /* FT_F2Dot14 types. */ /* */ /* <Fields> */ /* x :: Horizontal coordinate. */ /* */ /* y :: Vertical coordinate. */ /* */ typedef struct FT_UnitVector_ { FT_F2Dot14 x; FT_F2Dot14 y; } FT_UnitVector; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Matrix */ /* */ /* <Description> */ /* A simple structure used to store a 2x2 matrix. Coefficients are */ /* in 16.16 fixed float format. The computation performed is: */ /* */ /* { */ /* x' = x*xx + y*xy */ /* y' = x*yx + y*yy */ /* } */ /* */ /* <Fields> */ /* xx :: Matrix coefficient. */ /* */ /* xy :: Matrix coefficient. */ /* */ /* yx :: Matrix coefficient. */ /* */ /* yy :: Matrix coefficient. */ /* */ typedef struct FT_Matrix_ { FT_Fixed xx, xy; FT_Fixed yx, yy; } FT_Matrix; /*************************************************************************/ /* */ /* <Struct> */ /* FT_Data */ /* */ /* <Description> */ /* Read-only binary data represented as a pointer and a length. */ /* */ /* <Fields> */ /* pointer :: The data. */ /* */ /* length :: The length of the data in bytes. */ /* */ typedef struct FT_Data_ { const FT_Byte* pointer; FT_Int length; } FT_Data; /*************************************************************************/ /* */ /* <FuncType> */ /* FT_Generic_Finalizer */ /* */ /* <Description> */ /* Describe a function used to destroy the `client' data of any */ /* FreeType object. See the description of the @FT_Generic type for */ /* details of usage. */ /* */ /* <Input> */ /* The address of the FreeType object which is under finalization. */ /* Its client data is accessed through its `generic' field. */ /* */ typedef void (*FT_Generic_Finalizer)(void* object); /*************************************************************************/ /* */ /* <Struct> */ /* FT_Generic */ /* */ /* <Description> */ /* Client applications often need to associate their own data to a */ /* variety of FreeType core objects. For example, a text layout API */ /* might want to associate a glyph cache to a given size object. */ /* */ /* Most FreeType object contains a `generic' field, of type */ /* FT_Generic, which usage is left to client applications and font */ /* servers. */ /* */ /* It can be used to store a pointer to client-specific data, as well */ /* as the address of a `finalizer' function, which will be called by */ /* FreeType when the object is destroyed (for example, the previous */ /* client example would put the address of the glyph cache destructor */ /* in the `finalizer' field). */ /* */ /* <Fields> */ /* data :: A typeless pointer to any client-specified data. This */ /* field is completely ignored by the FreeType library. */ /* */ /* finalizer :: A pointer to a `generic finalizer' function, which */ /* will be called when the object is destroyed. If this */ /* field is set to NULL, no code will be called. */ /* */ typedef struct FT_Generic_ { void* data; FT_Generic_Finalizer finalizer; } FT_Generic; /*************************************************************************/ /* */ /* <Macro> */ /* FT_MAKE_TAG */ /* */ /* <Description> */ /* This macro converts four-letter tags which are used to label */ /* TrueType tables into an unsigned long to be used within FreeType. */ /* */ /* <Note> */ /* The produced values *must* be 32-bit integers. Don't redefine */ /* this macro. */ /* */ #define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \ (FT_Tag) \ ( ( (FT_ULong)_x1 << 24 ) | \ ( (FT_ULong)_x2 << 16 ) | \ ( (FT_ULong)_x3 << 8 ) | \ (FT_ULong)_x4 ) /*************************************************************************/ /*************************************************************************/ /* */ /* L I S T M A N A G E M E N T */ /* */ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /* */ /* <Section> */ /* list_processing */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Type> */ /* FT_ListNode */ /* */ /* <Description> */ /* Many elements and objects in FreeType are listed through an */ /* @FT_List record (see @FT_ListRec). As its name suggests, an */ /* FT_ListNode is a handle to a single list element. */ /* */ typedef struct FT_ListNodeRec_* FT_ListNode; /*************************************************************************/ /* */ /* <Type> */ /* FT_List */ /* */ /* <Description> */ /* A handle to a list record (see @FT_ListRec). */ /* */ typedef struct FT_ListRec_* FT_List; /*************************************************************************/ /* */ /* <Struct> */ /* FT_ListNodeRec */ /* */ /* <Description> */ /* A structure used to hold a single list element. */ /* */ /* <Fields> */ /* prev :: The previous element in the list. NULL if first. */ /* */ /* next :: The next element in the list. NULL if last. */ /* */ /* data :: A typeless pointer to the listed object. */ /* */ typedef struct FT_ListNodeRec_ { FT_ListNode prev; FT_ListNode next; void* data; } FT_ListNodeRec; /*************************************************************************/ /* */ /* <Struct> */ /* FT_ListRec */ /* */ /* <Description> */ /* A structure used to hold a simple doubly-linked list. These are */ /* used in many parts of FreeType. */ /* */ /* <Fields> */ /* head :: The head (first element) of doubly-linked list. */ /* */ /* tail :: The tail (last element) of doubly-linked list. */ /* */ typedef struct FT_ListRec_ { FT_ListNode head; FT_ListNode tail; } FT_ListRec; /* */ #define FT_IS_EMPTY( list ) ( (list).head == 0 ) /* return base error code (without module-specific prefix) */ #define FT_ERROR_BASE( x ) ( (x) & 0xFF ) /* return module error code */ #define FT_ERROR_MODULE( x ) ( (x) & 0xFF00U ) #define FT_BOOL( x ) ( (FT_Bool)( x ) ) FT_END_HEADER #endif /* __FTTYPES_H__ */ /* END */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������!�������������@�����������4���������������������������'��� ����������0@�����0��������������������������������/�������������@�����������6�����������������������������7���o�������@�����������L����������������������������D���o�������H@�����H������ ����������������������������S�������������h@�����h������x����������������������������]�������������@�������������������� �����������������g������������� @����� ������������������������������������b������������� @����� ����������������������������������m�������������p @�����p �����������������������������������s�������������H!@�����H!������������������������������������y�������������X!@�����X!������������������������������������������������@'@�����@'�������������������������������������������������`'P�����`'������@��������������� ����������������������������'P�����'������������������������������������������������ )P����� )����������������������������������������������*P�����*�������������������������������������������������*P�����*�������������������������������������������������*P�����*�������������������������������������������������*P�����*������������������������������������������������+P�����+������x����������������������������������������������������+���������������������������������������������������������w.��������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftwinfnt.h */ /* */ /* FreeType API for accessing Windows fnt-specific data. */ /* */ /* Copyright 2003, 2004, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTWINFNT_H__ #define __FTWINFNT_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* winfnt_fonts */ /* */ /* <Title> */ /* Window FNT Files */ /* */ /* <Abstract> */ /* Windows FNT specific API. */ /* */ /* <Description> */ /* This section contains the declaration of Windows FNT specific */ /* functions. */ /* */ /*************************************************************************/ /************************************************************************* * * @enum: * FT_WinFNT_ID_XXX * * @description: * A list of valid values for the `charset' byte in * @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX * encodings (except for cp1361) can be found at ftp://ftp.unicode.org * in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is * roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT. * * @values: * FT_WinFNT_ID_DEFAULT :: * This is used for font enumeration and font creation as a * `don't care' value. Valid font files don't contain this value. * When querying for information about the character set of the font * that is currently selected into a specified device context, this * return value (of the related Windows API) simply denotes failure. * * FT_WinFNT_ID_SYMBOL :: * There is no known mapping table available. * * FT_WinFNT_ID_MAC :: * Mac Roman encoding. * * FT_WinFNT_ID_OEM :: * From Michael Pöttgen <michael@poettgen.de>: * * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM * is used for the charset of vector fonts, like `modern.fon', * `roman.fon', and `script.fon' on Windows. * * The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value * specifies a character set that is operating-system dependent. * * The `IFIMETRICS' documentation from the `Windows Driver * Development Kit' says: This font supports an OEM-specific * character set. The OEM character set is system dependent. * * In general OEM, as opposed to ANSI (i.e., cp1252), denotes the * second default codepage that most international versions of * Windows have. It is one of the OEM codepages from * * http://www.microsoft.com/globaldev/reference/cphome.mspx, * * and is used for the `DOS boxes', to support legacy applications. * A German Windows version for example usually uses ANSI codepage * 1252 and OEM codepage 850. * * FT_WinFNT_ID_CP874 :: * A superset of Thai TIS 620 and ISO 8859-11. * * FT_WinFNT_ID_CP932 :: * A superset of Japanese Shift-JIS (with minor deviations). * * FT_WinFNT_ID_CP936 :: * A superset of simplified Chinese GB 2312-1980 (with different * ordering and minor deviations). * * FT_WinFNT_ID_CP949 :: * A superset of Korean Hangul KS~C 5601-1987 (with different * ordering and minor deviations). * * FT_WinFNT_ID_CP950 :: * A superset of traditional Chinese Big~5 ETen (with different * ordering and minor deviations). * * FT_WinFNT_ID_CP1250 :: * A superset of East European ISO 8859-2 (with slightly different * ordering). * * FT_WinFNT_ID_CP1251 :: * A superset of Russian ISO 8859-5 (with different ordering). * * FT_WinFNT_ID_CP1252 :: * ANSI encoding. A superset of ISO 8859-1. * * FT_WinFNT_ID_CP1253 :: * A superset of Greek ISO 8859-7 (with minor modifications). * * FT_WinFNT_ID_CP1254 :: * A superset of Turkish ISO 8859-9. * * FT_WinFNT_ID_CP1255 :: * A superset of Hebrew ISO 8859-8 (with some modifications). * * FT_WinFNT_ID_CP1256 :: * A superset of Arabic ISO 8859-6 (with different ordering). * * FT_WinFNT_ID_CP1257 :: * A superset of Baltic ISO 8859-13 (with some deviations). * * FT_WinFNT_ID_CP1258 :: * For Vietnamese. This encoding doesn't cover all necessary * characters. * * FT_WinFNT_ID_CP1361 :: * Korean (Johab). */ #define FT_WinFNT_ID_CP1252 0 #define FT_WinFNT_ID_DEFAULT 1 #define FT_WinFNT_ID_SYMBOL 2 #define FT_WinFNT_ID_MAC 77 #define FT_WinFNT_ID_CP932 128 #define FT_WinFNT_ID_CP949 129 #define FT_WinFNT_ID_CP1361 130 #define FT_WinFNT_ID_CP936 134 #define FT_WinFNT_ID_CP950 136 #define FT_WinFNT_ID_CP1253 161 #define FT_WinFNT_ID_CP1254 162 #define FT_WinFNT_ID_CP1258 163 #define FT_WinFNT_ID_CP1255 177 #define FT_WinFNT_ID_CP1256 178 #define FT_WinFNT_ID_CP1257 186 #define FT_WinFNT_ID_CP1251 204 #define FT_WinFNT_ID_CP874 222 #define FT_WinFNT_ID_CP1250 238 #define FT_WinFNT_ID_OEM 255 /*************************************************************************/ /* */ /* <Struct> */ /* FT_WinFNT_HeaderRec */ /* */ /* <Description> */ /* Windows FNT Header info. */ /* */ typedef struct FT_WinFNT_HeaderRec_ { FT_UShort version; FT_ULong file_size; FT_Byte copyright[60]; FT_UShort file_type; FT_UShort nominal_point_size; FT_UShort vertical_resolution; FT_UShort horizontal_resolution; FT_UShort ascent; FT_UShort internal_leading; FT_UShort external_leading; FT_Byte italic; FT_Byte underline; FT_Byte strike_out; FT_UShort weight; FT_Byte charset; FT_UShort pixel_width; FT_UShort pixel_height; FT_Byte pitch_and_family; FT_UShort avg_width; FT_UShort max_width; FT_Byte first_char; FT_Byte last_char; FT_Byte default_char; FT_Byte break_char; FT_UShort bytes_per_row; FT_ULong device_offset; FT_ULong face_name_offset; FT_ULong bits_pointer; FT_ULong bits_offset; FT_Byte reserved; FT_ULong flags; FT_UShort A_space; FT_UShort B_space; FT_UShort C_space; FT_UShort color_table_offset; FT_ULong reserved1[4]; } FT_WinFNT_HeaderRec; /*************************************************************************/ /* */ /* <Struct> */ /* FT_WinFNT_Header */ /* */ /* <Description> */ /* A handle to an @FT_WinFNT_HeaderRec structure. */ /* */ typedef struct FT_WinFNT_HeaderRec_* FT_WinFNT_Header; /********************************************************************** * * @function: * FT_Get_WinFNT_Header * * @description: * Retrieve a Windows FNT font info header. * * @input: * face :: A handle to the input face. * * @output: * aheader :: The WinFNT header. * * @return: * FreeType error code. 0~means success. * * @note: * This function only works with Windows FNT faces, returning an error * otherwise. */ FT_EXPORT( FT_Error ) FT_Get_WinFNT_Header( FT_Face face, FT_WinFNT_HeaderRec *aheader ); /* */ FT_END_HEADER #endif /* __FTWINFNT_H__ */ /* END */ /* Local Variables: */ /* coding: utf-8 */ /* End: */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������x@�����x������ ����������������������������S�������������@�����������H����������������������������]�������������@�����������@��������� �����������������g������������� @����� ������������������������������������b�������������4 @�����4 ����������������������������������m������������� @����� ������ �����������������������������s�������������x@�����x������������������������������������y�������������@�����������������������������������������������������X@�����X�������������������������������������������������`P�����`�������������������������������������������������xP�����x������������������������������������������������P��������������������������������������������������� P����� �������������������������������������������������0P�����0�������������������������������������������������@P�����@�������������������������������������������������HP�����H������������������������������������������������ P����� ������(���������������������������������������������������� ������G���������������������������������������������������g����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ftxf86.h */ /* */ /* Support functions for X11. */ /* */ /* Copyright 2002, 2003, 2004, 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTXF86_H__ #define __FTXF86_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* font_formats */ /* */ /* <Title> */ /* Font Formats */ /* */ /* <Abstract> */ /* Getting the font format. */ /* */ /* <Description> */ /* The single function in this section can be used to get the font */ /* format. Note that this information is not needed normally; */ /* however, there are special cases (like in PDF devices) where it is */ /* important to differentiate, in spite of FreeType's uniform API. */ /* */ /* This function is in the X11/xf86 namespace for historical reasons */ /* and in no way depends on that windowing system. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_X11_Font_Format */ /* */ /* <Description> */ /* Return a string describing the format of a given face, using values */ /* which can be used as an X11 FONT_PROPERTY. Possible values are */ /* `TrueType', `Type~1', `BDF', `PCF', `Type~42', `CID~Type~1', `CFF', */ /* `PFR', and `Windows~FNT'. */ /* */ /* <Input> /***************************************************************************/ /* */ /* t1tables.h */ /* */ /* Basic Type 1/Type 2 tables definitions and interface (specification */ /* only). */ /* */ /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __T1TABLES_H__ #define __T1TABLES_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* type1_tables */ /* */ /* <Title> */ /* Type 1 Tables */ /* */ /* <Abstract> */ /* Type~1 (PostScript) specific font tables. */ /* */ /* <Description> */ /* This section contains the definition of Type 1-specific tables, */ /* including structures related to other PostScript font formats. */ /* */ /*************************************************************************/ /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */ /* structures in order to support Multiple Master fonts. */ /*************************************************************************/ /* */ /* <Struct> */ /* PS_FontInfoRec */ /* */ /* <Description> */ /* A structure used to model a Type~1 or Type~2 FontInfo dictionary. */ /* Note that for Multiple Master fonts, each instance has its own */ /* FontInfo dictionary. */ /* */ typedef struct PS_FontInfoRec_ { FT_String* version; FT_String* notice; FT_String* full_name; FT_String* family_name; FT_String* weight; FT_Long italic_angle; FT_Bool is_fixed_pitch; FT_Short underline_position; FT_UShort underline_thickness; } PS_FontInfoRec; /*************************************************************************/ /* */ /* <Struct> */ /* PS_FontInfo */ /* */ /* <Description> */ /* A handle to a @PS_FontInfoRec structure. */ /* */ typedef struct PS_FontInfoRec_* PS_FontInfo; /*************************************************************************/ /* */ /* <Struct> */ /* T1_FontInfo */ /* */ /* <Description> */ /* This type is equivalent to @PS_FontInfoRec. It is deprecated but */ /* kept to maintain source compatibility between various versions of */ /* FreeType. */ /* */ typedef PS_FontInfoRec T1_FontInfo; /*************************************************************************/ /* */ /* <Struct> */ /* PS_PrivateRec */ /* */ /* <Description> */ /* A structure used to model a Type~1 or Type~2 private dictionary. */ /* Note that for Multiple Master fonts, each instance has its own */ /* Private dictionary. */ /* */ typedef struct PS_PrivateRec_ { FT_Int unique_id; FT_Int lenIV; FT_Byte num_blue_values; FT_Byte num_other_blues; FT_Byte num_family_blues; FT_Byte num_family_other_blues; FT_Short blue_values[14]; FT_Short other_blues[10]; FT_Short family_blues [14]; FT_Short family_other_blues[10]; FT_Fixed blue_scale; FT_Int blue_shift; FT_Int blue_fuzz; FT_UShort standard_width[1]; FT_UShort standard_height[1]; FT_Byte num_snap_widths; FT_Byte num_snap_heights; FT_Bool force_bold; FT_Bool round_stem_up; FT_Short snap_widths [13]; /* including std width */ FT_Short snap_heights[13]; /* including std height */ FT_Fixed expansion_factor; FT_Long language_group; FT_Long password; FT_Short min_feature[2]; } PS_PrivateRec; /*************************************************************************/ /* */ /* <Struct> */ /* PS_Private */ /* */ /* <Description> */ /* A handle to a @PS_PrivateRec structure. */ /* */ typedef struct PS_PrivateRec_* PS_Private; /*************************************************************************/ /* */ /* <Struct> */ /* T1_Private */ /* */ /* <Description> */ /* This type is equivalent to @PS_PrivateRec. It is deprecated but */ /* kept to maintain source compatibility between various versions of */ /* FreeType. */ /* */ typedef PS_PrivateRec T1_Private; /*************************************************************************/ /* */ /* <Enum> */ /* T1_Blend_Flags */ /* */ /* <Description> */ /* A set of flags used to indicate which fields are present in a */ /* given blend dictionary (font info or private). Used to support */ /* Multiple Masters fonts. */ /* */ typedef enum T1_Blend_Flags_ { /*# required fields in a FontInfo blend dictionary */ T1_BLEND_UNDERLINE_POSITION = 0, T1_BLEND_UNDERLINE_THICKNESS, T1_BLEND_ITALIC_ANGLE, /*# required fields in a Private blend dictionary */ T1_BLEND_BLUE_VALUES, T1_BLEND_OTHER_BLUES, T1_BLEND_STANDARD_WIDTH, T1_BLEND_STANDARD_HEIGHT, T1_BLEND_STEM_SNAP_WIDTHS, T1_BLEND_STEM_SNAP_HEIGHTS, T1_BLEND_BLUE_SCALE, T1_BLEND_BLUE_SHIFT, T1_BLEND_FAMILY_BLUES, T1_BLEND_FAMILY_OTHER_BLUES, T1_BLEND_FORCE_BOLD, /*# never remove */ T1_BLEND_MAX } T1_Blend_Flags; /* */ /*# backwards compatible definitions */ #define t1_blend_underline_position T1_BLEND_UNDERLINE_POSITION #define t1_blend_underline_thickness T1_BLEND_UNDERLINE_THICKNESS #define t1_blend_italic_angle T1_BLEND_ITALIC_ANGLE #define t1_blend_blue_values T1_BLEND_BLUE_VALUES #define t1_blend_other_blues T1_BLEND_OTHER_BLUES #define t1_blend_standard_widths T1_BLEND_STANDARD_WIDTH #define t1_blend_standard_height T1_BLEND_STANDARD_HEIGHT #define t1_blend_stem_snap_widths T1_BLEND_STEM_SNAP_WIDTHS #define t1_blend_stem_snap_heights T1_BLEND_STEM_SNAP_HEIGHTS #define t1_blend_blue_scale T1_BLEND_BLUE_SCALE #define t1_blend_blue_shift T1_BLEND_BLUE_SHIFT #define t1_blend_family_blues T1_BLEND_FAMILY_BLUES #define t1_blend_family_other_blues T1_BLEND_FAMILY_OTHER_BLUES #define t1_blend_force_bold T1_BLEND_FORCE_BOLD #define t1_blend_max T1_BLEND_MAX /* maximum number of Multiple Masters designs, as defined in the spec */ #define T1_MAX_MM_DESIGNS 16 /* maximum number of Multiple Masters axes, as defined in the spec */ #define T1_MAX_MM_AXIS 4 /* maximum number of elements in a design map */ #define T1_MAX_MM_MAP_POINTS 20 /* this structure is used to store the BlendDesignMap entry for an axis */ typedef struct PS_DesignMap_ { FT_Byte num_points; FT_Long* design_points; FT_Fixed* blend_points; } PS_DesignMapRec, *PS_DesignMap; /* backwards-compatible definition */ typedef PS_DesignMapRec T1_DesignMap; typedef struct PS_BlendRec_ { FT_UInt num_designs; FT_UInt num_axis; FT_String* axis_names[T1_MAX_MM_AXIS]; FT_Fixed* design_pos[T1_MAX_MM_DESIGNS]; PS_DesignMapRec design_map[T1_MAX_MM_AXIS]; FT_Fixed* weight_vector; FT_Fixed* default_weight_vector; PS_FontInfo font_infos[T1_MAX_MM_DESIGNS + 1]; PS_Private privates [T1_MAX_MM_DESIGNS + 1]; FT_ULong blend_bitflags; FT_BBox* bboxes [T1_MAX_MM_DESIGNS + 1]; /* since 2.3.0 */ /* undocumented, optional: the default design instance; */ /* corresponds to default_weight_vector -- */ /* num_default_design_vector == 0 means it is not present */ /* in the font and associated metrics files */ FT_UInt default_design_vector[T1_MAX_MM_DESIGNS]; FT_UInt num_default_design_vector; } PS_BlendRec, *PS_Blend; /* backwards-compatible definition */ typedef PS_BlendRec T1_Blend; /*************************************************************************/ /* */ /* <Struct> */ /* CID_FaceDictRec */ /* */ /* <Description> */ /* A structure used to represent data in a CID top-level dictionary. */ /* */ typedef struct CID_FaceDictRec_ { PS_PrivateRec private_dict; FT_UInt len_buildchar; FT_Fixed forcebold_threshold; FT_Pos stroke_width; FT_Fixed expansion_factor; FT_Byte paint_type; FT_Byte font_type; FT_Matrix font_matrix; FT_Vector font_offset; FT_UInt num_subrs; FT_ULong subrmap_offset; FT_Int sd_bytes; } CID_FaceDictRec; /*************************************************************************/ /* */ /* <Struct> */ /* CID_FaceDict */ /* */ /* <Description> */ /* A handle to a @CID_FaceDictRec structure. */ /* */ typedef struct CID_FaceDictRec_* CID_FaceDict; /* */ /* backwards-compatible definition */ typedef CID_FaceDictRec CID_FontDict; /*************************************************************************/ /* */ /* <Struct> */ /* CID_FaceInfoRec */ /* */ /* <Description> */ /* A structure used to represent CID Face information. */ /* */ typedef struct CID_FaceInfoRec_ { FT_String* cid_font_name; FT_Fixed cid_version; FT_Int cid_font_type; FT_String* registry; FT_String* ordering; FT_Int supplement; PS_FontInfoRec font_info; FT_BBox font_bbox; FT_ULong uid_base; FT_Int num_xuid; FT_ULong xuid[16]; FT_ULong cidmap_offset; FT_Int fd_bytes; FT_Int gd_bytes; FT_ULong cid_count; FT_Int num_dicts; CID_FaceDict font_dicts; FT_ULong data_offset; } CID_FaceInfoRec; /*************************************************************************/ /* */ /* <Struct> */ /* CID_FaceInfo */ /* */ /* <Description> */ /* A handle to a @CID_FaceInfoRec structure. */ /* */ typedef struct CID_FaceInfoRec_* CID_FaceInfo; /*************************************************************************/ /* */ /* <Struct> */ /* CID_Info */ /* */ /* <Description> */ /* This type is equivalent to @CID_FaceInfoRec. It is deprecated but */ /* kept to maintain source compatibility between various versions of */ /* FreeType. */ /* */ typedef CID_FaceInfoRec CID_Info; /************************************************************************ * * @function: * FT_Has_PS_Glyph_Names * * @description: * Return true if a given face provides reliable PostScript glyph * names. This is similar to using the @FT_HAS_GLYPH_NAMES macro, * except that certain fonts (mostly TrueType) contain incorrect * glyph name tables. * * When this function returns true, the caller is sure that the glyph * names returned by @FT_Get_Glyph_Name are reliable. * * @input: * face :: * face handle * * @return: * Boolean. True if glyph names are reliable. * */ FT_EXPORT( FT_Int ) FT_Has_PS_Glyph_Names( FT_Face face ); /************************************************************************ * * @function: * FT_Get_PS_Font_Info * * @description: * Retrieve the @PS_FontInfoRec structure corresponding to a given * PostScript font. * * @input: * face :: * PostScript face handle. * * @output: * afont_info :: * Output font info structure pointer. * * @return: * FreeType error code. 0~means success. * * @note: * The string pointers within the font info structure are owned by * the face and don't need to be freed by the caller. * * If the font's format is not PostScript-based, this function will * return the `FT_Err_Invalid_Argument' error code. * */ FT_EXPORT( FT_Error ) FT_Get_PS_Font_Info( FT_Face face, PS_FontInfo afont_info ); /************************************************************************ * * @function: * FT_Get_PS_Font_Private * * @description: * Retrieve the @PS_PrivateRec structure corresponding to a given * PostScript font. * * @input: * face :: * PostScript face handle. * * @output: * afont_private :: * Output private dictionary structure pointer. * * @return: * FreeType error code. 0~means success. * * @note: * The string pointers within the @PS_PrivateRec structure are owned by * the face and don't need to be freed by the caller. * * If the font's format is not PostScript-based, this function returns * the `FT_Err_Invalid_Argument' error code. * */ FT_EXPORT( FT_Error ) FT_Get_PS_Font_Private( FT_Face face, PS_Private afont_private ); /* */ FT_END_HEADER #endif /* __T1TABLES_H__ */ /* END */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* tttables.h */ /* */ /* Basic SFNT/TrueType tables definitions and interface */ /* (specification only). */ /* */ /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __TTTABLES_H__ #define __TTTABLES_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* truetype_tables */ /* */ /* <Title> */ /* TrueType Tables */ /* */ /* <Abstract> */ /* TrueType specific table types and functions. */ /* */ /* <Description> */ /* This section contains the definition of TrueType-specific tables */ /* as well as some routines used to access and process them. */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* <Struct> */ /* TT_Header */ /* */ /* <Description> */ /* A structure used to model a TrueType font header table. All */ /* fields follow the TrueType specification. */ /* */ typedef struct TT_Header_ { FT_Fixed Table_Version; FT_Fixed Font_Revision; FT_Long CheckSum_Adjust; FT_Long Magic_Number; FT_UShort Flags; FT_UShort Units_Per_EM; FT_Long Created [2]; FT_Long Modified[2]; FT_Short xMin; FT_Short yMin; FT_Short xMax; FT_Short yMax; FT_UShort Mac_Style; FT_UShort Lowest_Rec_PPEM; FT_Short Font_Direction; FT_Short Index_To_Loc_Format; FT_Short Glyph_Data_Format; } TT_Header; /*************************************************************************/ /* */ /* <Struct> */ /* TT_HoriHeader */ /* */ /* <Description> */ /* A structure used to model a TrueType horizontal header, the `hhea' */ /* table, as well as the corresponding horizontal metrics table, */ /* i.e., the `hmtx' table. */ /* */ /* <Fields> */ /* Version :: The table version. */ /* */ /* Ascender :: The font's ascender, i.e., the distance */ /* from the baseline to the top-most of all */ /* glyph points found in the font. */ /* */ /* This value is invalid in many fonts, as */ /* it is usually set by the font designer, */ /* and often reflects only a portion of the */ /* glyphs found in the font (maybe ASCII). */ /* */ /* You should use the `sTypoAscender' field */ /* of the OS/2 table instead if you want */ /* the correct one. */ /* */ /* Descender :: The font's descender, i.e., the distance */ /* from the baseline to the bottom-most of */ /* all glyph points found in the font. It */ /* is negative. */ /* */ /* This value is invalid in many fonts, as */ /* it is usually set by the font designer, */ /* and often reflects only a portion of the */ /* glyphs found in the font (maybe ASCII). */ /* */ /* You should use the `sTypoDescender' */ /* field of the OS/2 table instead if you */ /* want the correct one. */ /* */ /* Line_Gap :: The font's line gap, i.e., the distance */ /* to add to the ascender and descender to */ /* get the BTB, i.e., the */ /* baseline-to-baseline distance for the */ /* font. */ /* */ /* advance_Width_Max :: This field is the maximum of all advance */ /* widths found in the font. It can be */ /* used to compute the maximum width of an */ /* arbitrary string of text. */ /* */ /* min_Left_Side_Bearing :: The minimum left side bearing of all */ /* glyphs within the font. */ /* */ /* min_Right_Side_Bearing :: The minimum right side bearing of all */ /* glyphs within the font. */ /* */ /* xMax_Extent :: The maximum horizontal extent (i.e., the */ /* `width' of a glyph's bounding box) for */ /* all glyphs in the font. */ /* */ /* caret_Slope_Rise :: The rise coefficient of the cursor's */ /* slope of the cursor (slope=rise/run). */ /* */ /* caret_Slope_Run :: The run coefficient of the cursor's */ /* slope. */ /* */ /* Reserved :: 8~reserved bytes. */ /* */ /* metric_Data_Format :: Always~0. */ /* */ /* number_Of_HMetrics :: Number of HMetrics entries in the `hmtx' */ /* table -- this value can be smaller than */ /* the total number of glyphs in the font. */ /* */ /* long_metrics :: A pointer into the `hmtx' table. */ /* */ /* short_metrics :: A pointer into the `hmtx' table. */ /* */ /* <Note> */ /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ /* be identical except for the names of their fields which */ /* are different. */ /* */ /* This ensures that a single function in the `ttload' */ /* module is able to read both the horizontal and vertical */ /* headers. */ /* */ typedef struct TT_HoriHeader_ { FT_Fixed Version; FT_Short Ascender; FT_Short Descender; FT_Short Line_Gap; FT_UShort advance_Width_Max; /* advance width maximum */ FT_Short min_Left_Side_Bearing; /* minimum left-sb */ FT_Short min_Right_Side_Bearing; /* minimum right-sb */ FT_Short xMax_Extent; /* xmax extents */ FT_Short caret_Slope_Rise; FT_Short caret_Slope_Run; FT_Short caret_Offset; FT_Short Reserved[4]; FT_Short metric_Data_Format; FT_UShort number_Of_HMetrics; /* The following fields are not defined by the TrueType specification */ /* but they are used to connect the metrics header to the relevant */ /* `HMTX' table. */ void* long_metrics; void* short_metrics; } TT_HoriHeader; /*************************************************************************/ /* */ /* <Struct> */ /* TT_VertHeader */ /* */ /* <Description> */ /* A structure used to model a TrueType vertical header, the `vhea' */ /* table, as well as the corresponding vertical metrics table, i.e., */ /* the `vmtx' table. */ /* */ /* <Fields> */ /* Version :: The table version. */ /* */ /* Ascender :: The font's ascender, i.e., the distance */ /* from the baseline to the top-most of */ /* all glyph points found in the font. */ /* */ /* This value is invalid in many fonts, as */ /* it is usually set by the font designer, */ /* and often reflects only a portion of */ /* the glyphs found in the font (maybe */ /* ASCII). */ /* */ /* You should use the `sTypoAscender' */ /* field of the OS/2 table instead if you */ /* want the correct one. */ /* */ /* Descender :: The font's descender, i.e., the */ /* distance from the baseline to the */ /* bottom-most of all glyph points found */ /* in the font. It is negative. */ /* */ /* This value is invalid in many fonts, as */ /* it is usually set by the font designer, */ /* and often reflects only a portion of */ /* the glyphs found in the font (maybe */ /* ASCII). */ /* */ /* You should use the `sTypoDescender' */ /* field of the OS/2 table instead if you */ /* want the correct one. */ /* */ /* Line_Gap :: The font's line gap, i.e., the distance */ /* to add to the ascender and descender to */ /* get the BTB, i.e., the */ /* baseline-to-baseline distance for the */ /* font. */ /* */ /* advance_Height_Max :: This field is the maximum of all */ /* advance heights found in the font. It */ /* can be used to compute the maximum */ /* height of an arbitrary string of text. */ /* */ /* min_Top_Side_Bearing :: The minimum top side bearing of all */ /* glyphs within the font. */ /* */ /* min_Bottom_Side_Bearing :: The minimum bottom side bearing of all */ /* glyphs within the font. */ /* */ /* yMax_Extent :: The maximum vertical extent (i.e., the */ /* `height' of a glyph's bounding box) for */ /* all glyphs in the font. */ /* */ /* caret_Slope_Rise :: The rise coefficient of the cursor's */ /* slope of the cursor (slope=rise/run). */ /* */ /* caret_Slope_Run :: The run coefficient of the cursor's */ /* slope. */ /* */ /* caret_Offset :: The cursor's offset for slanted fonts. */ /* This value is `reserved' in vmtx */ /* version 1.0. */ /* */ /* Reserved :: 8~reserved bytes. */ /* */ /* metric_Data_Format :: Always~0. */ /* */ /* number_Of_HMetrics :: Number of VMetrics entries in the */ /* `vmtx' table -- this value can be */ /* smaller than the total number of glyphs */ /* in the font. */ /* */ /* long_metrics :: A pointer into the `vmtx' table. */ /* */ /* short_metrics :: A pointer into the `vmtx' table. */ /* */ /* <Note> */ /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ /* be identical except for the names of their fields which */ /* are different. */ /* */ /* This ensures that a single function in the `ttload' */ /* module is able to read both the horizontal and vertical */ /* headers. */ /* */ typedef struct TT_VertHeader_ { FT_Fixed Version; FT_Short Ascender; FT_Short Descender; FT_Short Line_Gap; FT_UShort advance_Height_Max; /* advance height maximum */ FT_Short min_Top_Side_Bearing; /* minimum left-sb or top-sb */ FT_Short min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */ FT_Short yMax_Extent; /* xmax or ymax extents */ FT_Short caret_Slope_Rise; FT_Short caret_Slope_Run; FT_Short caret_Offset; FT_Short Reserved[4]; FT_Short metric_Data_Format; FT_UShort number_Of_VMetrics; /* The following fields are not defined by the TrueType specification */ /* but they're used to connect the metrics header to the relevant */ /* `HMTX' or `VMTX' table. */ void* long_metrics; void* short_metrics; } TT_VertHeader; /*************************************************************************/ /* */ /* <Struct> */ /* TT_OS2 */ /* */ /* <Description> */ /* A structure used to model a TrueType OS/2 table. This is the long */ /* table version. All fields comply to the TrueType specification. */ /* */ /* Note that we now support old Mac fonts which do not include an */ /* OS/2 table. In this case, the `version' field is always set to */ /* 0xFFFF. */ /* */ typedef struct TT_OS2_ { FT_UShort version; /* 0x0001 - more or 0xFFFF */ FT_Short xAvgCharWidth; FT_UShort usWeightClass; FT_UShort usWidthClass; FT_Short fsType; FT_Short ySubscriptXSize; FT_Short ySubscriptYSize; FT_Short ySubscriptXOffset; FT_Short ySubscriptYOffset; FT_Short ySuperscriptXSize; FT_Short ySuperscriptYSize; FT_Short ySuperscriptXOffset; FT_Short ySuperscriptYOffset; FT_Short yStrikeoutSize; FT_Short yStrikeoutPosition; FT_Short sFamilyClass; FT_Byte panose[10]; FT_ULong ulUnicodeRange1; /* Bits 0-31 */ FT_ULong ulUnicodeRange2; /* Bits 32-63 */ FT_ULong ulUnicodeRange3; /* Bits 64-95 */ FT_ULong ulUnicodeRange4; /* Bits 96-127 */ FT_Char achVendID[4]; FT_UShort fsSelection; FT_UShort usFirstCharIndex; FT_UShort usLastCharIndex; FT_Short sTypoAscender; FT_Short sTypoDescender; FT_Short sTypoLineGap; FT_UShort usWinAscent; FT_UShort usWinDescent; /* only version 1 tables: */ FT_ULong ulCodePageRange1; /* Bits 0-31 */ FT_ULong ulCodePageRange2; /* Bits 32-63 */ /* only version 2 tables: */ FT_Short sxHeight; FT_Short sCapHeight; FT_UShort usDefaultChar; FT_UShort usBreakChar; FT_UShort usMaxContext; } TT_OS2; /*************************************************************************/ /* */ /* <Struct> */ /* TT_Postscript */ /* */ /* <Description> */ /* A structure used to model a TrueType PostScript table. All fields */ /* comply to the TrueType specification. This structure does not */ /* reference the PostScript glyph names, which can be nevertheless */ /* accessed with the `ttpost' module. */ /* */ typedef struct TT_Postscript_ { FT_Fixed FormatType; FT_Fixed italicAngle; FT_Short underlinePosition; FT_Short underlineThickness; FT_ULong isFixedPitch; FT_ULong minMemType42; FT_ULong maxMemType42; FT_ULong minMemType1; FT_ULong maxMemType1; /* Glyph names follow in the file, but we don't */ /* load them by default. See the ttpost.c file. */ } TT_Postscript; /*************************************************************************/ /* */ /* <Struct> */ /* TT_PCLT */ /* */ /* <Description> */ /* A structure used to model a TrueType PCLT table. All fields */ /* comply to the TrueType specification. */ /* */ typedef struct TT_PCLT_ { FT_Fixed Version; FT_ULong FontNumber; FT_UShort Pitch; FT_UShort xHeight; FT_UShort Style; FT_UShort TypeFamily; FT_UShort CapHeight; FT_UShort SymbolSet; FT_Char TypeFace[16]; FT_Char CharacterComplement[8]; FT_Char FileName[6]; FT_Char StrokeWeight; FT_Char WidthType; FT_Byte SerifStyle; FT_Byte Reserved; } TT_PCLT; /*************************************************************************/ /* */ /* <Struct> */ /* TT_MaxProfile */ /* */ /* <Description> */ /* The maximum profile is a table containing many max values which */ /* can be used to pre-allocate arrays. This ensures that no memory */ /* allocation occurs during a glyph load. */ /* */ /* <Fields> */ /* version :: The version number. */ /* */ /* numGlyphs :: The number of glyphs in this TrueType */ /* font. */ /* */ /* maxPoints :: The maximum number of points in a */ /* non-composite TrueType glyph. See also */ /* the structure element */ /* `maxCompositePoints'. */ /* */ /* maxContours :: The maximum number of contours in a */ /* non-composite TrueType glyph. See also */ /* the structure element */ /* `maxCompositeContours'. */ /* */ /* maxCompositePoints :: The maximum number of points in a */ /* composite TrueType glyph. See also the */ /* structure element `maxPoints'. */ /* */ /* maxCompositeContours :: The maximum number of contours in a */ /* composite TrueType glyph. See also the */ /* structure element `maxContours'. */ /* */ /* maxZones :: The maximum number of zones used for */ /* glyph hinting. */ /* */ /* maxTwilightPoints :: The maximum number of points in the */ /* twilight zone used for glyph hinting. */ /* */ /* maxStorage :: The maximum number of elements in the */ /* storage area used for glyph hinting. */ /* */ /* maxFunctionDefs :: The maximum number of function */ /* definitions in the TrueType bytecode for */ /* this font. */ /* */ /* maxInstructionDefs :: The maximum number of instruction */ /* definitions in the TrueType bytecode for */ /* this font. */ /* */ /* maxStackElements :: The maximum number of stack elements used */ /* during bytecode interpretation. */ /* */ /* maxSizeOfInstructions :: The maximum number of TrueType opcodes */ /* used for glyph hinting. */ /* */ /* maxComponentElements :: The maximum number of simple (i.e., non- */ /* composite) glyphs in a composite glyph. */ /* */ /* maxComponentDepth :: The maximum nesting depth of composite */ /* glyphs. */ /* */ /* <Note> */ /* This structure is only used during font loading. */ /* */ typedef struct TT_MaxProfile_ { FT_Fixed version; FT_UShort numGlyphs; FT_UShort maxPoints; FT_UShort maxContours; FT_UShort maxCompositePoints; FT_UShort maxCompositeContours; FT_UShort maxZones; FT_UShort maxTwilightPoints; FT_UShort maxStorage; FT_UShort maxFunctionDefs; FT_UShort maxInstructionDefs; FT_UShort maxStackElements; FT_UShort maxSizeOfInstructions; FT_UShort maxComponentElements; FT_UShort maxComponentDepth; } TT_MaxProfile; /*************************************************************************/ /* */ /* <Enum> */ /* FT_Sfnt_Tag */ /* */ /* <Description> */ /* An enumeration used to specify the index of an SFNT table. */ /* Used in the @FT_Get_Sfnt_Table API function. */ /* */ typedef enum FT_Sfnt_Tag_ { ft_sfnt_head = 0, /* TT_Header */ ft_sfnt_maxp = 1, /* TT_MaxProfile */ ft_sfnt_os2 = 2, /* TT_OS2 */ ft_sfnt_hhea = 3, /* TT_HoriHeader */ ft_sfnt_vhea = 4, /* TT_VertHeader */ ft_sfnt_post = 5, /* TT_Postscript */ ft_sfnt_pclt = 6, /* TT_PCLT */ sfnt_max /* internal end mark */ } FT_Sfnt_Tag; /* */ /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_Sfnt_Table */ /* */ /* <Description> */ /* Return a pointer to a given SFNT table within a face. */ /* */ /* <Input> */ /* face :: A handle to the source. */ /* */ /* tag :: The index of the SFNT table. */ /* */ /* <Return> */ /* A type-less pointer to the table. This will be~0 in case of */ /* error, or if the corresponding table was not found *OR* loaded */ /* from the file. */ /* */ /* Use a typecast according to `tag' to access the structure */ /* elements. */ /* */ /* <Note> */ /* The table is owned by the face object and disappears with it. */ /* */ /* This function is only useful to access SFNT tables that are loaded */ /* by the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for */ /* a list. */ /* */ FT_EXPORT( void* ) FT_Get_Sfnt_Table( FT_Face face, FT_Sfnt_Tag tag ); /************************************************************************** * * @function: * FT_Load_Sfnt_Table * * @description: * Load any font table into client memory. * * @input: * face :: * A handle to the source face. * * tag :: * The four-byte tag of the table to load. Use the value~0 if you want * to access the whole font file. Otherwise, you can use one of the * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new * one with @FT_MAKE_TAG. * * offset :: * The starting offset in the table (or file if tag == 0). * * @output: * buffer :: * The target buffer address. The client must ensure that the memory * array is big enough to hold the data. * * @inout: * length :: * If the `length' parameter is NULL, then try to load the whole table. * Return an error code if it fails. * * Else, if `*length' is~0, exit immediately while returning the * table's (or file) full size in it. * * Else the number of bytes to read from the table or file, from the * starting offset. * * @return: * FreeType error code. 0~means success. * * @note: * If you need to determine the table's length you should first call this * function with `*length' set to~0, as in the following example: * * { * FT_ULong length = 0; * * * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length ); * if ( error ) { ... table does not exist ... } * * buffer = malloc( length ); * if ( buffer == NULL ) { ... not enough memory ... } * * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); * if ( error ) { ... could not load table ... } * } */ FT_EXPORT( FT_Error ) FT_Load_Sfnt_Table( FT_Face face, FT_ULong tag, FT_Long offset, FT_Byte* buffer, FT_ULong* length ); /************************************************************************** * * @function: * FT_Sfnt_Table_Info * * @description: * Return information on an SFNT table. * * @input: * face :: * A handle to the source face. * * table_index :: * The index of an SFNT table. The function returns * FT_Err_Table_Missing for an invalid value. * * @output: * tag :: * The name tag of the SFNT table. * * length :: * The length of the SFNT table. * * @return: * FreeType error code. 0~means success. * * @note: * SFNT tables with length zero are treated as missing. * */ FT_EXPORT( FT_Error ) FT_Sfnt_Table_Info( FT_Face face, FT_UInt table_index, FT_ULong *tag, FT_ULong *length ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_CMap_Language_ID */ /* */ /* <Description> */ /* Return TrueType/sfnt specific cmap language ID. Definitions of */ /* language ID values are in `freetype/ttnameid.h'. */ /* */ /* <Input> */ /* charmap :: */ /* The target charmap. */ /* */ /* <Return> */ /* The language ID of `charmap'. If `charmap' doesn't belong to a */ /* TrueType/sfnt face, just return~0 as the default value. */ /* */ FT_EXPORT( FT_ULong ) FT_Get_CMap_Language_ID( FT_CharMap charmap ); /*************************************************************************/ /* */ /* <Function> */ /* FT_Get_CMap_Format */ /* */ /* <Description> */ /* Return TrueType/sfnt specific cmap format. */ /* */ /* <Input> */ /* charmap :: */ /* The target charmap. */ /* */ /* <Return> */ /* The format of `charmap'. If `charmap' doesn't belong to a */ /* TrueType/sfnt face, return -1. */ /* */ FT_EXPORT( FT_Long ) FT_Get_CMap_Format( FT_CharMap charmap ); /* */ FT_END_HEADER #endif /* __TTTABLES_H__ */ /* END */ �������������������������������������������������(P�����(������������������������������������������������؅P�����؅����������������������������������������������hP�����h�������������������������������������������������xP�����x�������������������������������������������������P������������������������������������������������������P�����������X�����������������������������������������P�����������x������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* tttags.h */ /* */ /* Tags for TrueType and OpenType tables (specification only). */ /* */ /* Copyright 1996-2001, 2004, 2005, 2007, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __TTAGS_H__ #define __TTAGS_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER #define TTAG_avar FT_MAKE_TAG( 'a', 'v', 'a', 'r' ) #define TTAG_BASE FT_MAKE_TAG( 'B', 'A', 'S', 'E' ) #define TTAG_bdat FT_MAKE_TAG( 'b', 'd', 'a', 't' ) #define TTAG_BDF FT_MAKE_TAG( 'B', 'D', 'F', ' ' ) #define TTAG_bhed FT_MAKE_TAG( 'b', 'h', 'e', 'd' ) #define TTAG_bloc FT_MAKE_TAG( 'b', 'l', 'o', 'c' ) #define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' ) #define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' ) #define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' ) #define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' ) #define TTAG_cvar FT_MAKE_TAG( 'c', 'v', 'a', 'r' ) #define TTAG_cvt FT_MAKE_TAG( 'c', 'v', 't', ' ' ) #define TTAG_DSIG FT_MAKE_TAG( 'D', 'S', 'I', 'G' ) #define TTAG_EBDT FT_MAKE_TAG( 'E', 'B', 'D', 'T' ) #define TTAG_EBLC FT_MAKE_TAG( 'E', 'B', 'L', 'C' ) #define TTAG_EBSC FT_MAKE_TAG( 'E', 'B', 'S', 'C' ) #define TTAG_feat FT_MAKE_TAG( 'f', 'e', 'a', 't' ) #define TTAG_FOND FT_MAKE_TAG( 'F', 'O', 'N', 'D' ) #define TTAG_fpgm FT_MAKE_TAG( 'f', 'p', 'g', 'm' ) #define TTAG_fvar FT_MAKE_TAG( 'f', 'v', 'a', 'r' ) #define TTAG_gasp FT_MAKE_TAG( 'g', 'a', 's', 'p' ) #define TTAG_GDEF FT_MAKE_TAG( 'G', 'D', 'E', 'F' ) #define TTAG_glyf FT_MAKE_TAG( 'g', 'l', 'y', 'f' ) #define TTAG_GPOS FT_MAKE_TAG( 'G', 'P', 'O', 'S' ) #define TTAG_GSUB FT_MAKE_TAG( 'G', 'S', 'U', 'B' ) #define TTAG_gvar FT_MAKE_TAG( 'g', 'v', 'a', 'r' ) #define TTAG_hdmx FT_MAKE_TAG( 'h', 'd', 'm', 'x' ) #define TTAG_head FT_MAKE_TAG( 'h', 'e', 'a', 'd' ) #define TTAG_hhea FT_MAKE_TAG( 'h', 'h', 'e', 'a' ) #define TTAG_hmtx FT_MAKE_TAG( 'h', 'm', 't', 'x' ) #define TTAG_JSTF FT_MAKE_TAG( 'J', 'S', 'T', 'F' ) #define TTAG_just FT_MAKE_TAG( 'j', 'u', 's', 't' ) #define TTAG_kern FT_MAKE_TAG( 'k', 'e', 'r', 'n' ) #define TTAG_lcar FT_MAKE_TAG( 'l', 'c', 'a', 'r' ) #define TTAG_loca FT_MAKE_TAG( 'l', 'o', 'c', 'a' ) #define TTAG_LTSH FT_MAKE_TAG( 'L', 'T', 'S', 'H' ) #define TTAG_LWFN FT_MAKE_TAG( 'L', 'W', 'F', 'N' ) #define TTAG_MATH FT_MAKE_TAG( 'M', 'A', 'T', 'H' ) #define TTAG_maxp FT_MAKE_TAG( 'm', 'a', 'x', 'p' ) #define TTAG_META FT_MAKE_TAG( 'M', 'E', 'T', 'A' ) #define TTAG_MMFX FT_MAKE_TAG( 'M', 'M', 'F', 'X' ) #define TTAG_MMSD FT_MAKE_TAG( 'M', 'M', 'S', 'D' ) #define TTAG_mort FT_MAKE_TAG( 'm', 'o', 'r', 't' ) #define TTAG_morx FT_MAKE_TAG( 'm', 'o', 'r', 'x' ) #define TTAG_name FT_MAKE_TAG( 'n', 'a', 'm', 'e' ) #define TTAG_opbd FT_MAKE_TAG( 'o', 'p', 'b', 'd' ) #define TTAG_OS2 FT_MAKE_TAG( 'O', 'S', '/', '2' ) #define TTAG_OTTO FT_MAKE_TAG( 'O', 'T', 'T', 'O/***************************************************************************/ /* */ /* ttunpat.h */ /* */ /* Definitions for the unpatented TrueType hinting system */ /* */ /* Copyright 2003, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* Written by Graham Asher <graham.asher@btinternet.com> */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __TTUNPAT_H__ #define __TTUNPAT_H__ #include <ft2build.h> #include FT_FREETYPE_H #ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first." #endif FT_BEGIN_HEADER /*************************************************************************** * * @constant: * FT_PARAM_TAG_UNPATENTED_HINTING * * @description: * A constant used as the tag of an @FT_Parameter structure to indicate * that unpatented methods only should be used by the TrueType bytecode * interpreter for a typeface opened by @FT_Open_Face. * */ #define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) /* */ FT_END_HEADER #endif /* __TTUNPAT_H__ */ /* END */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������7���o������� @����� ������p����������������������������D���o�������� @������ ������ ����������������������������S������������� @����� ����������������������������������]������������� @����� ��������������� �����������������g�������������@�����������������������������������������b�������������@���������������������������������������m�������������@�����������=�����������������������������s�������������P@�����P������������������������������������y�������������P@�����P������[�������������� ����������������������������f@�����f��������������������������������������������������pP������p������ ������������������������������������������� pP����� p������������������������������������������������vP�����v����������������������������������������������0xP�����0x�������������������������������������������������@xP�����@x�������������������������������������������������PxP�����Px�������������������������������������������������XxP�����Xx������p�����������������������������������������yP�����y�������������������� �������������������������������������y���������������������������������������������������������}���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� �� �� �� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 2004 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project * by Chris Pressey <cpressey@catseye.mine.nu>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of The DragonFly Project nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific, prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * buffer.h * $Id: buffer.h,v 1.3 2005/09/01 19:23:14 cpressey Exp $ */ #ifndef __AURA_BUFFER_H_ #define __AURA_BUFFER_H_ #include <stdlib.h> #ifdef __cplusplus extern "C" { #endif struct aura_buffer { char *buf; size_t len; size_t size; size_t pos; }; struct aura_buffer *aura_buffer_new(size_t); void aura_buffer_free(struct aura_buffer *); char *aura_buffer_buf(struct aura_buffer *); size_t aura_buffer_len(struct aura_buffer *); size_t aura_buffer_size(struct aura_buffer *); void aura_buffer_ensure_size(struct aura_buffer *, size_t); void aura_buffer_set(struct aura_buffer *, const char *, size_t); void aura_buffer_append(struct aura_buffer *, const char *, size_t); void aura_buffer_cpy(struct aura_buffer *, const char *); void aura_buffer_cat(struct aura_buffer *, const char *); int aura_buffer_cat_file(struct aura_buffer *, const char *, ...); int aura_buffer_cat_pipe(struct aura_buffer *, const char *, ...); int aura_buffer_seek(struct aura_buffer *, size_t); size_t aura_buffer_tell(struct aura_buffer *); int aura_buffer_eof(struct aura_buffer *); char aura_buffer_peek_char(struct aura_buffer *); char aura_buffer_scan_char(struct aura_buffer *); int aura_buffer_compare(struct aura_buffer *, const char *); int aura_buffer_expect(struct aura_buffer *, const char *); void aura_buffer_push(struct aura_buffer *, const void *, size_t); int aura_buffer_pop(struct aura_buffer *, void *, size_t); #ifdef __cplusplus } #endif #endif /* !__AURA_BUFFER_H_ */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� �.������..����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************/ /* */ /* ttnameid.h */ /* */ /* TrueType name ID definitions (specification only). */ /* */ /* Copyright 1996-2002, 2003, 2004, 2006, 2007, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __TTNAMEID_H__ #define __TTNAMEID_H__ #include <ft2build.h> FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Section> */ /* truetype_tables */ /* */ /*************************************************************************/ /* */ /* Possible values for the `platform' identifier code in the name */ /* records of the TTF `name' table. */ /* */ /*************************************************************************/ /*********************************************************************** * * @enum: * TT_PLATFORM_XXX * * @description: * A list of valid values for the `platform_id' identifier code in * @FT_CharMapRec and @FT_SfntName structures. * * @values: * TT_PLATFORM_APPLE_UNICODE :: * Used by Apple to indicate a Unicode character map and/or name entry. * See @TT_APPLE_ID_XXX for corresponding `encoding_id' values. Note * that name entries in this format are coded as big-endian UCS-2 * character codes _only_. * * TT_PLATFORM_MACINTOSH :: * Used by Apple to indicate a MacOS-specific charmap and/or name entry. * See @TT_MAC_ID_XXX for corresponding `encoding_id' values. Note that * most TrueType fonts contain an Apple roman charmap to be usable on * MacOS systems (even if they contain a Microsoft charmap as well). * * TT_PLATFORM_ISO :: * This value was used to specify ISO/IEC 10646 charmaps. It is however * now deprecated. See @TT_ISO_ID_XXX for a list of corresponding * `encoding_id' values. * * TT_PLATFORM_MICROSOFT :: * Used by Microsoft to indicate Windows-specific charmaps. See * @TT_MS_ID_XXX for a list of corresponding `encoding_id' values. * Note that most fonts contain a Unicode charmap using * (TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS). * * TT_PLATFORM_CUSTOM :: * Used to indicate application-specific charmaps. * * TT_PLATFORM_ADOBE :: * This value isn't part of any font format specification, but is used * by FreeType to report Adobe-specific charmaps in an @FT_CharMapRec * structure. See @TT_ADOBE_ID_XXX. */ #define TT_PLATFORM_APPLE_UNICODE 0 #define TT_PLATFORM_MACINTOSH 1 #define TT_PLATFORM_ISO 2 /* deprecated */ #define TT_PLATFORM_MICROSOFT 3 #define TT_PLATFORM_CUSTOM 4 #define TT_PLATFORM_ADOBE 7 /* artificial */ /*********************************************************************** * * @enum: * TT_APPLE_ID_XXX * * @description: * A list of valid values for the `encoding_id' for * @TT_PLATFORM_APPLE_UNICODE charmaps and name entries. * * @values: * TT_APPLE_ID_DEFAULT :: * Unicode version 1.0. * * TT_APPLE_ID_UNICODE_1_1 :: * Unicode 1.1; specifies Hangul characters starting at U+34xx. * * TT_APPLE_ID_ISO_10646 :: * Deprecated (identical to preceding). * * TT_APPLE_ID_UNICODE_2_0 :: * Unicode 2.0 and beyond (UTF-16 BMP only). * * TT_APPLE_ID_UNICODE_32 :: * Unicode 3.1 and beyond, using UTF-32. * * TT_APPLE_ID_VARIANT_SELECTOR :: * From Adobe, not Apple. Not a normal cmap. Specifies variations * on a real cmap. */ #define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */ #define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */ #define TT_APPLE_ID_ISO_10646 2 /* deprecated */ #define TT_APPLE_ID_UNICODE_2_0 3 /* or later */ #define TT_APPLE_ID_UNICODE_32 4 /* 2.0 or later, full repertoire */ #define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */ /*********************************************************************** * * @enum: * TT_MAC_ID_XXX * * @description: * A list of valid values for the `encoding_id' for * @TT_PLATFORM_MACINTOSH charmaps and name entries. * * @values: * TT_MAC_ID_ROMAN :: * TT_MAC_ID_JAPANESE :: * TT_MAC_ID_TRADITIONAL_CHINESE :: * TT_MAC_ID_KOREAN :: * TT_MAC_ID_ARABIC :: * TT_MAC_ID_HEBREW :: * TT_MAC_ID_GREEK :: * TT_MAC_ID_RUSSIAN :: * TT_MAC_ID_RSYMBOL :: * TT_MAC_ID_DEVANAGARI :: * TT_MAC_ID_GURMUKHI :: * TT_MAC_ID_GUJARATI :: * TT_MAC_ID_ORIYA :: * TT_MAC_ID_BENGALI :: * TT_MAC_ID_TAMIL :: * TT_MAC_ID_TELUGU :: * TT_MAC_ID_KANNADA :: * TT_MAC_ID_MALAYALAM :: * TT_MAC_ID_SINHALESE :: * TT_MAC_ID_BURMESE :: * TT_MAC_ID_KHMER :: * TT_MAC_ID_THAI :: * TT_MAC_ID_LAOTIAN :: * TT_MAC_ID_GEORGIAN :: * TT_MAC_ID_ARMENIAN :: * TT_MAC_ID_MALDIVIAN :: * TT_MAC_ID_SIMPLIFIED_CHINESE :: * TT_MAC_ID_TIBETAN :: * TT_MAC_ID_MONGOLIAN :: * TT_MAC_ID_GEEZ :: * TT_MAC_ID_SLAVIC :: * TT_MAC_ID_VIETNAMESE :: * TT_MAC_ID_SINDHI :: * TT_MAC_ID_UNINTERP :: */ #define TT_MAC_ID_ROMAN 0 #define TT_MAC_ID_JAPANESE 1 #define TT_MAC_ID_TRADITIONAL_CHINESE 2 #define TT_MAC_ID_KOREAN 3 #define TT_MAC_ID_ARABIC 4 #define TT_MAC_ID_HEBREW 5 #define TT_MAC_ID_GREEK 6 #define TT_MAC_ID_RUSSIAN 7 #define TT_MAC_ID_RSYMBOL 8 #define TT_MAC_ID_DEVANAGARI 9 #define TT_MAC_ID_GURMUKHI 10 #define TT_MAC_ID_GUJARATI 11 #define TT_MAC_ID_ORIYA 12 #define TT_MAC_ID_BENGALI 13 #define TT_MAC_ID_TAMIL 14 #define TT_MAC_ID_TELUGU 15 #define TT_MAC_ID_KANNADA 16 #define TT_MAC_ID_MALAYALAM 17 #define TT_MAC_ID_SINHALESE 18 #define TT_MAC_ID_BURMESE 19 #define TT_MAC_ID_KHMER 20 #define TT_MAC_ID_THAI 21 #define TT_MAC_ID_LAOTIAN 22 #define TT_MAC_ID_GEORGIAN 23 #define TT_MAC_ID_ARMENIAN 24 #define TT_MAC_ID_MALDIVIAN 25 #define TT_MAC_ID_SIMPLIFIED_CHINESE 25 #define TT_MAC_ID_TIBETAN 26 #define TT_MAC_ID_MONGOLIAN 27 #define TT_MAC_ID_GEEZ 28 #define TT_MAC_ID_SLAVIC 29 #define TT_MAC_ID_VIETNAMESE 30 #define TT_MAC_ID_SINDHI 31 #define TT_MAC_ID_UNINTERP 32 /*********************************************************************** * * @enum: * TT_ISO_ID_XXX * * @description: * A list of valid values for the `encoding_id' for * @TT_PLATFORM_ISO charmaps and name entries. * * Their use is now deprecated. * * @values: * TT_ISO_ID_7BIT_ASCII :: * ASCII. * TT_ISO_ID_10646 :: * ISO/10646. * TT_ISO_ID_8859_1 :: * Also known as Latin-1. */ #define TT_ISO_ID_7BIT_ASCII 0 #define TT_ISO_ID_10646 1 #define TT_ISO_ID_8859_1 2 /*********************************************************************** * * @enum: * TT_MS_ID_XXX * * @description: * A list of valid values for the `encoding_id' for * @TT_PLATFORM_MICROSOFT charmaps and name entries. * * @values: * TT_MS_ID_SYMBOL_CS :: * Corresponds to Microsoft symbol encoding. See * @FT_ENCODING_MS_SYMBOL. * * TT_MS_ID_UNICODE_CS :: * Corresponds to a Microsoft WGL4 charmap, matching Unicode. See * @FT_ENCODING_UNICODE. * * TT_MS_ID_SJIS :: * Corresponds to SJIS Japanese encoding. See @FT_ENCODING_SJIS. * * TT_MS_ID_GB2312 :: * Corresponds to Simplified Chinese as used in Mainland China. See * @FT_ENCODING_GB2312. * * TT_MS_ID_BIG_5 :: * Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. * See @FT_ENCODING_BIG5. * * TT_MS_ID_WANSUNG :: * Corresponds to Korean Wansung encoding. See @FT_ENCODING_WANSUNG. * * TT_MS_ID_JOHAB :: * Corresponds to Johab encoding. See @FT_ENCODING_JOHAB. * * TT_MS_ID_UCS_4 :: * Corresponds to UCS-4 or UTF-32 charmaps. This has been added to * the OpenType specification version 1.4 (mid-2001.) */ #define TT_MS_ID_SYMBOL_CS 0 #define TT_MS_ID_UNICODE_CS 1 #define TT_MS_ID_SJIS 2 #define TT_MS_ID_GB2312 3 #define TT_MS_ID_BIG_5 4 #define TT_MS_ID_WANSUNG 5 #define TT_MS_ID_JOHAB 6 #define TT_MS_ID_UCS_4 10 /*********************************************************************** * * @enum: * TT_ADOBE_ID_XXX * * @description: * A list of valid values for the `encoding_id' for * @TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific extension! * * @values: * TT_ADOBE_ID_STANDARD :: * Adobe standard encoding. * TT_ADOBE_ID_EXPERT :: * Adobe expert encoding. * TT_ADOBE_ID_CUSTOM :: * Adobe custom encoding. * TT_ADOBE_ID_LATIN_1 :: * Adobe Latin~1 encoding. */ #define TT_ADOBE_ID_STANDARD 0 #define TT_ADOBE_ID_EXPERT 1 #define TT_ADOBE_ID_CUSTOM 2 #define TT_ADOBE_ID_LATIN_1 3 /*************************************************************************/ /* */ /* Possible values of the language identifier field in the name records */ /* of the TTF `name' table if the `platform' identifier code is */ /* TT_PLATFORM_MACINTOSH. */ /* */ /* The canonical source for the Apple assigned Language ID's is at */ /* */ /* http://fonts.apple.com/TTRefMan/RM06/Chap6name.html */ /* */ #define TT_MAC_LANGID_ENGLISH 0 #define TT_MAC_LANGID_FRENCH 1 #define TT_MAC_LANGID_GERMAN 2 #define TT_MAC_LANGID_ITALIAN 3 #define TT_MAC_LANGID_DUTCH 4 #define TT_MAC_LANGID_SWEDISH 5 #define TT_MAC_LANGID_SPANISH 6 #define TT_MAC_LANGID_DANISH 7 #define TT_MAC_LANGID_PORTUGUESE 8 #define TT_MAC_LANGID_NORWEGIAN 9 #define TT_MAC_LANGID_HEBREW 10 #define TT_MAC_LANGID_JAPANESE 11 #define TT_MAC_LANGID_ARABIC 12 #define TT_MAC_LANGID_FINNISH 13 #define TT_MAC_LANGID_GREEK 14 #define TT_MAC_LANGID_ICELANDIC 15 #define TT_MAC_LANGID_MALTESE 16 #define TT_MAC_LANGID_TURKISH 17 #define TT_MAC_LANGID_CROATIAN 18 #define TT_MAC_LANGID_CHINESE_TRADITIONAL 19 #define TT_MAC_LANGID_URDU 20 #define TT_MAC_LANGID_HINDI 21 #define TT_MAC_LANGID_THAI 22 #define TT_MAC_LANGID_KOREAN 23 #define TT_MAC_LANGID_LITHUANIAN 24 #define TT_MAC_LANGID_POLISH 25 #define TT_MAC_LANGID_HUNGARIAN 26 #define TT_MAC_LANGID_ESTONIAN 27 #define TT_MAC_LANGID_LETTISH 28 #define TT_MAC_LANGID_SAAMISK 29 #define TT_MAC_LANGID_FAEROESE 30 #define TT_MAC_LANGID_FARSI 31 #define TT_MAC_LANGID_RUSSIAN 32 #define TT_MAC_LANGID_CHINESE_SIMPLIFIED 33 #define TT_MAC_LANGID_FLEMISH 34 #define TT_MAC_LANGID_IRISH 35 #define TT_MAC_LANGID_ALBANIAN 36 #define TT_MAC_LANGID_ROMANIAN 37 #define TT_MAC_LANGID_CZECH 38 #define TT_MAC_LANGID_SLOVAK 39 #define TT_MAC_LANGID_SLOVENIAN 40 #define TT_MAC_LANGID_YIDDISH 41 #define TT_MAC_LANGID_SERBIAN 42 #define TT_MAC_LANGID_MACEDONIAN 43 #define TT_MAC_LANGID_BULGARIAN 44 #define TT_MAC_LANGID_UKRAINIAN 45 #define TT_MAC_LANGID_BYELORUSSIAN 46 #define TT_MAC_LANGID_UZBEK 47 #define TT_MAC_LANGID_KAZAKH 48 #define TT_MAC_LANGID_AZERBAIJANI 49 #define TT_MAC_LANGID_AZERBAIJANI_CYRILLIC_SCRIPT 49 #define TT_MAC_LANGID_AZERBAIJANI_ARABIC_SCRIPT 50 #define TT_MAC_LANGID_ARMENIAN 51 #define TT_MAC_LANGID_GEORGIAN 52 #define TT_MAC_LANGID_MOLDAVIAN 53 #define TT_MAC_LANGID_KIRGHIZ 54 #define TT_MAC_LANGID_TAJIKI 55 #define TT_MAC_LANGID_TURKMEN 56 #define TT_MAC_LANGID_MONGOLIAN 57 #define TT_MAC_LANGID_MONGOLIAN_MONGOLIAN_SCRIPT 57 #define TT_MAC_LANGID_MONGOLIAN_CYRILLIC_SCRIPT 58 #define TT_MAC_LANGID_PASHTO 59 #define TT_MAC_LANGID_KURDISH 60 #define TT_MAC_LANGID_KASHMIRI 61 #define TT_MAC_LANGID_SINDHI 62 #define TT_MAC_LANGID_TIBETAN 63 #define TT_MAC_LANGID_NEPALI 64 #define TT_MAC_LANGID_SANSKRIT 65 #define TT_MAC_LANGID_MARATHI 66 #define TT_MAC_LANGID_BENGALI 67 #define TT_MAC_LANGID_ASSAMESE 68 #define TT_MAC_LANGID_GUJARATI 69 #define TT_MAC_LANGID_PUNJABI 70 #define TT_MAC_LANGID_ORIYA 71 #define TT_MAC_LANGID_MALAYALAM 72 #define TT_MAC_LANGID_KANNADA 73 #define TT_MAC_LANGID_TAMIL 74 #define TT_MAC_LANGID_TELUGU 75 #define TT_MAC_LANGID_SINHALESE 76 #define TT_MAC_LANGID_BURMESE 77 #define TT_MAC_LANGID_KHMER 78 #define TT_MAC_LANGID_LAO 79 #define TT_MAC_LANGID_VIETNAMESE 80 #define TT_MAC_LANGID_INDONESIAN 81 #define TT_MAC_LANGID_TAGALOG 82 #define TT_MAC_LANGID_MALAY_ROMAN_SCRIPT 83 #define TT_MAC_LANGID_MALAY_ARABIC_SCRIPT 84 #define TT_MAC_LANGID_AMHARIC 85 #define TT_MAC_LANGID_TIGRINYA 86 #define TT_MAC_LANGID_GALLA 87 #define TT_MAC_LANGID_SOMALI 88 #define TT_MAC_LANGID_SWAHILI 89 #define TT_MAC_LANGID_RUANDA 90 #define TT_MAC_LANGID_RUNDI 91 #define TT_MAC_LANGID_CHEWA 92 #define TT_MAC_LANGID_MALAGASY 93 #define TT_MAC_LANGID_ESPERANTO 94 #define TT_MAC_LANGID_WELSH 128 #define TT_MAC_LANGID_BASQUE 129 #define TT_MAC_LANGID_CATALAN 130 #define TT_MAC_LANGID_LATIN 131 #define TT_MAC_LANGID_QUECHUA 132 #define TT_MAC_LANGID_GUARANI 133 #define TT_MAC_LANGID_AYMARA 134 #define TT_MAC_LANGID_TATAR 135 #define TT_MAC_LANGID_UIGHUR 136 #define TT_MAC_LANGID_DZONGKHA 137 #define TT_MAC_LANGID_JAVANESE 138 #define TT_MAC_LANGID_SUNDANESE 139 #if 0 /* these seem to be errors that have been dropped */ #define TT_MAC_LANGID_SCOTTISH_GAELIC 140 #define TT_MAC_LANGID_IRISH_GAELIC 141 #endif /* The following codes are new as of 2000-03-10 */ #define TT_MAC_LANGID_GALICIAN 140 #define TT_MAC_LANGID_AFRIKAANS 141 #define TT_MAC_LANGID_BRETON 142 #define TT_MAC_LANGID_INUKTITUT 143 #define TT_MAC_LANGID_SCOTTISH_GAELIC 144 #define TT_MAC_LANGID_MANX_GAELIC 145 #define TT_MAC_LANGID_IRISH_GAELIC 146 #define TT_MAC_LANGID_TONGAN 147 #define TT_MAC_LANGID_GREEK_POLYTONIC 148 #define TT_MAC_LANGID_GREELANDIC 149 #define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT 150 /*************************************************************************/ /* */ /* Possible values of the language identifier field in the name records */ /* of the TTF `name' table if the `platform' identifier code is */ /* TT_PLATFORM_MICROSOFT. */ /* */ /* The canonical source for the MS assigned LCID's (seems to) be at */ /* */ /* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */ /* */ /* It used to be at various places, among them */ /* */ /* http://www.microsoft.com/typography/OTSPEC/lcid-cp.txt */ /* http://www.microsoft.com/globaldev/reference/loclanghome.asp */ /* http://support.microsoft.com/support/kb/articles/Q224/8/04.ASP */ /* http://msdn.microsoft.com/library/en-us/passport25/ */ /* NET_Passport_VBScript_Documentation/Single_Sign_In/ */ /* Advanced_Single_Sign_In/Localization_and_LCIDs.asp */ /* */ /* Hopefully, it seems now that the Globaldev site prevails... */ /* (updated by Antoine, 2004-02-17) */ #define TT_MS_LANGID_ARABIC_GENERAL 0x0001 #define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 #define TT_MS_LANGID_ARABIC_IRAQ 0x0801 #define TT_MS_LANGID_ARABIC_EGYPT 0x0c01 #define TT_MS_LANGID_ARABIC_LIBYA 0x1001 #define TT_MS_LANGID_ARABIC_ALGERIA 0x1401 #define TT_MS_LANGID_ARABIC_MOROCCO 0x1801 #define TT_MS_LANGID_ARABIC_TUNISIA 0x1c01 #define TT_MS_LANGID_ARABIC_OMAN 0x2001 #define TT_MS_LANGID_ARABIC_YEMEN 0x2401 #define TT_MS_LANGID_ARABIC_SYRIA 0x2801 #define TT_MS_LANGID_ARABIC_JORDAN 0x2c01 #define TT_MS_LANGID_ARABIC_LEBANON 0x3001 #define TT_MS_LANGID_ARABIC_KUWAIT 0x3401 #define TT_MS_LANGID_ARABIC_UAE 0x3801 #define TT_MS_LANGID_ARABIC_BAHRAIN 0x3c01 #define TT_MS_LANGID_ARABIC_QATAR 0x4001 #define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402 #define TT_MS_LANGID_CATALAN_SPAIN 0x0403 #define TT_MS_LANGID_CHINESE_GENERAL 0x0004 #define TT_MS_LANGID_CHINESE_TAIWAN 0x0404 #define TT_MS_LANGID_CHINESE_PRC 0x0804 #define TT_MS_LANGID_CHINESE_HONG_KONG 0x0c04 #define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004 #if 1 /* this looks like the correct value */ #define TT_MS_LANGID_CHINESE_MACAU 0x1404 #else /* but beware, Microsoft may change its mind... the most recent Word reference has the following: */ #define TT_MS_LANGID_CHINESE_MACAU TT_MS_LANGID_CHINESE_HONG_KONG #endif #if 0 /* used only with .NET `cultures'; commented out */ #define TT_MS_LANGID_CHINESE_TRADITIONAL 0x7C04 #endif #define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405 #define TT_MS_LANGID_DANISH_DENMARK 0x0406 #define TT_MS_LANGID_GERMAN_GERMANY 0x0407 #define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807 #define TT_MS_LANGID_GERMAN_AUSTRIA 0x0c07 #define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007 #define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407 #define TT_MS_LANGID_GREEK_GREECE 0x0408 /* don't ask what this one means... It is commented out currently. */ #if 0 #define TT_MS_LANGID_GREEK_GREECE2 0x2008 #endif #define TT_MS_LANGID_ENGLISH_GENERAL 0x0009 #define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 #define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809 #define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0c09 #define TT_MS_LANGID_ENGLISH_CANADA 0x1009 #define TT_MS_LANGID_ENGLISH_NEW_ZEALAND 0x1409 #define TT_MS_LANGID_ENGLISH_IRELAND 0x1809 #define TT_MS_LANGID_ENGLISH_SOUTH_AFRICA 0x1c09 #define TT_MS_LANGID_ENGLISH_JAMAICA 0x2009 #define TT_MS_LANGID_ENGLISH_CARIBBEAN 0x2409 #define TT_MS_LANGID_ENGLISH_BELIZE 0x2809 #define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2c09 #define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009 #define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409 #define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809 #define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3c09 #define TT_MS_LANGID_ENGLISH_INDIA 0x4009 #define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409 #define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809 #define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040a #define TT_MS_LANGID_SPANISH_MEXICO 0x080a #define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0c0a #define TT_MS_LANGID_SPANISH_GUATEMALA 0x100a #define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140a #define TT_MS_LANGID_SPANISH_PANAMA 0x180a #define TT_MS_LANGID_SPANISH_DOMINICAN_REPUBLIC 0x1c0a #define TT_MS_LANGID_SPANISH_VENEZUELA 0x200a #define TT_MS_LANGID_SPANISH_COLOMBIA 0x240a #define TT_MS_LANGID_SPANISH_PERU 0x280a #define TT_MS_LANGID_SPANISH_ARGENTINA 0x2c0a #define TT_MS_LANGID_SPANISH_ECUADOR 0x300a #define TT_MS_LANGID_SPANISH_CHILE 0x340a #define TT_MS_LANGID_SPANISH_URUGUAY 0x380a #define TT_MS_LANGID_SPANISH_PARAGUAY 0x3c0a #define TT_MS_LANGID_SPANISH_BOLIVIA 0x400a #define TT_MS_LANGID_SPANISH_EL_SALVADOR 0x440a #define TT_MS_LANGID_SPANISH_HONDURAS 0x480a #define TT_MS_LANGID_SPANISH_NICARAGUA 0x4c0a #define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500a #define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540a /* The following ID blatantly violate MS specs by using a */ /* sublanguage > 0x1F. */ #define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40aU #define TT_MS_LANGID_FINNISH_FINLAND 0x040b #define TT_MS_LANGID_FRENCH_FRANCE 0x040c #define TT_MS_LANGID_FRENCH_BELGIUM 0x080c #define TT_MS_LANGID_FRENCH_CANADA 0x0c0c #define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100c #define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140c #define TT_MS_LANGID_FRENCH_MONACO 0x180c #define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1c0c #define TT_MS_LANGID_FRENCH_REUNION 0x200c #define TT_MS_LANGID_FRENCH_CONGO 0x240c /* which was formerly: */ #define TT_MS_LANGID_FRENCH_ZAIRE TT_MS_LANGID_FRENCH_CONGO #define TT_MS_LANGID_FRENCH_SENEGAL 0x280c #define TT_MS_LANGID_FRENCH_CAMEROON 0x2c0c #define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300c #define TT_MS_LANGID_FRENCH_MALI 0x340c #define TT_MS_LANGID_FRENCH_MOROCCO 0x380c #define TT_MS_LANGID_FRENCH_HAITI 0x3c0c /* and another violation of the spec (see 0xE40aU) */ #define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40cU #define TT_MS_LANGID_HEBREW_ISRAEL 0x040d #define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040e #define TT_MS_LANGID_ICELANDIC_ICELAND 0x040f #define TT_MS_LANGID_ITALIAN_ITALY 0x0410 #define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810 #define TT_MS_LANGID_JAPANESE_JAPAN 0x0411 #define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA 0x0412 #define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 #define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413 #define TT_MS_LANGID_DUTCH_BELGIUM 0x0813 #define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414 #define TT_MS_LANGID_NORWEGIAN_NORWAY_NYNORSK 0x0814 #define TT_MS_LANGID_POLISH_POLAND 0x0415 #define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416 #define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816 #define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND 0x0417 #define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418 #define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 #define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419 #define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 #define TT_MS_LANGID_CROATIAN_CROATIA 0x041a #define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081a #define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0c1a #if 0 /* this used to be this value, but it looks like we were wrong */ #define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101a #else /* current sources say */ #define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101a #define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141a /* and XPsp2 Platform SDK added (2004-07-26) */ /* Names are shortened to be significant within 40 chars. */ #define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181a #define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181a #endif #define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041b #define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041c #define TT_MS_LANGID_SWEDISH_SWEDEN 0x041d #define TT_MS_LANGID_SWEDISH_FINLAND 0x081d #define TT_MS_LANGID_THAI_THAILAND 0x041e #define TT_MS_LANGID_TURKISH_TURKEY 0x041f #define TT_MS_LANGID_URDU_PAKISTAN 0x0420 #define TT_MS_LANGID_URDU_INDIA 0x0820 #define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421 #define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422 #define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423 #define TT_MS_LANGID_SLOVENE_SLOVENIA 0x0424 #define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425 #define TT_MS_LANGID_LATVIAN_LATVIA 0x0426 #define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427 #define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 #define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428 #define TT_MS_LANGID_FARSI_IRAN 0x0429 #define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042a #define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042b #define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042c #define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082c #define TT_MS_LANGID_BASQUE_SPAIN 0x042d #define TT_MS_LANGID_SORBIAN_GERMANY 0x042e #define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042f #define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 #define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 #define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432 #define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 #define TT_MS_LANGID_XHOSA_SOUTH_AFRICA 0x0434 #define TT_MS_LANGID_ZULU_SOUTH_AFRICA 0x0435 #define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436 #define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437 #define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438 #define TT_MS_LANGID_HINDI_INDIA 0x0439 #define TT_MS_LANGID_MALTESE_MALTA 0x043a /* Added by XPsp2 Platform SDK (2004-07-26) */ #define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043b #define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083b #define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3b #define TT_MS_LANGID_SAMI_LULE_NORWAY 0x103b #define TT_MS_LANGID_SAMI_LULE_SWEDEN 0x143b #define TT_MS_LANGID_SAMI_SOUTHERN_NORWAY 0x183b #define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3b #define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203b #define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243b /* ... and we also keep our old identifier... */ #define TT_MS_LANGID_SAAMI_LAPONIA 0x043b #if 0 /* this seems to be a previous inversion */ #define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c #define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c #else #define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083c #define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043c #endif #define TT_MS_LANGID_YIDDISH_GERMANY 0x043d #define TT_MS_LANGID_MALAY_MALAYSIA 0x043e #define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083e #define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043f #define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440 /* alias declared in Windows 2000 */ #define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \ TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN #define TT_MS_LANGID_SWAHILI_KENYA 0x0441 #define TT_MS_LANGID_TURKMEN_TURKMENISTAN 0x0442 #define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443 #define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843 #define TT_MS_LANGID_TATAR_TATARSTAN 0x0444 #define TT_MS_LANGID_BENGALI_INDIA 0x0445 #define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845 #define TT_MS_LANGID_PUNJABI_INDIA 0x0446 #define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846 #define TT_MS_LANGID_GUJARATI_INDIA 0x0447 #define TT_MS_LANGID_ORIYA_INDIA 0x0448 #define TT_MS_LANGID_TAMIL_INDIA 0x0449 #define TT_MS_LANGID_TELUGU_INDIA 0x044a #define TT_MS_LANGID_KANNADA_INDIA 0x044b #define TT_MS_LANGID_MALAYALAM_INDIA 0x044c #define TT_MS_LANGID_ASSAMESE_INDIA 0x044d #define TT_MS_LANGID_MARATHI_INDIA 0x044e #define TT_MS_LANGID_SANSKRIT_INDIA 0x044f #define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450 #define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN 0x0850 #define TT_MS_LANGID_TIBETAN_CHINA 0x0451 /* Don't use the next constant! It has */ /* (1) the wrong spelling (Dzonghka) */ /* (2) Microsoft doesn't officially define it -- */ /* at least it is not in the List of Local */ /* ID Values. */ /* (3) Dzongkha is not the same language as */ /* Tibetan, so merging it is wrong anyway. */ /* */ /* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW. */ #define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851 #if 0 /* the following used to be defined */ #define TT_MS_LANGID_TIBETAN_BHUTAN 0x0451 /* ... but it was changed; */ #else /* So we will continue to #define it, but with the correct value */ #define TT_MS_LANGID_TIBETAN_BHUTAN TT_MS_LANGID_DZONGHKA_BHUTAN #endif #define TT_MS_LANGID_WELSH_WALES 0x0452 #define TT_MS_LANGID_KHMER_CAMBODIA 0x0453 #define TT_MS_LANGID_LAO_LAOS 0x0454 #define TT_MS_LANGID_BURMESE_MYANMAR 0x0455 #define TT_MS_LANGID_GALICIAN_SPAIN 0x0456 #define TT_MS_LANGID_KONKANI_INDIA 0x0457 #define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458 #define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459 #define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859 /* Missing a LCID for Sindhi in Devanagari script */ #define TT_MS_LANGID_SYRIAC_SYRIA 0x045a #define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045b #define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045c #define TT_MS_LANGID_INUKTITUT_CANADA 0x045d #define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045e #define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045f #define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085f /* Missing a LCID for Tifinagh script */ #define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460 /* Spelled this way by XPsp2 Platform SDK (2004-07-26) */ /* script is yet unclear... might be Arabic, Nagari or Sharada */ #define TT_MS_LANGID_KASHMIRI_SASIA 0x0860 /* ... and aliased (by MS) for compatibility reasons. */ #define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA #define TT_MS_LANGID_NEPALI_NEPAL 0x0461 #define TT_MS_LANGID_NEPALI_INDIA 0x0861 #define TT_MS_LANGID_FRISIAN_NETHERLANDS 0x0462 #define TT_MS_LANGID_PASHTO_AFGHANISTAN 0x0463 #define TT_MS_LANGID_FILIPINO_PHILIPPINES 0x0464 #define TT_MS_LANGID_DHIVEHI_MALDIVES 0x0465 /* alias declared in Windows 2000 */ #define TT_MS_LANGID_DIVEHI_MALDIVES TT_MS_LANGID_DHIVEHI_MALDIVES #define TT_MS_LANGID_EDO_NIGERIA 0x0466 #define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467 #define TT_MS_LANGID_HAUSA_NIGERIA 0x0468 #define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469 #define TT_MS_LANGID_YORUBA_NIGERIA 0x046a #define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046b #define TT_MS_LANGID_QUECHUA_ECUADOR 0x086b #define TT_MS_LANGID_QUECHUA_PERU 0x0c6b #define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046c /* Also spelled by XPsp2 Platform SDK (2004-07-26) */ #define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \ TT_MS_LANGID_SEPEDI_SOUTH_AFRICA /* language codes 0x046d, 0x046e and 0x046f are (still) unknown. */ #define TT_MS_LANGID_IGBO_NIGERIA 0x0470 #define TT_MS_LANGID_KANURI_NIGERIA 0x0471 #define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472 #define TT_MS_LANGID_TIGRIGNA_ETHIOPIA 0x0473 #define TT_MS_LANGID_TIGRIGNA_ERYTHREA 0x0873 /* also spelled in the `Passport SDK' list as: */ #define TT_MS_LANGID_TIGRIGNA_ERYTREA TT_MS_LANGID_TIGRIGNA_ERYTHREA #define TT_MS_LANGID_GUARANI_PARAGUAY 0x0474 #define TT_MS_LANGID_HAWAIIAN_UNITED_STATES 0x0475 #define TT_MS_LANGID_LATIN 0x0476 #define TT_MS_LANGID_SOMALI_SOMALIA 0x0477 /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */ /* not written (but OTOH the peculiar writing system is worth */ /* studying). */ #define TT_MS_LANGID_YI_CHINA 0x0478 #define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479 /* language codes from 0x047a to 0x047f are (still) unknown. */ #define TT_MS_LANGID_UIGHUR_CHINA 0x0480 #define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481 #if 0 /* not deemed useful for fonts */ #define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04ff #endif /*************************************************************************/ /* */ /* Possible values of the `name' identifier field in the name records of */ /* the TTF `name' table. These values are platform independent. */ /* */ #define TT_NAME_ID_COPYRIGHT 0 #define TT_NAME_ID_FONT_FAMILY 1 #define TT_NAME_ID_FONT_SUBFAMILY 2 #define TT_NAME_ID_UNIQUE_ID 3 #define TT_NAME_ID_FULL_NAME 4 #define TT_NAME_ID_VERSION_STRING 5 #define TT_NAME_ID_PS_NAME 6 #define TT_NAME_ID_TRADEMARK 7 /* the following values are from the OpenType spec */ #define TT_NAME_ID_MANUFACTURER 8 #define TT_NAME_ID_DESIGNER 9 #define TT_NAME_ID_DESCRIPTION 10 #define TT_NAME_ID_VENDOR_URL 11 #define TT_NAME_ID_DESIGNER_URL 12 #define TT_NAME_ID_LICENSE 13 #define TT_NAME_ID_LICENSE_URL 14 /* number 15 is reserved */ #define TT_NAME_ID_PREFERRED_FAMILY 16 #define TT_NAME_ID_PREFERRED_SUBFAMILY 17 #define TT_NAME_ID_MAC_FULL_NAME 18 /* The following code is new as of 2000-01-21 */ #define TT_NAME_ID_SAMPLE_TEXT 19 /* This is new in OpenType 1.3 */ #define TT_NAME_ID_CID_FINDFONT_NAME 20 /* This is new in OpenType 1.5 */ #define TT_NAME_ID_WWS_FAMILY 21 #define TT_NAME_ID_WWS_SUBFAMILY 22 /*************************************************************************/ /* */ /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table. */ /* */ /* Updated 08-Nov-2008. */ /* */ /* Bit 0 Basic Latin */ #define TT_UCR_BASIC_LATIN (1L << 0) /* U+0020-U+007E */ /* Bit 1 C1 Controls and Latin-1 Supplement */ #define TT_UCR_LATIN1_SUPPLEMENT (1L << 1) /* U+0080-U+00FF */ /* Bit 2 Latin Extended-A */ #define TT_UCR_LATIN_EXTENDED_A (1L << 2) /* U+0100-U+017F */ /* Bit 3 Latin Extended-B */ #define TT_UCR_LATIN_EXTENDED_B (1L << 3) /* U+0180-U+024F */ /* Bit 4 IPA Extensions */ /* Phonetic Extensions */ /* Phonetic Extensions Supplement */ #define TT_UCR_IPA_EXTENSIONS (1L << 4) /* U+0250-U+02AF */ /* U+1D00-U+1D7F */ /* U+1D80-U+1DBF */ /* Bit 5 Spacing Modifier Letters */ /* Modifier Tone Letters */ #define TT_UCR_SPACING_MODIFIER (1L << 5) /* U+02B0-U+02FF */ /* U+A700-U+A71F */ /* Bit 6 Combining Diacritical Marks */ /* Combining Diacritical Marks Supplement */ #define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */ /* U+1DC0-U+1DFF */ /* Bit 7 Greek and Coptic */ #define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ /* Bit 8 Coptic */ #define TT_UCR_COPTIC (1L << 8) /* U+2C80-U+2CFF */ /* Bit 9 Cyrillic */ /* Cyrillic Supplement */ /* Cyrillic Extended-A */ /* Cyrillic Extended-B */ #define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */ /* U+0500-U+052F */ /* U+2DE0-U+2DFF */ /* U+A640-U+A69F */ /* Bit 10 Armenian */ #define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */ /* Bit 11 Hebrew */ #define TT_UCR_HEBREW (1L << 11) /* U+0590-U+05FF */ /* Bit 12 Vai */ #define TT_UCR_VAI (1L << 12) /* U+A500-U+A63F */ /* Bit 13 Arabic */ /* Arabic Supplement */ #define TT_UCR_ARABIC (1L << 13) /* U+0600-U+06FF */ /* U+0750-U+077F */ /* Bit 14 NKo */ #define TT_UCR_NKO (1L << 14) /* U+07C0-U+07FF */ /* Bit 15 Devanagari */ #define TT_UCR_DEVANAGARI (1L << 15) /* U+0900-U+097F */ /* Bit 16 Bengali */ #define TT_UCR_BENGALI (1L << 16) /* U+0980-U+09FF */ /* Bit 17 Gurmukhi */ #define TT_UCR_GURMUKHI (1L << 17) /* U+0A00-U+0A7F */ /* Bit 18 Gujarati */ #define TT_UCR_GUJARATI (1L << 18) /* U+0A80-U+0AFF */ /* Bit 19 Oriya */ #define TT_UCR_ORIYA (1L << 19) /* U+0B00-U+0B7F */ /* Bit 20 Tamil */ #define TT_UCR_TAMIL (1L << 20) /* U+0B80-U+0BFF */ /* Bit 21 Telugu */ #define TT_UCR_TELUGU (1L << 21) /* U+0C00-U+0C7F */ /* Bit 22 Kannada */ #define TT_UCR_KANNADA (1L << 22) /* U+0C80-U+0CFF */ /* Bit 23 Malayalam */ #define TT_UCR_MALAYALAM (1L << 23) /* U+0D00-U+0D7F */ /* Bit 24 Thai */ #define TT_UCR_THAI (1L << 24) /* U+0E00-U+0E7F */ /* Bit 25 Lao */ #define TT_UCR_LAO (1L << 25) /* U+0E80-U+0EFF */ /* Bit 26 Georgian */ /* Georgian Supplement */ #define TT_UCR_GEORGIAN (1L << 26) /* U+10A0-U+10FF */ /* U+2D00-U+2D2F */ /* Bit 27 Balinese */ #define TT_UCR_BALINESE (1L << 27) /* U+1B00-U+1B7F */ /* Bit 28 Hangul Jamo */ #define TT_UCR_HANGUL_JAMO (1L << 28) /* U+1100-U+11FF */ /* Bit 29 Latin Extended Additional */ /* Latin Extended-C */ /* Latin Extended-D */ #define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1L << 29) /* U+1E00-U+1EFF */ /* U+2C60-U+2C7F */ /* U+A720-U+A7FF */ /* Bit 30 Greek Extended */ #define TT_UCR_GREEK_EXTENDED (1L << 30) /* U+1F00-U+1FFF */ /* Bit 31 General Punctuation */ /* Supplemental Punctuation */ #define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ /* U+2E00-U+2E7F */ /* Bit 32 Superscripts And Subscripts */ #define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ /* Bit 33 Currency Symbols */ #define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */ /* Bit 34 Combining Diacritical Marks For Symbols */ #define TT_UCR_COMBINING_DIACRITICS_SYMB (1L << 2) /* U+20D0-U+20FF */ /* Bit 35 Letterlike Symbols */ #define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ /* Bit 36 Number Forms */ #define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */ /* Bit 37 Arrows */ /* Supplemental Arrows-A */ /* Supplemental Arrows-B */ /* Miscellaneous Symbols and Arrows */ #define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */ /* U+27F0-U+27FF */ /* U+2900-U+297F */ /* U+2B00-U+2BFF */ /* Bit 38 Mathematical Operators */ /* Supplemental Mathematical Operators */ /* Miscellaneous Mathematical Symbols-A */ /* Miscellaneous Mathematical Symbols-B */ #define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */ /* U+2A00-U+2AFF */ /* U+27C0-U+27EF */ /* U+2980-U+29FF */ /* Bit 39 Miscellaneous Technical */ #define TT_UCR_MISCELLANEOUS_TECHNICAL (1L << 7) /* U+2300-U+23FF */ /* Bit 40 Control Pictures */ #define TT_UCR_CONTROL_PICTURES (1L << 8) /* U+2400-U+243F */ /* Bit 41 Optical Character Recognition */ #define TT_UCR_OCR (1L << 9) /* U+2440-U+245F */ /* Bit 42 Enclosed Alphanumerics */ #define TT_UCR_ENCLOSED_ALPHANUMERICS (1L << 10) /* U+2460-U+24FF */ /* Bit 43 Box Drawing */ #define TT_UCR_BOX_DRAWING (1L << 11) /* U+2500-U+257F */ /* Bit 44 Block Elements */ #define TT_UCR_BLOCK_ELEMENTS (1L << 12) /* U+2580-U+259F */ /* Bit 45 Geometric Shapes */ #define TT_UCR_GEOMETRIC_SHAPES (1L << 13) /* U+25A0-U+25FF */ /* Bit 46 Miscellaneous Symbols */ #define TT_UCR_MISCELLANEOUS_SYMBOLS (1L << 14) /* U+2600-U+26FF */ /* Bit 47 Dingbats */ #define TT_UCR_DINGBATS (1L << 15) /* U+2700-U+27BF */ /* Bit 48 CJK Symbols and Punctuation */ #define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */ /* Bit 49 Hiragana */ #define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */ /* Bit 50 Katakana */ /* Katakana Phonetic Extensions */ #define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */ /* U+31F0-U+31FF */ /* Bit 51 Bopomofo */ /* Bopomofo Extended */ #define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */ /* U+31A0-U+31BF */ /* Bit 52 Hangul Compatibility Jamo */ #define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1L << 20) /* U+3130-U+318F */ /* Bit 53 Phags-Pa */ #define TT_UCR_CJK_MISC (1L << 21) /* U+A840-U+A87F */ #define TT_UCR_KANBUN TT_UCR_CJK_MISC /* deprecated */ #define TT_UCR_PHAGSPA /* Bit 54 Enclosed CJK Letters and Months */ #define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1L << 22) /* U+3200-U+32FF */ /* Bit 55 CJK Compatibility */ #define TT_UCR_CJK_COMPATIBILITY (1L << 23) /* U+3300-U+33FF */ /* Bit 56 Hangul Syllables */ #define TT_UCR_HANGUL (1L << 24) /* U+AC00-U+D7A3 */ /* Bit 57 High Surrogates */ /* High Private Use Surrogates */ /* Low Surrogates */ /* */ /* According to OpenType specs v.1.3+, */ /* setting bit 57 implies that there is */ /* at least one codepoint beyond the */ /* Basic Multilingual Plane that is */ /* supported by this font. So it really */ /* means >= U+10000 */ #define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DB7F */ /* U+DB80-U+DBFF */ /* U+DC00-U+DFFF */ #define TT_UCR_NON_PLANE_0 TT_UCR_SURROGATES /* Bit 58 Phoenician */ #define TT_UCR_PHOENICIAN (1L << 26) /*U+10900-U+1091F*/ /* Bit 59 CJK Unified Ideographs */ /* CJK Radicals Supplement */ /* Kangxi Radicals */ /* Ideographic Description Characters */ /* CJK Unified Ideographs Extension A */ /* CJK Unified Ideographs Extension B */ /* Kanbun */ #define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */ /* U+2E80-U+2EFF */ /* U+2F00-U+2FDF */ /* U+2FF0-U+2FFF */ /* U+3400-U+4DB5 */ /*U+20000-U+2A6DF*/ /* U+3190-U+319F */ /* Bit 60 Private Use */ #define TT_UCR_PRIVATE_USE (1L << 28) /* U+E000-U+F8FF */ /* Bit 61 CJK Strokes */ /* CJK Compatibility Ideographs */ /* CJK Compatibility Ideographs Supplement */ #define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+31C0-U+31EF */ /* U+F900-U+FAFF */ /*U+2F800-U+2FA1F*/ /* Bit 62 Alphabetic Presentation Forms */ #define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ /* Bit 63 Arabic Presentation Forms-A */ #define TT_UCR_ARABIC_PRESENTATIONS_A (1L << 31) /* U+FB50-U+FDFF */ /* Bit 64 Combining Half Marks */ #define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ /* Bit 65 Vertical forms */ /* CJK Compatibility Forms */ #define TT_UCR_CJK_COMPATIBILITY_FORMS (1L << 1) /* U+FE10-U+FE1F */ /* U+FE30-U+FE4F */ /* Bit 66 Small Form Variants */ #define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ /* Bit 67 Arabic Presentation Forms-B */ #define TT_UCR_ARABIC_PRESENTATIONS_B (1L << 3) /* U+FE70-U+FEFE */ /* Bit 68 Halfwidth and Fullwidth Forms */ #define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */ /* Bit 69 Specials */ #define TT_UCR_SPECIALS (1L << 5) /* U+FFF0-U+FFFD */ /* Bit 70 Tibetan */ #define TT_UCR_TIBETAN (1L << 6) /* U+0F00-U+0FFF */ /* Bit 71 Syriac */ #define TT_UCR_SYRIAC (1L << 7) /* U+0700-U+074F */ /* Bit 72 Thaana */ #define TT_UCR_THAANA (1L << 8) /* U+0780-U+07BF */ /* Bit 73 Sinhala */ #define TT_UCR_SINHALA (1L << 9) /* U+0D80-U+0DFF */ /* Bit 74 Myanmar */ #define TT_UCR_MYANMAR (1L << 10) /* U+1000-U+109F */ /* Bit 75 Ethiopic */ /* Ethiopic Supplement */ /* Ethiopic Extended */ #define TT_UCR_ETHIOPIC (1L << 11) /* U+1200-U+137F */ /* U+1380-U+139F */ /* U+2D80-U+2DDF */ /* Bit 76 Cherokee */ #define TT_UCR_CHEROKEE (1L << 12) /* U+13A0-U+13FF */ /* Bit 77 Unified Canadian Aboriginal Syllabics */ #define TT_UCR_CANADIAN_ABORIGINAL_SYLLABICS (1L << 13) /* U+1400-U+167F */ /* Bit 78 Ogham */ #define TT_UCR_OGHAM (1L << 14) /* U+1680-U+169F */ /* Bit 79 Runic */ #define TT_UCR_RUNIC (1L << 15) /* U+16A0-U+16FF */ /* Bit 80 Khmer */ /* Khmer Symbols */ #define TT_UCR_KHMER (1L << 16) /* U+1780-U+17FF */ /* U+19E0-U+19FF */ /* Bit 81 Mongolian */ #define TT_UCR_MONGOLIAN (1L << 17) /* U+1800-U+18AF */ /* Bit 82 Braille Patterns */ #define TT_UCR_BRAILLE (1L << 18) /* U+2800-U+28FF */ /* Bit 83 Yi Syllables */ /* Yi Radicals */ #define TT_UCR_YI (1L << 19) /* U+A000-U+A48F */ /* U+A490-U+A4CF */ /* Bit 84 Tagalog */ /* Hanunoo */ /* Buhid */ /* Tagbanwa */ #define TT_UCR_PHILIPPINE (1L << 20) /* U+1700-U+171F */ /* U+1720-U+173F */ /* U+1740-U+175F */ /* U+1760-U+177F */ /* Bit 85 Old Italic */ #define TT_UCR_OLD_ITALIC (1L << 21) /*U+10300-U+1032F*/ /* Bit 86 Gothic */ #define TT_UCR_GOTHIC (1L << 22) /*U+10330-U+1034F*/ /* Bit 87 Deseret */ #define TT_UCR_DESERET (1L << 23) /*U+10400-U+1044F*/ /* Bit 88 Byzantine Musical Symbols */ /* Musical Symbols */ /* Ancient Greek Musical Notation */ #define TT_UCR_MUSICAL_SYMBOLS (1L << 24) /*U+1D000-U+1D0FF*/ /*U+1D100-U+1D1FF*/ /*U+1D200-U+1D24F*/ /* Bit 89 Mathematical Alphanumeric Symbols */ #define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS (1L << 25) /*U+1D400-U+1D7FF*/ /* Bit 90 Private Use (plane 15) */ /* Private Use (plane 16) */ #define TT_UCR_PRIVATE_USE_SUPPLEMENTARY (1L << 26) /*U+F0000-U+FFFFD*/ /*U+100000-U+10FFFD*/ /* Bit 91 Variation Selectors */ /* Variation Selectors Supplement */ #define TT_UCR_VARIATION_SELECTORS (1L << 27) /* U+FE00-U+FE0F */ /*U+E0100-U+E01EF*/ /* Bit 92 Tags */ #define TT_UCR_TAGS (1L << 28) /*U+E0000-U+E007F*/ /* Bit 93 Limbu */ #define TT_UCR_LIMBU (1L << 29) /* U+1900-U+194F */ /* Bit 94 Tai Le */ #define TT_UCR_TAI_LE (1L << 30) /* U+1950-U+197F */ /* Bit 95 New Tai Lue */ #define TT_UCR_NEW_TAI_LUE (1L << 31) /* U+1980-U+19DF */ /* Bit 96 Buginese */ #define TT_UCR_BUGINESE (1L << 0) /* U+1A00-U+1A1F */ /* Bit 97 Glagolitic */ #define TT_UCR_GLAGOLITIC (1L << 1) /* U+2C00-U+2C5F */ /* Bit 98 Tifinagh */ #define TT_UCR_TIFINAGH (1L << 2) /* U+2D30-U+2D7F */ /* Bit 99 Yijing Hexagram Symbols */ #define TT_UCR_YIJING (1L << 3) /* U+4DC0-U+4DFF */ /* Bit 100 Syloti Nagri */ #define TT_UCR_SYLOTI_NAGRI (1L << 4) /* U+A800-U+A82F */ /* Bit 101 Linear B Syllabary */ /* Linear B Ideograms */ /* Aegean Numbers */ #define TT_UCR_LINEAR_B (1L << 5) /*U+10000-U+1007F*/ /*U+10080-U+100FF*/ /*U+10100-U+1013F*/ /* Bit 102 Ancient Greek Numbers */ #define TT_UCR_ANCIENT_GREEK_NUMBERS (1L << 6) /*U+10140-U+1018F*/ /* Bit 103 Ugaritic */ #define TT_UCR_UGARITIC (1L << 7) /*U+10380-U+1039F*/ /* Bit 104 Old Persian */ #define TT_UCR_OLD_PERSIAN (1L << 8) /*U+103A0-U+103DF*/ /* Bit 105 Shavian */ #define TT_UCR_SHAVIAN (1L << 9) /*U+10450-U+1047F*/ /* Bit 106 Osmanya */ #define TT_UCR_OSMANYA (1L << 10) /*U+10480-U+104AF*/ /* Bit 107 Cypriot Syllabary */ #define TT_UCR_CYPRIOT_SYLLABARY (1L << 11) /*U+10800-U+1083F*/ /* Bit 108 Kharoshthi */ #define TT_UCR_KHAROSHTHI (1L << 12) /*U+10A00-U+10A5F*/ /* Bit 109 Tai Xuan Jing Symbols */ #define TT_UCR_TAI_XUAN_JING (1L << 13) /*U+1D300-U+1D35F*/ /* Bit 110 Cuneiform */ /* Cuneiform Numbers and Punctuation */ #define TT_UCR_CUNEIFORM (1L << 14) /*U+12000-U+123FF*/ /*U+12400-U+1247F*/ /* Bit 111 Counting Rod Numerals */ #define TT_UCR_COUNTING_ROD_NUMERALS (1L << 15) /*U+1D360-U+1D37F*/ /* Bit 112 Sundanese */ #define TT_UCR_SUNDANESE (1L << 16) /* U+1B80-U+1BBF */ /* Bit 113 Lepcha */ #define TT_UCR_LEPCHA (1L << 17) /* U+1C00-U+1C4F */ /* Bit 114 Ol Chiki */ #define TT_UCR_OL_CHIKI (1L << 18) /* U+1C50-U+1C7F */ /* Bit 115 Saurashtra */ #define TT_UCR_SAURASHTRA (1L << 19) /* U+A880-U+A8DF */ /* Bit 116 Kayah Li */ #define TT_UCR_KAYAH_LI (1L << 20) /* U+A900-U+A92F */ /* Bit 117 Rejang */ #define TT_UCR_REJANG (1L << 21) /* U+A930-U+A95F */ /* Bit 118 Cham */ #define TT_UCR_CHAM (1L << 22) /* U+AA00-U+AA5F */ /* Bit 119 Ancient Symbols */ #define TT_UCR_ANCIENT_SYMBOLS (1L << 23) /*U+10190-U+101CF*/ /* Bit 120 Phaistos Disc */ #define TT_UCR_PHAISTOS_DISC (1L << 24) /*U+101D0-U+101FF*/ /* Bit 121 Carian */ /* Lycian */ /* Lydian */ #define TT_UCR_OLD_ANATOLIAN (1L << 25) /*U+102A0-U+102DF*/ /*U+10280-U+1029F*/ /*U+10920-U+1093F*/ /* Bit 122 Domino Tiles */ /* Mahjong Tiles */ #define TT_UCR_GAME_TILES (1L << 26) /*U+1F030-U+1F09F*/ /*U+1F000-U+1F02F*/ /* Bit 123-127 Reserved for process-internal usage */ /*************************************************************************/ /* */ /* Some compilers have a very limited length of identifiers. */ /* */ #if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ ) #define HAVE_LIMIT_ON_IDENTS #endif #ifndef HAVE_LIMIT_ON_IDENTS /*************************************************************************/ /* */ /* Here some alias #defines in order to be clearer. */ /* */ /* These are not always #defined to stay within the 31~character limit */ /* which some compilers have. */ /* */ /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */ /* Borland compilers (read: from BC++ 3.1 on) can increase this limit. */ /* If you get a warning with such a compiler, use the -i40 switch. */ /* */ #define TT_UCR_ARABIC_PRESENTATION_FORMS_A \ TT_UCR_ARABIC_PRESENTATIONS_A #define TT_UCR_ARABIC_PRESENTATION_FORMS_B \ TT_UCR_ARABIC_PRESENTATIONS_B #define TT_UCR_COMBINING_DIACRITICAL_MARKS \ TT_UCR_COMBINING_DIACRITICS #define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ TT_UCR_COMBINING_DIACRITICS_SYMB #endif /* !HAVE_LIMIT_ON_IDENTS */ FT_END_HEADER #endif /* __TTNAMEID_H__ */ /* END */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 2004 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project * by Chris Pressey <cpressey@catseye.mine.nu>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of The DragonFly Project nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific, prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * dict.c * $Id: dict.h,v 1.4 2005/09/01 19:23:14 cpressey Exp $ * Routines to manipulate dictionaries. */ #ifndef __AURA_DICT_H_ #define __AURA_DICT_H_ #include <stdlib.h> #ifdef __cplusplus extern "C" { #endif #define AURA_DICT_HASH 1 #define AURA_DICT_LIST 2 #define AURA_DICT_SORTED_LIST 3 struct aura_dict { struct aura_bucket **b; size_t num_buckets; void (*fetch)(struct aura_dict *, const void *, size_t, void **, size_t *); void (*store)(struct aura_dict *, const void *, size_t, const void *, size_t); struct aura_bucket *cursor; size_t cur_bucket; }; struct aura_bucket { struct aura_bucket *next; void *key; size_t key_size; void *data; size_t data_size; }; struct aura_dict *aura_dict_new(size_t, int); void aura_dict_free(struct aura_dict *); void aura_dict_fetch(struct aura_dict *, const void *, size_t, void **, size_t *); int aura_dict_exists(struct aura_dict *, const void *, size_t); void aura_dict_store(struct aura_dict *, const void *, size_t, const void *, size_t); void aura_dict_rewind(struct aura_dict *); int aura_dict_eof(struct aura_dict *); void aura_dict_get_current_key(struct aura_dict *, void **, size_t *); void aura_dict_next(struct aura_dict *); size_t aura_dict_size(struct aura_dict *); #ifdef __cplusplus } #endif #endif /* !__AURA_DICT_H_ */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� �.���� �..������autosprintf.info�>��� �dir���� gettext.info�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 2004 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project * by Chris Pressey <cpressey@catseye.mine.nu>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of The DragonFly Project nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific, prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * $Id: fspred.h,v 1.3 2005/09/01 19:23:14 cpressey Exp $ */ #ifndef __FSPRED_H_ #define __FSPRED_H_ #ifdef __cplusplus extern "C" { #endif /*** PROTOTYPES ***/ int is_dir(const char *, ...); int is_file(const char *, ...); int is_program(const char *, ...); int is_device(const char *, ...); int is_named_pipe(const char *, ...); int is_mountpoint_mounted(const char *); int is_device_mounted(const char *); int is_any_slice_mounted(const char *); #ifdef __cplusplus } #endif #endif /* !__FSPRED_H_ */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ ����������������������������S��������������@������������0����������������������������]�������������0@�����0������@��������� �����������������g�������������p @�����p ������������������������������������b������������� @����� ����������������������������������m������������� @����� �����������������������������������s�������������8@�����8������������������������������������y�������������`@�����`������ �������������� ����������������������������%@�����%��������������������������������������������������&P������&��������������������� �����������������������������7P������7������������������������������������������������8P�����8����������������������������������������������:P�����:�������������������������������������������������:P�����:�������������������������������������������������:P�����:�������������������������������������������������:P�����:������������������������������������������������;P�����;������h@�������������� �������������������������������������;���������������������������������������������������������W=��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c) 2004 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project * by Chris Pressey <cpressey@catseye.mine.nu>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of The DragonFly Project nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific, prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * popen.h * $Id: popen.h,v 1.6 2005/09/01 19:23:14 cpressey Exp $ * A modified version of the standard popen()/pclose() functions * which adds a third function, pgetpid(), which allows the program * which used popen() to obtain the pid of the process on the other * end of the pipe. */ #ifndef __AURA_POPEN_H_ #define __AURA_POPEN_H_ #include <sys/types.h> #include <stdio.h> #ifdef __cplusplus extern "C" { #endif #define AURA_PGETS_TIMEOUT 1 #define AURA_PGETS_SELECT_ERR 2 #define AURA_PGETS_EOF 3 #define AURA_PGETS_FGETS_ERR 4 FILE *aura_popen(const char *, const char *, ...); int aura_pclose(FILE *); pid_t aura_pgetpid(FILE *); int aura_pgets(FILE *, char *, size_t, long, int *); #ifdef __cplusplus } #endif #endif /* !__AURA_POPEN_H_ */ ������������������������������������������������������@�����������������������������������������!�������������@�����������d���������������������������'��� ����������`@�����`��������������������������������/�������������@����������������������������������������7���o������� @����� ������d����������������������������D���o�������X @�����X ������ ����������������������������S�������������x @�����x ������x����������������������������]������������� @����� ������0��������� �����������������g������������� @����� ������������������������������������b�������������4@�����4������0����������������������������m�������������p@�����p�����������������������������������s�������������(!@�����(!������������������������������������y�������������@!@�����@!������ �������������� ����������������������������P(@�����P(�������������������������������������������������X(P�����X(�������������������������������������������������p(P�����p(�������������������������������������������������*P������*����������������������������������������������+P�����+�������������������������������������������������+P�����+�������������������������������������������������+P�����+�������������������������������������������������+P�����+������(������������������������������������������-P������-�������������������� ��������������������������������������-���������������������������������������������������������.����������������������������������������������������/* * Copyright (c) 2004 The DragonFly Project. All rights reserved. * * This code is derived from software contributed to The DragonFly Project * by Chris Pressey <cpressey@catseye.mine.nu>. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name of The DragonFly Project nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific, prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * mem.h * $Id: mem.h,v 1.3 2005/09/01 19:23:14 cpressey Exp $ * Aura memory management functions and macros. */ #define AURA_MALLOC(ptr, what) \ do { \ ptr = (struct what *)aura_malloc(sizeof(struct what), \ "struct " #what); \ } while(0) #define AURA_FREE(ptr, what) \ do { \ aura_free(ptr, "struct " #what); \ } while(0) #ifdef __cplusplus extern "C" { #endif void *aura_malloc(size_t, const char *); char *aura_strdup(const char *); void aura_free(void *, const char *); #ifdef __cplusplus } #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������D���o������� @����� ������ ����������������������������S�������������� @������ ������`����������������������������]�������������` @�����` ������p��������� �����������������g�������������@�����������������������������������������b�������������@���������������������������������������m�������������@�����������2�����������������������������s�������������(I@�����(I������������������������������������y�������������8I@�����8I������ -������������������������������������������Hv@�����Hv�������������������������������������������������`vP�����`v������@�������������� ����������������������������|P�����|������ ������������������������������������������8P�����8����������������������������������������������ȉP�����ȉ�������������������������������������������������؉P�����؉�������������������������������������������������P������������������������������������������������������P����������������������������������������������������P������������������������������������������������������������������������������������������������������������������������s������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c)2004 Cat's Eye Technologies. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * Neither the name of Cat's Eye Technologies nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * dfui.h * $Id: dfui.h,v 1.31 2005/09/01 19:23:14 cpressey Exp $ */ #ifndef __DFUI_H #define __DFUI_H #ifdef __cplusplus extern "C" { #endif struct aura_buffer; /* * TYPEDEFS */ typedef int dfui_err_t; /* * CONSTANTS */ #define DFUI_SUCCESS (dfui_err_t)1 #define DFUI_FAILURE (dfui_err_t)0 /* * Transports. */ #define DFUI_TRANSPORT_CAPS 1 #define DFUI_TRANSPORT_NPIPE 2 #define DFUI_TRANSPORT_TCP 3 /* * Message types. */ #define DFUI_BE_MSG_READY 'r' /* send me back a reply please */ #define DFUI_BE_MSG_STOP 'X' /* shut down please, we're done */ #define DFUI_BE_MSG_PRESENT 'P' /* present this form to the user */ #define DFUI_BE_MSG_PROG_BEGIN 'b' /* begin showing a progress bar */ #define DFUI_BE_MSG_PROG_UPDATE 'u' /* update the progress bar */ #define DFUI_BE_MSG_PROG_END 'e' /* stop showing the progress bar */ #define DFUI_BE_MSG_SET_GLOBAL 'G' /* set a global setting in the f/e */ #define DFUI_FE_MSG_READY 'r' /* send me a form or something */ #define DFUI_FE_MSG_SUBMIT 'S' /* submit results of a form */ #define DFUI_FE_MSG_CONTINUE 'c' /* nothing stopping a progress bar */ #define DFUI_FE_MSG_CANCEL 'C' /* user cancelled a progress bar */ #define DFUI_FE_MSG_ABORT 'X' /* something catastrophic (^C?) */ /* * STRUCTURE PROTOTYPES */ struct dfui_connection; struct dfui_payload; struct dfui_info; struct dfui_property; struct dfui_dataset; struct dfui_celldata; struct dfui_form; struct dfui_field; struct dfui_option; struct dfui_action; struct dfui_response; struct dfui_progress; /* * STRUCTURE DEFINITIONS */ #ifdef NEEDS_DFUI_STRUCTURE_DEFINITIONS /* Connections */ struct dfui_connection { int transport; /* transport layer: CAPS, NPIPE, or TCP */ char *rendezvous; /* rendezvous point */ struct aura_buffer *ebuf; /* last message recvd */ int is_connected; /* was a connection actually established? */ void *t_data; /* transport-specific connection data */ dfui_err_t (*be_start)(struct dfui_connection *); dfui_err_t (*be_stop)(struct dfui_connection *); dfui_err_t (*be_ll_exchange)(struct dfui_connection *, char, const char *); dfui_err_t (*fe_connect)(struct dfui_connection *); dfui_err_t (*fe_disconnect)(struct dfui_connection *); dfui_err_t (*fe_ll_request)(struct dfui_connection *, char, const char *); }; /* Common structures on objects */ struct dfui_info { char *name; char *short_desc; char *long_desc; }; struct dfui_dataset { struct dfui_dataset *next; struct dfui_celldata *celldata_head; }; struct dfui_celldata { struct dfui_celldata *next; char *field_id; char *value; }; /* * Properties may be either strong (imply a behavioural guarantee from * the frontend) or weak (may be ignored or interpreted subjectively * by the frontend) depending on their name. Currently only the * following properties are strong: * * editable * obscured */ struct dfui_property { struct dfui_property *next; char *name; char *value; }; /* Form objects */ struct dfui_form { char *id; struct dfui_info *info; int multiple; int extensible; struct dfui_field *field_head; struct dfui_action *action_head; struct dfui_dataset *dataset_head; struct dfui_property *property_head; }; struct dfui_field { char *id; struct dfui_info *info; struct dfui_field *next; struct dfui_option *option_head; struct dfui_property *property_head; }; struct dfui_option { char *value; struct dfui_option *next; }; struct dfui_action { char *id; struct dfui_info *info; struct dfui_action *next; struct dfui_property *property_head; }; /* Progress objects */ struct dfui_progress { struct dfui_info *info; int amount; int streaming; /* if 1, msg will stream in line by line */ char *msg_line; /* next line of message if streaming=1 */ }; /* Response objects */ struct dfui_response { char *form_id; char *action_id; struct dfui_dataset *dataset_head; }; /* Payload objects */ struct dfui_payload { char msgtype; struct dfui_form *form; struct dfui_progress *progress; struct dfui_property *global_setting; }; #endif /* NEEDS_DFUI_STRUCTURE_DEFINITIONS */ /* * PROTOTYPES */ /* * UTILITY (form/field creation, etc) */ struct dfui_info *dfui_info_new(const char *, const char *, const char *); void dfui_info_free(struct dfui_info *); const char *dfui_info_get_name(const struct dfui_info *); const char *dfui_info_get_short_desc(const struct dfui_info *); const char *dfui_info_get_long_desc(const struct dfui_info *); void dfui_info_set_name(struct dfui_info *, const char *); void dfui_info_set_short_desc(struct dfui_info *, const char *); void dfui_info_set_long_desc(struct dfui_info *, const char *); struct dfui_property *dfui_property_new(const char *, const char *); void dfui_property_free(struct dfui_property *); void dfui_properties_free(struct dfui_property *); struct dfui_property *dfui_property_find(struct dfui_property *, const char *); const char *dfui_property_get(struct dfui_property *, const char *); struct dfui_property *dfui_property_set(struct dfui_property **, const char *, const char *); const char *dfui_property_get_name(const struct dfui_property *); const char *dfui_property_get_value(const struct dfui_property *); struct dfui_celldata *dfui_celldata_new(const char *, const char *); void dfui_celldata_free(struct dfui_celldata *); void dfui_celldatas_free(struct dfui_celldata *); struct dfui_celldata *dfui_celldata_find(struct dfui_celldata *, const char *); struct dfui_celldata *dfui_celldata_get_next(const struct dfui_celldata *); const char * dfui_celldata_get_field_id(const struct dfui_celldata *); const char * dfui_celldata_get_value(const struct dfui_celldata *); struct dfui_dataset *dfui_dataset_new(void); struct dfui_dataset *dfui_dataset_dup(const struct dfui_dataset *); void dfui_dataset_free(struct dfui_dataset *); void dfui_datasets_free(struct dfui_dataset *); struct dfui_celldata *dfui_dataset_celldata_add(struct dfui_dataset *, const char *, const char *); struct dfui_celldata *dfui_dataset_celldata_get_first(const struct dfui_dataset *); struct dfui_celldata *dfui_dataset_celldata_find(const struct dfui_dataset *, const char *); struct dfui_dataset *dfui_dataset_get_next(const struct dfui_dataset *); const char *dfui_dataset_get_value(const struct dfui_dataset *, const char *); char *dfui_dataset_dup_value(const struct dfui_dataset *, const char *); struct dfui_field *dfui_field_new(const char *, struct dfui_info *); void dfui_field_free(struct dfui_field *); void dfui_fields_free(struct dfui_field *); struct dfui_option *dfui_field_option_add(struct dfui_field *, const char *); struct dfui_option *dfui_field_option_get_first(const struct dfui_field *); struct dfui_property *dfui_field_property_set(struct dfui_field *, const char *, const char *); const char *dfui_field_property_get(const struct dfui_field *, const char *); int dfui_field_property_is(const struct dfui_field *, const char *, const char *); struct dfui_field *dfui_field_get_next(const struct dfui_field *); const char *dfui_field_get_id(const struct dfui_field *); struct dfui_info *dfui_field_get_info(const struct dfui_field *); struct dfui_option *dfui_option_new(const char *); void dfui_option_free(struct dfui_option *); void dfui_options_free(struct dfui_option *); struct dfui_option *dfui_option_get_next(const struct dfui_option *); const char *dfui_option_get_value(const struct dfui_option *); struct dfui_action *dfui_action_new(const char *, struct dfui_info *); void dfui_action_free(struct dfui_action *); void dfui_actions_free(struct dfui_action *); struct dfui_action *dfui_action_get_next(const struct dfui_action *); struct dfui_property *dfui_action_property_set(struct dfui_action *, const char *, const char *); const char *dfui_action_property_get(const struct dfui_action *, const char *); int dfui_action_property_is(const struct dfui_action *, const char *, const char *); const char *dfui_action_get_id(const struct dfui_action *); struct dfui_info *dfui_action_get_info(const struct dfui_action *); struct dfui_form *dfui_form_new(const char *, struct dfui_info *); struct dfui_form *dfui_form_create(const char *, const char *, const char *, const char *, ...); void dfui_form_free(struct dfui_form *); struct dfui_field *dfui_form_field_add(struct dfui_form *, const char *, struct dfui_info *); struct dfui_field *dfui_form_field_attach(struct dfui_form *, struct dfui_field *); struct dfui_action *dfui_form_action_add(struct dfui_form *, const char *, struct dfui_info *); struct dfui_action *dfui_form_action_attach(struct dfui_form *, struct dfui_action *); void dfui_form_dataset_add(struct dfui_form *, struct dfui_dataset *); struct dfui_dataset *dfui_form_dataset_get_first(const struct dfui_form *); int dfui_form_dataset_count(const struct dfui_form *); void dfui_form_datasets_free(struct dfui_form *); struct dfui_property *dfui_form_property_set(struct dfui_form *, const char *, const char *); const char *dfui_form_property_get(const struct dfui_form *, const char *); int dfui_form_property_is(const struct dfui_form *, const char *, const char *); struct dfui_field *dfui_form_field_find(const struct dfui_form *, const char *); struct dfui_field *dfui_form_field_get_first(const struct dfui_form *); int dfui_form_field_count(const struct dfui_form *); struct dfui_action *dfui_form_action_find(const struct dfui_form *, const char *); struct dfui_action *dfui_form_action_get_first(const struct dfui_form *); int dfui_form_action_count(const struct dfui_form *); const char *dfui_form_get_id(const struct dfui_form *); struct dfui_info *dfui_form_get_info(const struct dfui_form *); void dfui_form_set_multiple(struct dfui_form *, int); int dfui_form_is_multiple(const struct dfui_form *); void dfui_form_set_extensible(struct dfui_form *, int); int dfui_form_is_extensible(const struct dfui_form *); struct dfui_response *dfui_response_new(const char *, const char *); void dfui_response_free(struct dfui_response *); void dfui_response_dataset_add(struct dfui_response *, struct dfui_dataset *); struct dfui_dataset *dfui_response_dataset_get_first(const struct dfui_response *); int dfui_response_dataset_count(const struct dfui_response *); const char *dfui_response_get_form_id(const struct dfui_response *); const char *dfui_response_get_action_id(const struct dfui_response *); struct dfui_progress *dfui_progress_new(struct dfui_info *, int); void dfui_progress_free(struct dfui_progress *); struct dfui_info *dfui_progress_get_info(const struct dfui_progress *); void dfui_progress_set_amount(struct dfui_progress *, int); int dfui_progress_get_amount(const struct dfui_progress *); void dfui_progress_set_streaming(struct dfui_progress *, int); int dfui_progress_get_streaming(const struct dfui_progress *); void dfui_progress_set_msg_line(struct dfui_progress *, const char *); const char *dfui_progress_get_msg_line(const struct dfui_progress *); void dfui_payload_free(struct dfui_payload *); char dfui_payload_get_msg_type(const struct dfui_payload *); struct dfui_form *dfui_payload_get_form(const struct dfui_payload *); struct dfui_progress *dfui_payload_get_progress(const struct dfui_payload *); /* * PROTOCOL */ struct dfui_connection *dfui_connection_new(int, const char *); dfui_err_t dfui_connection_get_fd(struct dfui_connection *, int *); void dfui_connection_free(struct dfui_connection *); /* * BACKEND VERY HIGH LEVEL INTERFACE */ int dfui_be_present_dialog(struct dfui_connection *, const char *, const char *, const char *, ...); /* * BACKEND HIGH LEVEL INTERFACE */ dfui_err_t dfui_be_start(struct dfui_connection *); dfui_err_t dfui_be_stop(struct dfui_connection *); dfui_err_t dfui_be_present(struct dfui_connection *, struct dfui_form *, struct dfui_response **); dfui_err_t dfui_be_progress_begin(struct dfui_connection *, struct dfui_progress *); dfui_err_t dfui_be_progress_update(struct dfui_connection *, struct dfui_progress *, int *); dfui_err_t dfui_be_progress_end(struct dfui_connection *); dfui_err_t dfui_be_set_global_setting(struct dfui_connection *, const char *, const char *, int *); /* * FRONTEND HIGH LEVEL INTERFACE */ dfui_err_t dfui_fe_connect(struct dfui_connection *); dfui_err_t dfui_fe_disconnect(struct dfui_connection *); dfui_err_t dfui_fe_receive(struct dfui_connection *, char *, void **); struct dfui_payload *dfui_fe_receive_payload(struct dfui_connection *); dfui_err_t dfui_fe_submit(struct dfui_connection *, struct dfui_response *); dfui_err_t dfui_fe_progress_continue(struct dfui_connection *); dfui_err_t dfui_fe_progress_cancel(struct dfui_connection *); dfui_err_t dfui_fe_confirm_set_global(struct dfui_connection *); dfui_err_t dfui_fe_cancel_set_global(struct dfui_connection *); dfui_err_t dfui_fe_confirm_stop(struct dfui_connection *); dfui_err_t dfui_fe_abort(struct dfui_connection *); #ifdef __cplusplus } #endif #endif /* !__DFUI_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������g�������������@�����������������������������������������b�������������@���������������������������������������m�������������p@�����p������(�����������������������������s�������������(:@�����(:������������������������������������y�������������8:@�����8:������������������������������������������������ B@����� B������������������������������������������������� BP����� B��������������������� ����������������������������BP�����B������������������������������������������������GP�����G����������������������������������������������XIP�����XI�������������������������������������������������hIP�����hI�������������������������������������������������xIP�����xI�������������������������������������������������IP�����I������h������������������������������������������KP������K������ �������������� ��������������������������������������K���������������������������������������������������������L������������������������������������/* * Copyright (c)2004 Cat's Eye Technologies. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * Neither the name of Cat's Eye Technologies nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * dump.h * $Id: dump.h,v 1.4 2005/09/01 19:23:14 cpressey Exp $ */ #ifndef __DUMP_H_ #define __DUMP_H_ #include <stdio.h> #include "dfui.h" #ifdef __cplusplus extern "C" { #endif extern FILE *dfui_debug_file; void dfui_info_dump(const struct dfui_info *); void dfui_option_dump(const struct dfui_option *); void dfui_form_dump(const struct dfui_form *); void dfui_response_dump(const struct dfui_response *); void dfui_dataset_dump(const struct dfui_dataset *); void dfui_celldata_dump(const struct dfui_celldata *); void dfui_action_dump(const struct dfui_action *); void dfui_field_dump(const struct dfui_field *); void dfui_progress_dump(const struct dfui_progress *); void dfui_debug(const char *, ...); #ifdef __cplusplus } #endif #endif /* !__DUMP_H_ */ �������������������������������������������������������������������������������������������������������������������������������������������������@@�����@������������������������������������7���o�������@�����������$����������������������������D���o�������@����������� ����������������������������S�������������0@�����0������0����������������������������]�������������`@�����`��������������� �����������������g�������������h@�����h������������������������������������b�������������|@�����|�����������������������������������m�������������@@�����@������-�����������������������������s�������������4@�����4������������������������������������y�������������4@�����4������������������������������������������������6@�����6�������������������������������������������������6P�����6�������������������������������������������������6P�����6������x������������������������������������������(:P�����(:����������������������������������������������;P�����;�������������������������������������������������;P�����;�������������������������������������������������;P�����;�������������������������������������������������;P�����;������p������������������������������������������P<P�����P<������X����������������������������������������������������P<���������������������������������������������������������=��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (c)2004 Cat's Eye Technologies. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * Neither the name of Cat's Eye Technologies nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * system.h * $Id: system.h,v 1.11 2005/09/01 19:23:14 cpressey Exp $ */ #ifndef __SYSTEM_H_ #define __SYSTEM_H_ #if (__FreeBSD__ || __DragonFly__ || __OpenBSD__ || __NetBSD__ || __linux__) # define HAS_TCP # define HAS_NPIPE #endif #if (__DragonFly__) # define HAS_CAPS #endif #ifndef HAS_TCP #ifndef HAS_NPIPE #ifndef HAS_CAPS #error "Your OS must support at least one IPC mechanism: TCP/IP sockets, named pipes, or CAPS." #endif #endif #endif #if defined(__DragonFly__) #define OPERATING_SYSTEM_NAME "DragonFly BSD" #define OPERATING_SYSTEM_URL "http://www.dragonflybsd.org" #elif defined(__FreeBSD__) #define OPERATING_SYSTEM_NAME "FreeBSD" #define OPERATING_SYSTEM_URL "http://www.freebsd.org" #elif defined(__OpenBSD__) #define OPERATING_SYSTEM_NAME "OpenBSD" #define OPERATING_SYSTEM_URL "http://www.openbsd.org" #elif defined(__NetBSD__) #define OPERATING_SYSTEM_NAME "NetBSD" #define OPERATING_SYSTEM_URL "http://www.netbsd.org" #endif #ifdef __cplusplus extern "C" { #endif char *ostype(void); int has_tcp(void); int has_npipe(void); int has_caps(void); int get_transport(const char *); int user_get_transport(const char *); #ifdef __cplusplus } #endif #endif /* !__SYSTEM_H_ */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������s�������������_@�����_������������������������������������y�������������_@�����_������8������������������������������������������p@�����p��������������������������������������������������P������������h��������������� ����������������������������hP�����h�������������������������������������������������P����������������������������������������������������P������������������������������������������������������P������������������������������������������������������P������������������������������������������������������ȩP�����ȩ������������������������������������������������P������������������������� �������������������������������������������G���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/***************************************************************************** * RRDtool 1.2.26 Copyright by Tobi Oetiker, 1997-2007 ***************************************************************************** * rrdlib.h Public header file for librrd ***************************************************************************** * $Id: rrd.h 1235 2007-11-20 00:15:07Z oetiker $ * $Log$ * Revision 1.9 2005/02/13 16:13:33 oetiker * let rrd_graph return the actual value range it picked ... * -- Henrik Stoerner <henrik@hswn.dk> * * Revision 1.8 2004/05/26 22:11:12 oetiker * reduce compiler warnings. Many small fixes. -- Mike Slifcak <slif@bellsouth.net> * * Revision 1.7 2003/11/12 22:14:26 oetiker * allow to pass an open filehandle into rrd_graph as an extra argument * * Revision 1.6 2003/11/11 19:46:21 oetiker * replaced time_value with rrd_time_value as MacOS X introduced a struct of that name in their standard headers * * Revision 1.5 2003/04/25 18:35:08 jake * Alternate update interface, updatev. Returns info about CDPs written to disk as result of update. Output format is similar to rrd_info, a hash of key-values. * * Revision 1.4 2003/04/01 22:52:23 jake * Fix Win32 build. VC++ 6.0 and 7.0 now use the thread-safe code. * * Revision 1.3 2003/02/13 07:05:27 oetiker * Find attached the patch I promised to send to you. Please note that there * are three new source files (src/rrd_is_thread_safe.h, src/rrd_thread_safe.c * and src/rrd_not_thread_safe.c) and the introduction of librrd_th. This * library is identical to librrd, but it contains support code for per-thread * global variables currently used for error information only. This is similar * to how errno per-thread variables are implemented. librrd_th must be linked * alongside of libpthred * * There is also a new file "THREADS", holding some documentation. * * -- Peter Stamfest <peter@stamfest.at> * * Revision 1.2 2002/05/07 21:58:32 oetiker * new command rrdtool xport integrated * -- Wolfgang Schrimm <Wolfgang.Schrimm@urz.uni-heidelberg.de> * * Revision 1.1.1.1 2001/02/25 22:25:05 oetiker * checkin * *****************************************************************************/ #ifdef __cplusplus extern "C" { #endif #ifndef _RRDLIB_H #define _RRDLIB_H #include <time.h> #include <stdio.h> /* for FILE */ /* Transplanted from rrd_format.h */ typedef double rrd_value_t; /* the data storage type is * double */ /* END rrd_format.h */ /* main function blocks */ int rrd_create(int, char **); int rrd_update(int, char **); int rrd_graph(int, char **, char ***, int *, int *, FILE *, double *, double *); int rrd_fetch(int, char **, time_t *, time_t *, unsigned long *, unsigned long *, char ***, rrd_value_t **); int rrd_restore(int, char **); int rrd_dump(int, char **); int rrd_tune(int, char **); time_t rrd_last(int, char **); time_t rrd_first(int, char **); int rrd_resize(int, char **); char * rrd_strversion(void); double rrd_version(void); int rrd_xport(int, char **, int *, time_t *, time_t *, unsigned long *, unsigned long *, char ***, rrd_value_t **); /* thread-safe (hopefully) */ int rrd_create_r(const char *filename, unsigned long pdp_step, time_t last_up, int argc, const char **argv); /* NOTE: rrd_update_r are only thread-safe if no at-style time specifications get used!!! */ int rrd_update_r(const char *filename, const char *_template, int argc, const char **argv); int rrd_fetch_r(const char *filename, const char* cf, time_t *start, time_t *end, unsigned long *step, unsigned long *ds_cnt, char ***ds_namv, rrd_value_t **data); int rrd_dump_r(const char *filename, char *outname); time_t rrd_last_r(const char *filename); time_t rrd_first_r(const char *filename, int rraindex); /* Transplanted from parsetime.h */ typedef enum { ABSOLUTE_TIME, RELATIVE_TO_START_TIMThis is autosprintf.info, produced by makeinfo version 4.13 from autosprintf.texi. INFO-DIR-SECTION C++ libraries START-INFO-DIR-ENTRY * autosprintf: (autosprintf). Support for printf format strings in C++. END-INFO-DIR-ENTRY This file provides documentation for GNU `autosprintf' library. Copyright (C) 2002-2003, 2006-2007 Free Software Foundation, Inc. This manual is free documentation. It is dually licensed under the GNU FDL and the GNU GPL. This means that you can redistribute this manual under either of these two licenses, at your choice. This manual is covered by the GNU FDL. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (FDL), either version 1.2 of the License, or (at your option) any later version published by the Free Software Foundation (FSF); with no Invariant Sections, with no Front-Cover Text, and with no Back-Cover Texts. A copy of the license is at `http://www.gnu.org/licenses/fdl.html'. This manual is covered by the GNU GPL. You can redistribute it and/or modify it under the terms of the GNU General Public License (GPL), either version 2 of the License, or (at your option) any later version published by the Free Software Foundation (FSF). A copy of the license is at `http://www.gnu.org/licenses/gpl.html'.  File: autosprintf.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) GNU autosprintf *************** This manual documents the GNU autosprintf class, version 1.0. * Menu: * Introduction:: Introduction * Class autosprintf:: The `autosprintf' class * Using autosprintf:: Using `autosprintf' in own programs  File: autosprintf.info, Node: Introduction, Next: Class autosprintf, Prev: Top, Up: Top 1 Introduction ************** This package makes the C formatted output routines (`fprintf' et al.) usable in C++ programs, for use with the `<string>' strings and the `<iostream>' streams. It allows to write code like cerr << autosprintf ("syntax error in %s:%d: %s", filename, line, errstring); instead of cerr << "syntax error in " << filename << ":" << line << ": " << errstring; The benefits of the autosprintf syntax are: * It reuses the standard POSIX printf facility. Easy migration from C to C++. * English sentences are kept together. * It makes internationalization possible. Internationalization requires format strings, because in some cases the translator needs to change the order of a sentence, and more generally it is easier for the translator to work with a single string for a sentence than with multiple string pieces. * It reduces the risk of programming errors due to forgotten state in the output stream (e.g. `cout << hex;' not followed by `cout << dec;').  File: autosprintf.info, Node: Class autosprintf, Next: Using autosprintf, Prev: Introduction, Up: Top 2 The `autosprintf' class ************************* An instance of class `autosprintf' just contains a string with the formatted output result. Such an instance is usually allocated as an automatic storage variable, i.e. on the stack, not with `new' on the heap. The constructor `autosprintf (const char *format, ...)' takes a format string and additional arguments, like the C function `printf'. Conversions to `char *' and `std::string' are defined that return the encapsulated string. The conversion to `char *' returns a freshly allocated copy of the encapsulated string; it needs to be freed using `delete[]'. The conversion to `std::string' returns a copy of the encapsulated string, with automatic memory management. The destructor `~autosprintf ()' destroys the encapsulated string. An `operator <<' is provided that outputs the encapsulated string to the given `ostream'.  File: autosprintf.info, Node: Using autosprintf, Prev: Class autosprintf, Up: Top 3 Using `autosprintf' in own programs ************************************* To use the `autosprintf' class in your programs, you need to aThis is the file .../info/dir, which contains the topmost node of the Info hierarchy, called (dir)Top. The first time you invoke Info you start off looking at this node.  File: dir, Node: Top This is the top of the INFO tree This (the Directory node) gives a menu of major topics. Typing "q" exits, "?" lists all Info commands, "d" returns here, "h" gives a primer for first-timers, "mEmacs<Return>" visits the Emacs manual, etc. In Emacs, you can click mouse button 2 on a menu item or cross reference to select it. * Menu: C++ libraries * autosprintf: (autosprintf). Support for printf format strings in C++. GNU Gettext Utilities * ISO3166: (gettext)Country Codes. ISO 3166 country codes. * ISO639: (gettext)Language Codes. ISO 639 language codes. * autopoint: (gettext)autopoint Invocation. Copy gettext infrastructure. * envsubst: (gettext)envsubst Invocation. Expand environment variables. * gettext: (gettext). GNU gettext utilities. * gettextize: (gettext)gettextize Invocation. Prepare a package for gettext. * msgattrib: (gettext)msgattrib Invocation. Select part of a PO file. * msgcat: (gettext)msgcat Invocation. Combine several PO files. * msgcmp: (gettext)msgcmp Invocation. Compare a PO file and template. * msgcomm: (gettext)msgcomm Invocation. Match two PO files. * msgconv: (gettext)msgconv Invocation. Convert PO file to encoding. * msgen: (gettext)msgen Invocation. Create an English PO file. * msgexec: (gettext)msgexec Invocation. Process a PO file. * msgfilter: (gettext)msgfilter Invocation. Pipe a PO file through a filter. * msgfmt: (gettext)msgfmt Invocation. Make MO files out of PO files. * msggrep: (gettext)msggrep Invocation. Select part of a PO file. * msginit: (gettext)msginit Invocation. Create a fresh PO file. * msgmerge: (gettext)msgmerge Invocation. Update a PO file from template. * msgunfmt: (gettext)msgunfmt Invocation. Uncompile MO file into PO file. * msguniq: (gettext)msguniq Invocation. Unify duplicates for PO file. * ngettext: (gettext)ngettext Invocation. Translate a message with plural. * xgettext: (gettext)xgettext Invocation. Extract strings into a PO file. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@��������������������������������������'��� ����������@�������������������������������������/�������������` @�����` �����������������������������������7���o�������2 @�����2 ������|����������������������������D���o������� @����� ������ ����������������������������S������������� @����� ������x����������������������������]�������������H @�����H ��������������� �����������������g�������������(@�����(������������������������������������b�������������<@�����<������P����������������������������m�������������@����������������������������������������s�������������h.@�����h.������������������������������������y�������������x.@�����x.������������������������������������������������hB@�����hB�������������������������������������������������BP�����B��������������������� ����������������������������pCP�����pC������������������������������������������������`IP�����`I����������������������������������������������JP�����J��������������������������������������������������KP������K�������������������������������������������������KP�����K�������������������������������������������������KP�����K�����������������������������������������������LP�����L����������������������������������������������������������L���������������������������������������������������������cN������������������������������������������������������������������������������������������������������������ELF ���������>����@�����@�������l����������@�8��@���������@�������@�@�����@�@������������������������������������@�����@������������������������������������������@�������@������d�������d��������������������d�������dP������dP�����H������8�������������������g������gP�����gP������������������������������������@�����@��������������������������Ptd���c������c@�����c@��������������������������/libexec/ld-elf.so.1�������������FreeBSD�8 �%���-�������*����������� ����������������������������������+�������������!���(���,���$���%��������������������� ���)���'���#������������"�������������������������������������������������������������������� ������� ��������������������������������������������������� ����������������������� ���&���������������������������������������������� @������������������ @������������]����� @������������ ����gP������������������� @�����8�������������$ @�����I�������~�����PjP�����@�������x������4 @�������������1�����D @���������������� � @�������������������T @������������p������d @�����������������0{P�����������������t @�����L������������jP������������������ @�������������B����jP������������#����� @����������������dP�����������������jP�����������������jP�����������R����� @����� �������*����� @�����T������������� @������������v���HjP�������������i����� @�������������$���� �8@@�������������K����� @������������*������ @�����������=�����@�����/�������������@�����������������$@�����J�������o���HjP�������������4����XiP����������������8{P�������������J������4@�����*������������ {P�����������������({P������������������D@����� �������;�����T@�����/�������b�����d@������������R��� �������������������������t@�����l������� �����@�����J��������libmd.so.5�_DYNAMIC�MD4Final�_init�_fini�MD4Update�_GLOBAL_OFFSET_TABLE_�MD4Init�_Jv_RegisterClasses�libc.so.7�putchar�ioctl�__stack_chk_guard�__stderrp�puts�errx�getpass�sleep�optarg�opterr�socket�__stack_chk_fail�_DefaultRuneLocale�environ�fprintf�optind�__progname�strlcpy�strncpy�bcopy�getopt�memset�_init_tls�atexit�optreset�fwrite�ether_aton�atoi�strlen�close�_edata�__bss_start�_end�FBSD_1.0�����������������������������������������������������������f����������(z���������PjP�������������������jP�������������������jP�������������������jP�������������������jP������������������� {P��������%�����������({P��������&�����������piP�������������������xiP�������������������iP�������������������iP�������������������iP�������������������iP�������������������iP�������� �����������iP�������� �����������iP�������� �����������iP�������������������iP�������������������iP�������������������iP�������������������iP�������������������iP�������������������iP�������������������iP�������������������iP��������������������jP�������������������jP�������������������jP�������� �����������jP��������$����������� jP��������'�����������(jP��������(�����������0jP��������)�����������8jP��������+�����������@jP��������,�����������H��B3��H�5\�%\�%\�h����%~\�h���%v\�h���%n\�h���%f\�h���%^\�h���%V\�h���%N\�h���p%F\�h���`%>\�h ���P%6\�h ���@%.\�h ���0%&\�h ��� %\�h ���%\�h����%\�h���%\�h���%[�h���%[�h���%[�h���%[�h���%[�h���%[�h���%[�h���p%[�h���`%[�h���P%[�h���@������������UHAULoATSHHcÅLdL%ll�~:HWHt1H*U�t#H</HU�HDH U�HuḐgP�Ht+HB8@@�8LL�� ֐H=k��t$HHT�HT�HHuk�HffffffH=Y��t����Ht PiP�IAÐB< w @ǍHЉÍB<w @ǍHɉÍB1<w@ǍHffffffSHHH="k�@@�1H=k�Hھ@@�1H=j�Hھ�A@�1H=j�Hھ(A@�1H=j�HھXA@�1H=j�HھA@�1|H=j�HھA@�1fH=j�HھA@�1PH=uj�HھA@�1:H=_j�Hھ(B@�1$H=Ij�HھXB@�1H=3j�HھB@�1H=j�HھB@�1H=j�HھB@�1H=i�HھC@�1H=i�Hھ@C@�1H=i�HھxC@�1H=i�HھC@�1tH=i�HھC@�1^H=i�Hھ�D@�1HH=mi�Hھ0D@�12H=Wi�Hھ`D@�1H=Ai�HھD@�1H=+i�HھD@�1H=i�HھD@�1H=h�Hھ E@�1H=h�HھXE@�1H=h�HھE@�1H=h�HھE@�1���ffft Q@�14Q@�1(fffF~H���8�u� H9uH1Q@�ffffffffffAU1ATAUSH[@�HE~EEl$1ffffHD9t*31Q@�D9}:���H#D9uHV@�1[]A\A]hfffAT1AUSH[@�NE~=t61 CHt&Q@�*���YO��D9u[]A\]���fffffffAT1AUSH[@�E~ 1ff31Q@�HD9u[]A\]���KfffffU���SHHH8HH$����HD$����HV�HD$(1HD$����HD$����1Ҿ������H\$t2H19i t-0HD$(H3U�u)H8[]þQ@����1JQ@����19dU���SHHH8HH$����HD$����HDU�HD$(1HD$����HD$����Z1Ҿ������H\$Dt<H1:i t7pHT$(H3T����uH8[]Q@����1Q@����1offffffffAUATUSH ��Hf$ fD$$HIHHHAJ~811HcBT-Hȉ޿Q@�HH"H H1JL)A9H ��[]A\A]þ���E@�1A���lffffSH ��Hf$ fD$cQ@�1;H|$���HR@�1 H|$ ���-R@�1H|$���-R@�1H|$��� ���qH ��[fffH ��Hf$ fD$ht$AR@�1t$ E@�1t$F@�1xt$@F@�1ht$ZR@�1Xt$xR@�1Ht$R@�18t$"R@�1(t$&R@�1t$*R@�1t$.R@�1t$2S@�1t$6-S@�1t$:BS@�1t$>\S@�1t$BvS@�1t$FS@�1t$JS@�1t$NhF@�1xt$RF@�1ht$VF@�1Xt$ZF@�1Ht$^G@�18t$bS@�1(t$f0G@�1t$jXG@�1t$nG@�1t$rG@�1t$vG@�1t$zH@�1t$~S@�1$���8H@�1$���1`H@�$���H@�1$���H@�1l$���H@�1Y$��� I@�1F$���PI@�13$���I@�1 $���I@�1 $���I@�1$����J@�1$���(J@�1$���PJ@�1$���xJ@�1$���J@�1$���J@�1$���J@�1u$���K@�1b$���@K@�1O$���hK@�1<$���K@�1)$���K@�1$���K@�1$���L@�1$���S@�1$���0L@�1$���T@�1$���XL@�1$���L@�1$���L@�1~$���L@�1k$R��L@�1X$V��M@�1E$Z��HM@�12$^��1pM@�$b��M@�1 $f��M@�1$n��M@�1$r��N@�1$v��8N@�1$z��XN@�1$~��8T@�1$��N@�1H ��ffffffffUSH ��Hf$ fD$�rVT@�1HGH|$���T^T@�1,H|$���)qT@�1H|$ ���T@�1H|$*���T@�1H|$:���T@�1H|$B���T@�1H|$H���1T@�t$N@��@��@3��T@�1[fffffV@�1HU@�1<H}P���:&U@�1"H}R���09U@�1H}X���1MU@�E`��<��<��<��V@�11U@�EaS��<��<��<k��V@�1H$ ��zU@�1nH}b���lU@�1TEr���Hff$ ��SU@�1+Ex���Hff$ ��*U@�1Ez���Hff$ �� V@�1E|���Hff$ ��#V@�1���H߾���ff$ �� ���&H ��[]ÿT@�1pfffffT@�1X`U@�I`U@�:kU@�1(U@�1pU@�1spU@�1&U@�1U@�1@U@�1ffffffATUHSH "��H$ ��fDŽ$ ��fDŽ$ ��A��9V@�HHf$ fD$PHqRV@�1IH|$���V1aV@�.T$ ¨�������� ��@��f��V@�V@�1H{ ���E��D$tV@�D ��1t$~V@�1D$nV@�D ��1}���)W@�1jsp*^@�?W@�BW@�@HDf1B]W@�16sH{nW@�1H{2���W@�1H{B���W@�1H{Z���W@�1H{\���W@�1H{^���W@�1H{`���W@�1H{d���W@�1gH{b���eW@�1MH{f���K1 X@�3H{h���1X@�1H{j���5X@�1H{l��� ���H "��[]A\fffffN@�Ut$tV@�1t$~V@�1t$nW@�11vV@�T$ ¨Z1V@�dT$ ¨F1V@�HT$ ¨2fff1V@�(T$ ¨ fff1V@�T$ ¨@fff1V@�T$ fffffV@�1fffffffffffH\$Hl$Ll$Lt$ILd$H8 ��IHf$ fD$$HHHHH9}+ھN@����1���E@�1+���у ���LHcHHHXH\�LcHC����LID$����ID$����ID$����LoLfCH1fffAWAVAUATUH1SH( ��Lt$H|$T$ ��LsHHj��}�0���IvHHHfAF D$D$fAFAF ftft f ���AFAF�AF�AF �AF �AF �D$t6uH|$LfD$�fD$4fffH( ��[]A\A]A^A_H|$LfD$�fD$ѐUHMxt X'EtxYt_M~M ]HtILA>AD�A$EIDD)uÉ`O@����1o8O@����11�O@����1FfH\$Hl$HLl$Ld$H8 ��HIf$ fD$HH��� ���~@tWfffu7Ht$D$�������HfF��LH1 t9`X@����1ffffHt$D$�������HfF��Ht$D$�������HfF��bHt$ D$ �������HfF��@iHX@����\ffffffHl$Ld$ALt$L|$IH\$Ll$HX@��L$ ��HfDŽ$ �� fDŽ$ ��LHLf$ fD$�vAD$v`X@����1$X_@�HfDŽ$ ���dfALLq1NHFfAFH7fAFhH(fAF2HfAF H fAFRH����fff��fffff��1ҾoX@����1 HfAFfAFDHfAFd2HfAFbIE1fffA\$bHf9#��AIAuHHX@�¿���1H,fAFHfAF<I���Idž����������HG����H5}@�THwHH���Iv AF �������fF��JHt9t|f.fAf@ffA^@Hr0 fA^@AF@fAF@���At5AVuAffH&fAFvfAF@�AVt���뵺���1҅tHX@�@1.fffffffAWAVAUATIUHSH!��Hf$ fD$�H>�H$!��1sHDŽ$ ������HDŽ$ ������LHDŽ$ ������HDŽ$ ������IDŽ$�!������fDŽ$!����L$ ��HDŽ$ ������HDŽ$ ������HDŽ$ ������HDŽ$ ������DŽ$ ������fDŽ$ ����Z ��ILHcPX@�f$ ��fDŽ$ ��&�fDŽ$ ��#HH HA��L$p ��1���LH~'FHSHpfffffBHALHH9uH$ ��HCT-�L$ ��LHMe#HLHHP���HL�I}H޻<���LHfDŽ$ �� �fDŽ$ ��&�fDŽ$ ��$LHHHf$ fD$HHfD$@�fD$Pfff���tcHHVAF @t߿X@�ItCH$!��H3<�u-H!��[]A\A]A^A_ÿX@� ���1���'bH 7M�Y@����������X@� ���1���ffffffffffAWY@�AVAUATAUHSHH@��H7<�����HD$1i��A~kH}?-tbH|$L�����<����;����1E1E1E1fffffO@�HDA��A6v!H|$AL����HD$!Y@�똉$P`@�L-;����H=;�AL-w;����L-i;����wL-X;����fL-G;����UL-6;����DL-%;����3L-;�E���DD���L-:����L-:����L=:�#���L-:����L-:����L-:�$���E���C��A4��O@����1+L-h:� ���vL-W:����eA'��DO@����1 ���=L-:�!���,���"���'���ff ������L-9�%���L-9�&���L-9�"������������H|$�tuMt ff$b@�H|$'vH|$L1���H@9� ��HjP�x ��I4D$Hc@�H 9�HD$���L-8���� ��� ���fffH|$Hl$ fD$  fD$"1H^@�fL]T]1^@�HH���u)H|$H|$H$0 ��fDŽ$0 �� fDŽ$2 �� H1%Y@�d$4 ��u;Y@�1K$4 �� �� ��{ ��V@�11tY@� $6 ��uY@�1$6 �� �� �� �� �� ��V@�1 Z@�1H{���"Z@�1H{ ���6Z@�1pH{ ���~HZ@�1VH{���]Z@�1<H{���:tZ@�1"H{��� Z@�1H{���Z@�1H{ ���Z@�1{"Z@�1{$rZ@�1C&feP ��fm ��U@�1V@�1w1Z@�kC2fu[@�XC2f ��f ��V@�14%[@�1(H{4���&7[@�1H{6��� Q[@�1H{8���m[@�1H{:���[@�1H{<���[@�1H{>���1[@�C@o������[@�1aV@�1U1[@�IC@u \@�7C@ ��x ��V@�1\@�1 H{B��� P@�1H{D���7\@�1H{F���R\@�1H{H���m\@�1H{J���\@�1H{L���\@�1mH{N���k1\@�SCRfu \@�@CRf��f��f��V@�1\@�1{THP@�1H{V���hP@�1H{X���]@�1H{Z���P@�1H{\���+]@�1H{b���G]@�1oH{d���mc]@�1UH{h���S]@�1;H{l���91]@�!sr@��@=��@��T@�1V@�11]@�Ct��<��<v��<��V@�11]@�CuI��<��<~��<e��V@�1n]@�1bH{v���`]@�1HH{x���F^@�1.H������^@�1H������ +^@�1H������;^@�1H������1K^@�C~V��a^@�1V@�1H\$ ���1' ���H|$HfD$  fD$" ~ ��1HD$���:^@�`fD$"H|$HfD$ �ASft=C f!��f ��f��^@�fD$"uH|$fCHfD$ �CDP@�41'H|$H|$ H|$jH|$ H|$LDH|$LRH|$H\$ fD$  fD$"�H=LYI��^@����1H|$���H\$  ��1HH|$HfD$ �fD$"�T$$8H 1)_@�1CDKPQ@�DCKSs$1wC2_@�AA���1PSK1spQ@�H7T$$9yH\$ 1 ��HH|$HfD$ ��fD$"�rH\$  ��1HH|$HfD$ �fD$"L��fc~H|$H1 ��HLfD$$fD$,��H|$HވD$&D$'�D$(�D$)�D$*�D$+�fD$ �fD$"H|$LH|$DLgЉP@�1^@�1^@�1@_@����1W$pc@�{[�����H|$HfD$ �fD$"4fD$$1{Z ���tξ�Q@����1���붸���1뫿t^@�1N`U@�?`U@�0uT@�1(fK~d[@�1U@�1[@�1|[@�1kT@�1Z@�1'^Y@�1tQY@�1$4 ��OBY@�1q$4 ��*[@�1UC2Z@�1@Y@�1/nY@�1$6 ��IY@�1$6 ��$Y@�1$6 ��Y@�1$6 ��[@�1i\@�1w\@�1C@Y\@�1wCR<\@�1b?\@�1QCR U@�1<pU@�1+pU@�1_U@�1 U@�1ypU@�1h _@����1a(Q@����1PH)�SHt1H(iP�HHu[ÐHH��$FreeBSD: src/lib/csu/amd64/crti.S,v 1.7.30.1.4.1 2010/06/14 02:09:06 kensmith Exp $����usage: %s -i iface -A (show specified APs) ���� %s -i iface -N (show specified SSIDss) �������� %s -i iface -S (show NIC status) ������ %s -i iface -I (show NIC capabilities) �������� %s -i iface -T (show stats counters) �� %s -i iface -C (show current config) �� %s -i iface -R (show RSSI map) �������� %s -i iface -t 0-4 (set TX speed) ����� %s -i iface -s 0-3 (set power save mode) ������ %s -i iface [-v 1-4] -a AP (specify AP) ������� %s -i iface -b val (set beacon period) �������� %s -i iface [-v 0|1] -d val (set diversity) ��� %s -i iface -j val (set netjoin timeout) ������ %s -i iface -e 0-4 (enable transmit key) ������ %s -i iface [-v 0-8] -k key (set key) � %s -i iface -K 0-2 (no auth/open/shared secret) ������� %s -i iface -W 0-2 (no WEP/full WEP/mixed cell) ������� %s -i iface -l val (set station name) � %s -i iface -m val (set MAC address) �� %s -i iface [-v 1-3] -n SSID (specify SSID) ��� %s -i iface -o 0|1 (set operating mode) ������� %s -i iface -c val (set ad-hoc channel) ������� %s -i iface -f val (set frag threshold) ������� %s -i iface -r val (set RTS threshold) �������� %s -i iface -M 0-15 (set monitor mode) �������� %s -i iface -L user (enter LEAP authentication mode) �� %s -i iface -Q print signal quality cache ����� %s -i iface -Z zero out signal cache �� %s -h (display this message) ��Too many SSIDs only printing %d of %d ��RX PLCP CSUM errors: [ %u ] �RX PLCP format errors: [ %u ] �������RX PLCP length errors: [ %u ] �������LMAC multicasts transmitted: [ %u ] ��LMAC broadcasts transmitted: [ %u ] ��LMAC unicast frags transmitted: [ %u ] �������LMAC unicasts transmitted: [ %u ] ����Beacons transmitted: [ %u ] �Single transmit collisions: [ %u ] ���Multiple transmit collisions: [ %u ] �Transmits without deferrals: [ %u ] ��Transmits deferred due to protocol: [ %u ] ����Transmits deferred due to energy detect: [ %u ] �������RX duplicate frames/frags: [ %u ] ����TX max lifetime exceeded: [ %u ] �����RX max lifetime exceeded: [ %u ] �����Sync lost due to too many missed beacons: [ %u ] �������Sync lost due to ARL exceeded: [ %u ] ��������Sync lost due to deauthentication: [ %u ] �����Sync lost due to disassociation: [ %u ] �������Sync lost due to excess change in TSF timing: [ %u ] ���Host transmitted multicasts: [ %u ] ��Host transmitted broadcasts: [ %u ] ��Host transmitted unicasts: [ %u ] ����Host transmission failures: [ %u ] ���Host received multicasts: [ %u ] �����Host received broadcasts: [ %u ] �����Host received unicasts: [ %u ] ������Host receive discards: [ %u ] �������HMAC transmitted multicasts: [ %u ] ��HMAC transmitted broadcasts: [ %u ] ��HMAC transmitted unicasts: [ %u ] ����HMAC transmissions failed: [ %u ] ����HMAC received multicasts: [ %u ] �����HMAC received broadcasts: [ %u ] �����HMAC received unicasts: [ %u ] ������HMAC receive discards: [ %u ] �������HMAC transmits accepted: [ %u ] ������Access point mismatches: [ %u ] ������Authentication rejects: [ %u ] ������Authentication timeouts: [ %u ] ������Association rejects: [ %u ] �Association timeouts: [ %u ] ��������Management frames received: [ %u ] ���Management frames transmitted: [ %u ] ��������Refresh frames received: [ %u ] ������Refresh frames transmitted: [ %u ] ���Poll frames received: [ %u ] ��������Poll frames transmitted: [ %u ] ������Host requested sync losses: [ %u ] ���Host transmitted bytes: [ %u ] ������Host received bytes: [ %u ] �Uptime in microseconds: [ %u ] ������Sync lost due to better AP: [ %u ] ���RSSI table: [ not available ]��bad modifier %d: there are only %d SSID settings��������encryption key must be no more than 18 characters long��hex strings must be of even length������encryption key must be 0, 5 or 13 bytes long����bad modifier %d: there are only 4 access point settings�must specify RX or TX diversity�ANISCTRht:a:e:o:s:n:v:d:j:b:c:f:r:p:w:m:l:k:K:W:QZM:L:�� Specified AP association timeout: ����� Power save listen interval: �� Power save fast listen interval: ������ Power save fast listen decay: �������� WEP Key %d has an unknown size %u ����� The active transmit key is %d �5.5Mbps not supported on this card������11Mbps not supported on this card������� %02x:%02x:%02x:%02x:%02x:%02x,� sig: %d, noise: %d, qual: %d �[ On ]�[ Off ]�[ %.*s ]�%02x�%2.1fMbps �%u �socket�SIOCSAIRONET�SIOCGAIRONET�SSID %2d: [ %.*s ] �Access point 1: � Access point 2: � Access point 3: � Access point 4: �RX overruns: [ %u ] �RX MAC CRC errors: [ %u ] �RX MAC CRC OK: [ %u ] �RX WEP errors: [ %u ] �RX WEP OK: [ %u ] �Long retries: [ %u ] �Short retries: [ %u ] �Retries exhausted: [ %u ] �Bad ACK: [ %u ] �Bad CTS: [ %u ] �RX good ACKs: [ %u ] �RX good CTSs: [ %u ] �TX good ACKs: [ %u ] �TX good RTSs: [ %u ] �TX good CTSs: [ %u ] �Beacons received: [ %u ] �RX partial frames: [ %u ] �SSID mismatches: [ %u ] �Speed mismatches: [ %u ] �Uptime in seconds: [ %u ] �OUI: � Product number: � Manufacturer name: � Produce name: � Firmware version: � OEM MAC address: � Aironet MAC address: � Radio type: [ �802.11 FH�802.11 DS�LM2000 DS�unknown (%x)� Regulatory domain: � Assigned CallID: � Supported speeds: � RX Diversity: [ �factory default�antenna 1 only�antenna 2 only�antenna 1 and 2� TX Diversity: [ � Supported power levels: � Hardware revision: � Software revision: � Software subrevision: � Interface revision: � Bootblock revision: �RSSI table: [ present ]�MAC address: � Operating mode: [ �configured �MAC ON �RX ON �synced �associated �LEAP �error �Error code: � Signal strength: [ %u%% ]� Average Noise: [ %u%% ]� Signal quality: [ %u%% ]� Signal quality: [ %u ]� Max Noise: [ %u%% ]�.5� Current TX rate: [ %u%s ]� Current SSID: � Current AP name: � Current BSSID: � Beacon period: � DTIM period: � ATIM duration: � HOP period: � Channel set: � Current channel: � Hops to backbone: � Total AP load: � Our generated load: � Accumulated ARL: �badly formatted address�unknown action�bad diversity setting: %u�unsupported power level: %dmW�Username too long (max %d) �Enter LEAP password:�Password too long (max %d) �Authenticated�Failed LEAP authentication �i:�an0�Operating mode: [ �ad-hoc�infrastructure�access point�access point repeater� Receive mode: [ �broadcast/multicast/unicast�broadcast/unicast�802.11 monitor, current BSSID�802.11 monitor, any BSSID�LAN monitor, current BSSID� Fragment threshold: � RTS threshold: � MAC address: � Supported rates: � Short retry limit: � Long retry limit: � TX MSDU lifetime: � RX MSDU lifetime: � Stationary: � Ordering: � Device type: [ �PC4500�PC4800� Scanning mode: [ �passive�Aironet active� Probe delay: � Probe energy timeout: � Probe response timeout: � Beacon listen timeout: � IBSS join network timeout: � Authentication timeout: � WEP enabled: [ �LEAP�mixed cell�full�no� Authentication type: [ �none�open�shared key� Association timeout: � Offline scan interval: � Offline scan duration: � Link loss delay: � Max beacon loss time: � Refresh interval: � Power save mode: [ �constantly awake mode�PSP�PSP-CAM (fast PSP)� Sleep through DTIMs: � Power save listen decay: � AP/ad-hoc Beacon period: � AP/ad-hoc ATIM duration: � AP/ad-hoc current channel: � AP/ad-hoc DTIM period: � Radio type: [ � RX Diversity: [ � TX Diversity: [ � Transmit power level: � RSS threshold: � Node name: � ARL threshold: � ARL decay: � ARL delay: � Configuration: [ �Home Configuration�Enterprise Configuration�WEP Key status:� Key %u is unset � Key %u is set 40 bits � Key %u is set 128 bits �idx pct dBm�%3d %3d %4d �unsupported speed�must specify interface name�[%d/%d]:� %d.%d.%d.%d,�%s is not numeric�������(@�����t(@�����t(@�����t(@�����(@�����t(@�����t(@�����t(@�����t(@�����t(@�����(@�����t(@�����(@�����(@�����)@�����)@�����I)@�����`)@�����r)@�����)@�����)@�����)@�����)@�����%*@�����t(@�����t(@�����Z*@�����*@�����t(@�����t(@�����(@������1@�����.@�����0@�����.@�����.@�����.@�����.@�����.@�����0@�����.@�����0@�����0@�����0@�����0@�����.@�����.@�����0@�����0@�����0@�����0@�����.@�����.@�����s0@�����.@�����.@�����i0@�����.@�����.@�����.@�����.@�����.@�����.@�����K0@�����:0@�����)0@������0@�����/@�����/@�����.@�����.@�����.@�����/@�����/@�����/@�����/@�����}/@�����l/@�����[/@�����J/@�����9/@�����(/@�����/@�����.@����� /@�����.@�����61@�����2@�����+2@�����:@�����-:@�����<:@�����K:@�����61@�����Z:@�����61@�����61@�����61@�����o:@�����o:@�����o:@�����o:@�����61@�����61@�����:@�����61@�����61@�����61@�����61@�����61@�����61@�����61@�����61@�����61@�����61@�����61@�����61@�����:@�����;@�����61@�����61@�����<@�����;@�����61@�����<@�����1@�����1@�����1@�����1@�����1@�����1@�����f=@�����_=@�����X=@�����<=@�����=@�����������?$FreeBSD: src/lib/csu/amd64/crtn.S,v 1.6.30.1.4.1 2010/06/14 02:09:06 kensmith Exp $������*^@�������������HiP������������zR�x ��$������@�����AC BK����������D���@@�8����D�������\���@�"��������������t���@�7�����������������@����A��������@������������������@�2�����������$������@�|����BDD A(L0������`@�f����BFA �����@�I����BFA ���<�� @�����AFJP�����\��@�����AFJP��,���|��@�����BBA A(G@������������`@�����AG@������������@�E���G@��������P@����AAG@�$����� @����BAD GD����$���,��$@�����JLO@�������4���T��%@����BBB B(A0F8G@����������&@�(���JT@��$������(@�&���JMT����4�����0+@����BBB B(D0D8GB�����4��� ��0.@����BGB B(D0D8G���������������zR�x ��������� ���@@�%����H�����������������������f������� ������� @����� �������8@@������������@������������@������������H@����� ������������� ������������������������������������XiP���������������������������������������8 @������������ @������������������� ��������������o����p @�����o�����������o���� @�����������������������������������������������������������������������������������������������������������������������������gP��������������������� @����� @����� @����� @�����* @�����: @�����J @�����Z @�����j @�����z @����� @����� @����� @����� @����� @����� @����� @����� @����� @�����@�����*@�����:@�����J@�����Z@�����j@�����z@�����@��������������$FreeBSD: src/lib/csu/common/crtbrand.c,v 1.6.2.1.4.1 2010/06/14 02:09:06 kensmith Exp $�$FreeBSD: src/lib/csu/amd64/crt1.c,v 1.15.10.1.4.1 2010/06/14 02:09:06 kensmith Exp $�GCC: (GNU) 4.2.1 20070719 [FreeBSD]��GCC: (GNU) 4.2.1 20070719 [FreeBSD]��$FreeBSD: src/usr.sbin/ancontrol/ancontrol.c,v 1.26.2.1.4.1 2010/06/14 02:09:06 kensmith Exp $�GCC: (GNU) 4.2.1 20070719 [FreeBSD]��GCC: (GNU) 4.2.1 20070719 [FreeBSD]��.shstrtab�.interp�.note.ABI-tag�.hash�.dynsym�.dynstr�.gnu.version�.gnu.version_r�.rela.dyn�.rela.plt�.init�.text�.fini�.rodata�.eh_frame_hdr�.data�.eh_frame�.dynamic�.ctors�.dtors�.jcr�.got�.bss�.comment��������������������������������������������������������������������� �������������@������������������������������������������������������@�����������������������������������������!�������������@�����������P���������������������������'��� ����������H@�����H������8��������������������������/�������������@����������������������������������������7���o������� @����� ������Z����������������������������D���o�������p @�����p ������ ����������������������������S������������� @����� ����������������������������������]�������������8 @�����8 ��������������� �����������������g������������� @����� ������������������������������������b������������� @����� ����������������������������������m�������������@�����������1���������������������ELF ���������>����P@�����@�������:����������@�8��@���������@�������@�@�����@�@������������������������������������@�����@������������������������������������������@�������@�����2������2�������������������2������2P�����2P����������� �������������������@5������@5P�����@5P������������������������������������@�����@��������������������������Ptd���2������2@�����2@��������������������������/libexec/ld-elf.so.1�������������FreeBSD�8 �%���9��� ���8���,�������+����������)�������������*��� ���$���%���/���&�������5���4�������7���0�������������������������(���3���1���"������������6���������������������������������������������������������� ������������������������������������������������������������������������������������� ������!�������'��� �����������#������ ���-���������2������������.���������������������������������d@�����������������t@������������������@�����������������@����� �������������@������������������@������������Y�����8P�����@������������@�����'�������;������@������������������@�����J������������@������������^�����@�������������������@������������~������$@�����}������������4@�����������������;P������������ �����D@�����L������������T@�����)�������������d@�������������q�����t@���������������2P������������5������@�����������������8P������������K�����@�����������������@����� �������x�����@�����T�������������@�����B�������k������@�����������������@�����������������@�����~�������������@�����������������@�������������P������$@�����������������4@�����j�����������D@������������'�����8P������������k�����T@������������R�����d@�����[�������(����8P�����������������t@�����/������������@������������������@�����w�������;�����@�����J�������������@�����J�����������<P�������������A������@�����������������@�����������������8P�����������������@�����/�����������8P������������������@����� ������������@�����/�������A�����@������������w������$@������������������4@���������������� ��������������������_Jv_RegisterClasses�libc.so.7�putchar�__mb_sb_limit�warnx�ioctl�if_indextoname�snprintf�__stack_chk_guard�__inet_addr�getpid�fgets�memcpy�__stderrp�puts�errx�optarg�gethostbyaddr�socket�__stack_chk_fail�write�environ�sysctl�fprintf�if_nametoindex�optind�reallocf�__progname�__error�read�strncpy�_CurrentRuneLocale�bcopy�link_ntoa�sscanf�__inet_ntoa�gettimeofday�fopen�getopt�memset�err�_init_tls�fclose�strcmp�gethostbyname�atexit�hstrerror�ether_aton�ether_ntoa�__h_errno�strchr�warn�free�_end�FBSD_1.0�����������������������������������������������������������������������������(z���������8P�������������������8P�������������������8P��������$�����������8P��������'�����������8P��������0�����������8P��������2�����������7P�������������������7P������������������� 7P�������������������(7P�������������������07P�������������������87P�������������������@7P�������������������H7P�������� �����������P7P�������� �����������X7P�������� �����������`7P�������� �����������h7P�������� �����������p7P�������������������x7P�������������������7P�������������������7P�������������������7P�������������������7P�������������������7P�������������������7P�������������������7P�������������������7P�������������������7P�������������������7P�������������������7P�������������������7P�������������������7P�������������������7P�������� �����������7P��������!�����������7P��������"������������8P��������#�����������8P��������%�����������8P��������&�����������8P��������(����������� 8P��������)�����������(8P��������*�����������08P��������+�����������88P��������,�����������@8P��������.�����������H8P��������/�����������P8P��������1�����������X8P��������3�����������`8P��������4�����������h8P��������5�����������p8P��������6�����������x8P��������7�����������H��r��H�5&�%&�%&�h����%&�h���%&�h���%&�h���%&�h���%~&�h���%v&�h���%n&�h���p%f&�h���`%^&�h ���P%V&�h ���@%N&�h ���0%F&�h ��� %>&�h ���%6&�h����%.&�h���%&&�h���%&�h���%&�h���%&�h���%&�h���%%�h���%%�h���%%�h���p%%�h���`%%�h���P%%�h���@%%�h���0%%�h��� %%�h���%%�h����%%�h���%%�h ���%%�h!���%%�h"���%%�h#���%%�h$���%~%�h%���%v%�h&���%n%�h'���p%f%�h(���`%^%�h)���P%V%�h*���@%N%�h+���0%F%�h,��� %>%�h-���������������UHAULoATSHHcÅLdL%(�~:HWHt1Hb�t#H</HN�HDHC�Hu@5P�Ht+HB+@�8oLL�� ֐H=$��t$HH�H�HHu$�HffffffH="��t����Ht 6P�IAÐt#~���t���t1ffffGw���fffffffffffffSHT$�����HHN$�����?$�9$�1$��9P�t[HHHt H@���9P�H8[�9P�H8HH¿M,@�1W1fffffffffffAUATIUHSH( �H!#�HD$1��H$����HD$����$D$T��������1�� 9P�2&�b#�b#�tt_T,@����16&�H%� :#� ,#� ��H9#����fE��HJ#�t%���fE�"�A9P�H"�t��M)��"����!�� 9P�fA)fD-"�"�1%� 9P�=j�"�Hc҉%�"���fff=:��� 9P�_~S"�;$�u׋A"�;$�uɅҸ 9P����HT$H3p!�5��H([]A\A]1Ҿ������2���m$�6���LLDA$���tHHPIՋ!����HL$���tHHPI8u 1g,@�b11,@�O 9P�L���HE�A9P�-HL9P� �% �,@����1#fffffffffffAW���AVAUATUSHH��HLnL$@��H�H$��1LHT$HƄ$@��6Ƅ$A������fG��HHD$H|$������EH"�����"�����"�����"�������L$0��HA,@�ffffL���LLu01LHH$0��H��Hj"���,@����L �� E"��@��="����%��$E��Md,@����L��LHH���A$BfAD$Ht$L���Ƅ$F��*HH��HHƘ���t������H\$F���;C���H1{u B��Ht$/@�1���H$��H3���Hĸ��[]A\A]A^A_,@� ���L���'!���� !����HH,@����H3H ����mH\$HHHF;C*/@�A���@,@����L�� �A�� �H�/@�HH\$1Ҿ������[\$A��HD$ H$ ��$iDDŽ$ �����H$(��1y��Hc$ ��H$(��H$(��H9��L$��IGH$ E���<HGHl*H9��}uں���HLHELi DH$��HEH$��1cx$��%���u1L%i D;pH$BT$!#E9XL$(��L9w+���fffAG���<HGN|:L9���LHuAuI_LCSItH`/@�1L]H5[Dck@ffCHt$L���@$D��f$B��H�/@�D\H\${,@�H10���,@����LtOH}$E��Md1L,@�j���YHt$1>.@����>Ht$0/@�1,@�1!DH,@����1$E��5]�Md<!fffffffffffAWE1E11IAVAUATUSHXLt$(Ll$H4$���D$���D$���LLD$����H�HD$H1D$���D$ ���D$$�����H|$(�D$ ����u%HT$HH37�D$ u��HX[]A\A]A^A_E1#x8 %��HT$(HHHHD$(Ht$(L-HH��E1E1LH¾���LIuuILt$(D$ ����I9���HjHHH=��N, t0A}Ht$0HtH5�H|$0ufffffMtBAD$L9fft-HI9vAIIĘ���t���{���D$ ���HLL$HI9wHNf/@����1&-@����1L'-@����1fAVIAUATUSH@H�HD$81HIA�����1HH%�$6D$����fG��3ffHHHxtU�@���@x�HL���HHt{HHŘ���t ���u���HxuCuxftAD$1L���EK���`Htj}wLH¿\-@�111L>.@�2���HT$8H3]�u1H@[]A\A]A^H=�LB-@�1<���ȸ���fffHH=m�A0@�Am-@�80@�`0@�-@�1HD$-@�HD$0@�H$0@����fffffffffffAWE1AVAUIATAU1SH��H�H$��1ff-@�LDttwC vLډ$P1@���@����H�H�먅���@뛅���@A���놅fff���@rH=S����DD5J�Ht-tt(1@����1^Et���E)IcƃMl�v-E1H$��H3�Db��H��[]A\A]A^A_É$X2@����H���9���*���ffff8��Hs�-@����1E��E��'@�1?AtI]� .@�HHH��Ll$ H$P��E1I���I���Mu2M}dL$ ��L$(��HT$L$0��H$8��HD$H$@��ffffHd���HH���#���HHt��$P��H…x.5b�9~$H _�H…x 9} HDBu ttHT$LL$1ML.@�H$L~~H$ �����DEBAD$-��5��DLE1mAEtuE)��(@�1E1HH޿4.@�1A���2A���A���fffI}�`ASAtfIm�A���HHH(x(@�E0{HH¿-@�1H5�Ht .@�1 ���A���'1\fffff;I}�1!CffffIu,@�������HV�-@����1Hھ .@����1ffffffSH ~H�HD$1>.@�H���H1B1HHD$H3�uH [ffffffffAUIATIUHSH(=�HP�HD$1A��H~������BH%��HA|$HH¿C.@�1U��E<��<��<���E1ۄtHXHYH4>.@�19}HHtH.@�1IU@Hy��H�Hz��H)HH���ֿg.@�1AD$+��AE @���E<%��fffw~< ��<fffl��<���.@�1zfff/8A.@�3����EH|>.@�H1<ff<��<ffff���<u .@�1 ���4HD$H3t���H([]A\A]ffO.@�11.@�E<%fffff.@�1f.@�1\.@�11;P�vIU@H'�H)HH:�offf~.@�1Hh.@�17$.@�1&1.@�UEUк ��� LHHlE�ff.@�1E�f%���1HD.@�01fE�KHf%���9Xf.@�1XE>H �SHt1H6P�HHu[ÐHH��$FreeBSD: src/lib/csu/amd64/crti.S,v 1.7.30.1.4.1 2010/06/14 02:09:06 kensmith Exp $�%s: %s�internal wrong cmd�writing to routing socket�read from routing socket�temp�pub�only�blackhole�reject�trail�auto�ioctl(SIOCGIFCONF)�no interface found for %s �invalid Ethernet address '%s'�route-sysctl-estimate�could not reallocate memory�delete: cannot locate %s �%s (%s) deleted � arp -d hostname [pub]�%s %s %s %s %s %s %s � arp -f filename�andfsSi:�interface %s does not exist�if_nametoindex(%s)�%s (%s) -- no entry� on %s�r�cannot open %s�%49s %49s %49s %49s %49s�bad line: %s�?�%s (%s) at �(incomplete)� permanent� expires in %d seconds� expired� published (proxy only)� published� [ethernet]� [token-ring]� rt=%x�:%x� [fddi]� [atm]� [vlan]� [firewire]� [bridge]�����Choose one of blackhole or reject, not both.����%s: Sending trailers is no longer supported ����using interface %s for proxy with address ������set: proxy entry exists for non 802 device������cannot intuit interface index and type for %s ��actual retrieval of routing table������� arp -d [-i interface] -a� arp [-n] [-i interface] -a�������usage: arp [-n] [-i interface] hostname� arp -S hostname ether_addr [temp] [reject | blackhole] [pub [only]]������ arp -s hostname ether_addr [temp] [reject | blackhole] [pub [only]]������-i not applicable to this operation�����j#@�����#@�����#@�����#@�����#@�����#@�����#@�����#@�����#@�����#@�����#@�����#@�����#@�����#@�����b#@�����#@�����#@�����U#@�����#@�����H#@�����#@�����#@�����8#@�����#@�����#@�����#@�����#@�����,#@�����#@�����#@�����#@�����#@�����#@�����#@�����&@�����%@�����$@�����%@�����v$@�����$FreeBSD: src/lib/csu/amd64/crtn.S,v 1.6.30.1.4.1 2010/06/14 02:09:06 kensmith Exp $����$��l-@�������������6P����������������zR�x ��$������P@�����AC BK����������D���@�8����D�������\���0@�"��������������t���`@�1�����������������@�����A��$������@@�!���BBD D(FP4������p@�1���BHB B(A0C8J �����4�����@�.���BMB B(A0A8D�����,���<�� @�{���BEB A(A0Dp������l��`"@�Q����D ����4�����"@����BEB E(D0C8G����������'@�U����AD0�������$�����(@����BED D(DP�����������zR�x ��������� ���+@�%����H���������������� �������@@����� �������+@������������@������������@������������x@����� ������������� ������������������������������������6P������������P��������������������������� @������������` @������������������� ��������������o����@ @�����o�����������o���� @�����������������������������������������������������������������������������������������������������������������������������@5P���������������������j@�����z@�����@�����@�����@�����@�����@�����@�����@�����@����� @�����@�����*@�����:@�����J@�����Z@�����j@�����z@�����@�����@�����@�����@�����@�����@�����@�����@����� @�����@�����*@�����:@�����J@�����Z@�����j@�����z@�����@�����@�����@�����@�����@�����@�����@�����@����� @�����@�����*@�����:@������$FreeBSD: src/lib/csu/common/crtbrand.c,v 1.6.2.1.4.1 2010/06/14 02:09:06 kensmith Exp $�$FreeBSD: src/lib/csu/amd64/crt1.c,v 1.15.10.1.4.1 2010/06/14 02:09:06 kensmith Exp $�GCC: (GNU) 4.2.1 20070719 [FreeBSD]��GCC: (GNU) 4.2.1 20070719 [FreeBSD]��$FreeBSD: src/usr.sbin/arp/arp.c,v 1.71.2.5.2.1 2010/06/14 02:09:06 kensmith Exp $�GCC: (GNU) 4.2.1 20070719 [FreeBSD]��GCC: (GNU) 4.2.1 20070719 [FreeBSD]��.shstrtab�.interp�.note.ABI-tag�.hash�.dynsym�.dynstr�.gnu.version�.gnu.version_r�.rela.dyn�.rela.plt�.init�.text�.fini�.rodata�.eh_frame_hdr�.data�.eh_frame�.dynamic�.ctors�.dtors�.jcr�.got�.bss�.comment����������������������������������������������������������������� �������������@������������������������������������������������������@�����������������������������������������!�������������@��������������������������������������'��� ����������x@�����x������X��������������������������/�������������@����������������������������������������7���o������� @����� ������r����������������������������D���o�������@ @�����@ ������ ����������������������������S�������������` @�����` ����������������������������������]������������� @����� ������P��������� �����������������g�������������@@�����@������������������������������������b�������������T@�����T����������������������������������m�������������P@�����P�����������������������������������s�������������+@�����+������������������������������������y�������������+@�����+������������������������������������������������2@�����2�������������������������������������������������2P�����2�������������������������������������������������3P�����3������8������������������������������������������@5P�����@5����������������������������������������������6P�����6�������������������������������������������������6P�����@��H��P��X��`��h��p��x����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������0��8��@��H��P��X��`��h��p��x������������������������������������������� ��(��0��8��@��H��P��X��`��h��p��x������������������������������������������� ��(��0��8��@��H��P��X��`��h��p��x������������������������������������������� ��(��0��8��@��H��P��X��`��h��p��x������������������������������������������� ��(��0��8��@��H��P��X��`��h��p��x������������������������������������������� ��(��0��8��@��H��P��X������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ��(��0��8��@��H��P��X��`��h��p��x������������������������������������������� ��(��0��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is gettext.info, produced by makeinfo version 4.13 from gettext.texi. INFO-DIR-SECTION GNU Gettext Utilities START-INFO-DIR-ENTRY * gettext: (gettext). GNU gettext utilities. * autopoint: (gettext)autopoint Invocation. Copy gettext infrastructure. * envsubst: (gettext)envsubst Invocation. Expand environment variables. * gettextize: (gettext)gettextize Invocation. Prepare a package for gettext. * msgattrib: (gettext)msgattrib Invocation. Select part of a PO file. * msgcat: (gettext)msgcat Invocation. Combine several PO files. * msgcmp: (gettext)msgcmp Invocation. Compare a PO file and template. * msgcomm: (gettext)msgcomm Invocation. Match two PO files. * msgconv: (gettext)msgconv Invocation. Convert PO file to encoding. * msgen: (gettext)msgen Invocation. Create an English PO file. * msgexec: (gettext)msgexec Invocation. Process a PO file. * msgfilter: (gettext)msgfilter Invocation. Pipe a PO file through a filter. * msgfmt: (gettext)msgfmt Invocation. Make MO files out of PO files. * msggrep: (gettext)msggrep Invocation. Select part of a PO file. * msginit: (gettext)msginit Invocation. Create a fresh PO file. * msgmerge: (gettext)msgmerge Invocation. Update a PO file from template. * msgunfmt: (gettext)msgunfmt Invocation. Uncompile MO file into PO file. * msguniq: (gettext)msguniq Invocation. Unify duplicates for PO file. * ngettext: (gettext)ngettext Invocation. Translate a message with plural. * xgettext: (gettext)xgettext Invocation. Extract strings into a PO file. * ISO639: (gettext)Language Codes. ISO 639 language codes. * ISO3166: (gettext)Country Codes. ISO 3166 country codes. END-INFO-DIR-ENTRY This file provides documentation for GNU `gettext' utilities. It also serves as a reference for the free Translation Project. Copyright (C) 1995-1998, 2001-2007 Free Software Foundation, Inc. This manual is free documentation. It is dually licensed under the GNU FDL and the GNU GPL. This means that you can redistribute this manual under either of these two licenses, at your choice. This manual is covered by the GNU FDL. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (FDL), either version 1.2 of the License, or (at your option) any later version published by the Free Software Foundation (FSF); with no Invariant Sections, with no Front-Cover Text, and with no Back-Cover Texts. A copy of the license is included in *note GNU FDL::. This manual is covered by the GNU GPL. You can redistribute it and/or modify it under the terms of the GNU General Public License (GPL), either version 2 of the License, or (at your option) any later version published by the Free Software Foundation (FSF). A copy of the license is included in *note GNU GPL::.  File: gettext.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) GNU `gettext' utilities *********************** This manual documents the GNU gettext tools and the GNU libintl library, version 0.18.1. * Menu: * Introduction:: Introduction * Users:: The User's View * PO Files:: The Format of PO Files * Sources:: Preparing Program Sources * Template:: Making the PO Template File * Creating:: Creating a New PO File * Updating:: Updating Existing PO Files * Editing:: Editing PO Files * Manipulating:: Manipulating PO Files * Binaries:: Producing Binary MO Files * Programmers:: The Programmer's View * Translators:: The Translator's View * Maintainers:: The Maintainer's View * Installers:: The Installer's and Distributor's View * Programming Languages:: Other Programming Languages * Conclusion:: Concluding Remarks * Language Codes:: ISO 639 language codes * Country Codes:: ISO 3166 country codes * Licenses:: Licenses * Program Index:: Index of Programs * Option Index:: Index of Command-Line Options * Variable Index:: Index of Environment Variables * PO Mode Index:: Index of Emacs PO Mode Commands * Autoconf Macro Index:: Index of Autoconf Macros * Index:: General Index --- The Detailed Node Listing --- Introduction * Why:: The Purpose of GNU `gettext' * Concepts:: I18n, L10n, and Such * Aspects:: Aspects in Native Language Support * Files:: Files Conveying Translations * Overview:: Overview of GNU `gettext' The User's View * System Installation:: Questions During Operating System Installation * Setting the GUI Locale:: How to Specify the Locale Used by GUI Programs * Setting the POSIX Locale:: How to Specify the Locale According to POSIX * Installing Localizations:: How to Install Additional Translations Setting the POSIX Locale * Locale Names:: How a Locale Specification Looks Like * Locale Environment Variables:: Which Environment Variable Specfies What * The LANGUAGE variable:: How to Specify a Priority List of Languages Preparing Program Sources * Importing:: Importing the `gettext' declaration * Triggering:: Triggering `gettext' Operations * Preparing Strings:: Preparing Translatable Strings * Mark Keywords:: How Marks Appear in Sources * Marking:: Marking Translatable Strings * c-format Flag:: Telling something about the following string * Special cases:: Special Cases of Translatable Strings * Bug Report Address:: Letting Users Report Translation Bugs * Names:: Marking Proper Names for Translation * Libraries:: Preparing Library Sources Making the PO Template File * xgettext Invocation:: Invoking the `xgettext' Program Creating a New PO File * msginit Invocation:: Invoking the `msginit' Program * Header Entry:: Filling in the Header Entry Updating Existing PO Files * msgmerge Invocation:: Invoking the `msgmerge' Program Editing PO Files * KBabel:: KDE's PO File Editor * Gtranslator:: GNOME's PO File Editor * PO Mode:: Emacs's PO File Editor * Compendium:: Using Translation Compendia Emacs's PO File Editor * Installation:: Completing GNU `gettext' Installation * Main PO Commands:: Main Commands * Entry Positioning:: Entry Positioning * Normalizing:: Normalizing Strings in Entries * Translated Entries:: Translated Entries * Fuzzy Entries:: Fuzzy Entries * Untranslated Entries:: Untranslated Entries * Obsolete Entries:: Obsolete Entries * Modifying Translations:: Modifying Translations * Modifying Comments:: Modifying Comments * Subedit:: Mode for Editing Translations * C Sources Context:: C Sources Context * Auxiliary:: Consulting Auxiliary PO Files Using Translation Compendia * Creating Compendia:: Merging translations for later use * Using Compendia:: Using older translations if they fit Manipulating PO Files * msgcat Invocation:: Invoking the `msgcat' Program * msgconv Invocation:: Invoking the `msgconv' Program * msggrep Invocation:: Invoking the `msggrep' Program * msgfilter Invocation:: Invoking the `msgfilter' Program * msguniq Invocation:: Invoking the `msguniq' Program * msgcomm Invocation:: Invoking the `msgcomm' Program * msgcmp Invocation:: Invoking the `msgcmp' Program * msgattrib Invocation:: Invoking the `msgattrib' Program * msgen Invocation:: Invoking the `msgen' Program * msgexec Invocation:: Invoking the `msgexec' Program * Colorizing:: Highlighting parts of PO files * libgettextpo:: Writing your own programs that process PO files Highlighting parts of PO files * The --color option:: Triggering colorized output * The TERM variable:: The environment variable `TERM' * The --style option:: The `--style' option * Style rules:: Style rules for PO files * Customizing less:: Customizing `less' for viewing PO files Producing Binary MO Files * msgfmt Invocation:: Invoking the `msgfmt' Program * msgunfmt Invocation:: Invoking the `msgunfmt' Program * MO Files:: The Format of GNU MO Files The Programmer's View * catgets:: About `catgets' * gettext:: About `gettext' * Comparison:: Comparing the two interfaces * Using libintl.a:: Using libintl.a in own programs * gettext grok:: Being a `gettext' grok * Temp Programmers:: Temporary Notes for the Programmers Chapter About `catgets' * Interface to catgets:: The interface * Problems with catgets:: Problems with the `catgets' interface?! About `gettext' * Interface to gettext:: The interface * Ambiguities:: Solving ambiguities * Locating Catalogs:: Locating message catalog files * Charset conversion:: How to request conversion to Unicode * Contexts:: Solving ambiguities in GUI programs * Plural forms:: Additional functions for handling plurals * Optimized gettext:: Optimization of the *gettext functions Temporary Notes for the Programmers Chapter * Temp Implementations:: Temporary - Two Possible Implementations * Temp catgets:: Temporary - About `catgets' * Temp WSI:: Temporary - Why a single implementation * Temp Notes:: Temporary - Notes The Translator's View * Trans Intro 0:: Introduction 0 * Trans Intro 1:: Introduction 1 * Discussions:: Discussions * Organization:: Organization * Information Flow:: Information Flow * Translating plural forms:: How to fill in `msgstr[0]', `msgstr[1]' * Prioritizing messages:: How to find which messages to translate first Organization * Central Coordination:: Central Coordination * National Teams:: National Teams * Mailing Lists:: Mailing Lists National Teams * Sub-Cultures:: Sub-Cultures * Organizational Ideas:: Organizational Ideas The Maintainer's View * Flat and Non-Flat:: Flat or Non-Flat Directory Structures * Prerequisites:: Prerequisite Works * gettextize Invocation:: Invoking the `gettextize' Program * Adjusting Files:: Files You Must Create or Alter * autoconf macros:: Autoconf macros for use in `configure.ac' * CVS Issues:: Integrating with CVS * Release Management:: Creating a Distribution Tarball Files You Must Create or Alter * po/POTFILES.in:: `POTFILES.in' in `po/' * po/LINGUAS:: `LINGUAS' in `po/' * po/Makevars:: `Makevars' in `po/' * po/Rules-*:: Extending `Makefile' in `po/' * configure.ac:: `configure.ac' at top level * config.guess:: `config.guess', `config.sub' at top level * mkinstalldirs:: `mkinstalldirs' at top level * aclocal:: `aclocal.m4' at top level * acconfig:: `acconfig.h' at top level * config.h.in:: `config.h.in' at top level * Makefile:: `Makefile.in' at top level * src/Makefile:: `Makefile.in' in `src/' * lib/gettext.h:: `gettext.h' in `lib/' Autoconf macros for use in `configure.ac' * AM_GNU_GETTEXT:: AM_GNU_GETTEXT in `gettext.m4' * AM_GNU_GETTEXT_VERSION:: AM_GNU_GETTEXT_VERSION in `gettext.m4' * AM_GNU_GETTEXT_NEED:: AM_GNU_GETTEXT_NEED in `gettext.m4' * AM_GNU_GETTEXT_INTL_SUBDIR:: AM_GNU_GETTEXT_INTL_SUBDIR in `intldir.m4' * AM_PO_SUBDIRS:: AM_PO_SUBDIRS in `po.m4' * AM_ICONV:: AM_ICONV in `iconv.m4' Integrating with CVS * Distributed CVS:: Avoiding version mismatch in distributed development * Files under CVS:: Files to put under CVS version control * autopoint Invocation:: Invoking the `autopoint' Program Other Programming Languages * Language Implementors:: The Language Implementor's View * Programmers for other Languages:: The Programmer's View * Translators for other Languages:: The Translator's View * Maintainers for other Languages:: The Maintainer's View * List of Programming Languages:: Individual Programming Languages * List of Data Formats:: Internationalizable Data The Translator's View * c-format:: C Format Strings * objc-format:: Objective C Format Strings * sh-format:: Shell Format Strings * python-format:: Python Format Strings * lisp-format:: Lisp Format Strings * elisp-format:: Emacs Lisp Format Strings * librep-format:: librep Format Strings * scheme-format:: Scheme Format Strings * smalltalk-format:: Smalltalk Format Strings * java-format:: Java Format Strings * csharp-format:: C# Format Strings * awk-format:: awk Format Strings * object-pascal-format:: Object Pascal Format Strings * ycp-format:: YCP Format Strings * tcl-format:: Tcl Format Strings * perl-format:: Perl Format Strings * php-format:: PHP Format Strings * gcc-internal-format:: GCC internal Format Strings * gfc-internal-format:: GFC internal Format Strings * qt-format:: Qt Format Strings * qt-plural-format:: Qt Plural Format Strings * kde-format:: KDE Format Strings * boost-format:: Boost Format Strings Individual Programming Languages * C:: C, C++, Objective C * sh:: sh - Shell Script * bash:: bash - Bourne-Again Shell Script * Python:: Python * Common Lisp:: GNU clisp - Common Lisp * clisp C:: GNU clisp C sources * Emacs Lisp:: Emacs Lisp * librep:: librep * Scheme:: GNU guile - Scheme * Smalltalk:: GNU Smalltalk * Java:: Java * C#:: C# * gawk:: GNU awk * Pascal:: Pascal - Free Pascal Compiler * wxWidgets:: wxWidgets library * YCP:: YCP - YaST2 scripting language * Tcl:: Tcl - Tk's scripting language * Perl:: Perl * PHP:: PHP Hypertext Preprocessor * Pike:: Pike * GCC-source:: GNU Compiler Collection sources sh - Shell Script * Preparing Shell Scripts:: Preparing Shell Scripts for Internationalization * gettext.sh:: Contents of `gettext.sh' * gettext Invocation:: Invoking the `gettext' program * ngettext Invocation:: Invoking the `ngettext' program * envsubst Invocation:: Invoking the `envsubst' program * eval_gettext Invocation:: Invoking the `eval_gettext' function * eval_ngettext Invocation:: Invoking the `eval_ngettext' function Perl * General Problems:: General Problems Parsing Perl Code * Default Keywords:: Which Keywords Will xgettext Look For? * Special Keywords:: How to Extract Hash Keys * Quote-like Expressions:: What are Strings And Quote-like Expressions? * Interpolation I:: Invalid String Interpolation * Interpolation II:: Valid String Interpolation * Parentheses:: When To Use Parentheses * Long Lines:: How To Grok with Long Lines * Perl Pitfalls:: Bugs, Pitfalls, and Things That Do Not Work Internationalizable Data * POT:: POT - Portable Object Template * RST:: Resource String Table * Glade:: Glade - GNOME user interface description Concluding Remarks * History:: History of GNU `gettext' * References:: Related Readings Language Codes * Usual Language Codes:: Two-letter ISO 639 language codes * Rare Language Codes:: Three-letter ISO 639 language codes Licenses * GNU GPL:: GNU General Public License * GNU LGPL:: GNU Lesser General Public License * GNU FDL:: GNU Free Documentation License  File: gettext.info, Node: Introduction, Next: Users, Prev: Top, Up: Top 1 Introduction ************** This chapter explains the goals sought in the creation of GNU `gettext' and the free Translation Project. Then, it explains a few broad concepts around Native Language Support, and positions message translation with regard to other aspects of national and cultural variance, as they apply to programs. It also surveys those files used to convey the translations. It explains how the various tools interact in the initial generation of these files, and later, how the maintenance cycle should usually operate. In this manual, we use _he_ when speaking of the programmer or maintainer, _she_ when speaking of the translator, and _they_ when speaking of the installers or end users of the translated program. This is only a convenience for clarifying the documentation. It is _absolutely_ not meant to imply that some roles are more appropriate to males or females. Besides, as you might guess, GNU `gettext' is meant to be useful for people using computers, whatever their sex, race, religion or nationality! Please send suggestions and corrections to: Internet address: bug-gnu-gettext@gnu.org Please include the manual's edition number and update date in your messages. * Menu: * Why:: The Purpose of GNU `gettext' * Concepts:: I18n, L10n, and Such * Aspects:: Aspects in Native Language Support * Files:: Files Conveying Translations * Overview:: Overview of GNU `gettext'  File: gettext.info, Node: Why, Next: Concepts, Prev: Introduction, Up: Introduction 1.1 The Purpose of GNU `gettext' ================================ Usually, programs are written and documented in English, and use English at execution time to interact with users. This is true not only of GNU software, but also of a great deal of proprietary and free software. Using a common language is quite handy for communication between developers, maintainers and users from all countries. On the other hand, most people are less comfortable with English than with their own native language, and would prefer to use their mother tongue for day to day's work, as far as possible. Many would simply _love_ to see their computer screen showing a lot less of English, and far more of their own language. However, to many people, this dream might appear so far fetched that they may believe it is not even worth spending time thinking about it. They have no confidence at all that the dream might ever become true. Yet some have not lost hope, and have organized themselves. The Translation Project is a formalization of this hope into a workable structure, which has a good chance to get all of us nearer the achievement of a truly multi-lingual set of programs. GNU `gettext' is an important step for the Translation Project, as it is an asset on which we may build many other steps. This package offers to programmers, translators and even users, a well integrated set of tools and documentation. Specifically, the GNU `gettext' utilities are a set of tools that provides a framework within which other free packages may produce multi-lingual messages. These tools include * A set of conventions about how programs should be written to support message catalogs. * A directory and file naming organization for the message catalogs themselves. * A runtime library supporting the retrieval of translated messages. * A few stand-alone programs to massage in various ways the sets of translatable strings, or already translated strings. * A library supporting the parsing and creation of files containing translated messages. * A special mode for Emacs(1) which helps preparing these sets and bringing them up to date. GNU `gettext' is designed to minimize the impact of internationalization on program sources, keeping this impact as small and hardly noticeable as possible. Internationalization has better chances of succeeding if it is very light weighted, or at least, appear to be so, when looking at program sources. The Translation Project also uses the GNU `gettext' distribution as a vehicle for documenting its structure and methods. This goes beyond the strict technicalities of documenting the GNU `gettext' proper. By so doing, translators will find in a single place, as far as possible, all they need to know for properly doing their translating work. Also, this supplemental documentation might also help programmers, and even curious users, in understanding how GNU `gettext' is related to the remainder of the Translation Project, and consequently, have a glimpse at the _big picture_. ---------- Footnotes ---------- (1) In this manual, all mentions of Emacs refers to either GNU Emacs or to XEmacs, which people sometimes call FSF Emacs and Lucid Emacs, respectively.  File: gettext.info, Node: Concepts, Next: Aspects, Prev: Why, Up: Introduction 1.2 I18n, L10n, and Such ======================== Two long words appear all the time when we discuss support of native language in programs, and these words have a precise meaning, worth being explained here, once and for all in this document. The words are _internationalization_ and _localization_. Many people, tired of writing these long words over and over again, took the habit of writing "i18n" and "l10n" instead, quoting the first and last letter of each word, and replacing the run of intermediate letters by a number merely telling how many such letters there are. But in this manual, in the sake of clarity, we will patiently write the names in full, each time... By "internationalization", one refers to the operation by which a program, or a set of programs turned into a package, is made aware of and able to support multiple languages. This is a generalization process, by which the programs are untied from calling only English strings or other English specific habits, and connected to generic ways of doing the same, instead. Program developers may use various techniques to internationalize their programs. Some of these have been standardized. GNU `gettext' offers one of these standards. *Note Programmers::. By "localization", one means the operation by which, in a set of programs already internationalized, one gives the program all needed information so that it can adapt itself to handle its input and output in a fashion which is correct for some native language and cultural habits. This is a particularisation process, by which generic methods already implemented in an internationalized program are used in specific ways. The programming environment puts several functions to the programmers disposal which allow this runtime configuration. The formal description of specific set of cultural habits for some country, together with all associated translations targeted to the same native language, is called the "locale" for this language or country. Users achieve localization of programs by setting proper values to special environment variables, prior to executing those programs, identifying which locale should be used. In fact, locale message support is only one component of the cultural data that makes up a particular locale. There are a whole host of routines and functions provided to aid programmers in developing internationalized software and which allow them to access the data stored in a particular locale. When someone presently refers to a particular locale, they are obviously referring to the data stored within that particular locale. Similarly, if a programmer is referring to "accessing the locale routines", they are referring to the complete suite of routines that access all of the locale's information. One uses the expression "Native Language Support", or merely NLS, for speaking of the overall activity or feature encompassing both internationalization and localization, allowing for multi-lingual interactions in a program. In a nutshell, one could say that internationalization is the operation by which further localizations are made possible. Also, very roughly said, when it comes to multi-lingual messages, internationalization is usually taken care of by programmers, and localization is usually taken care of by translators.  File: gettext.info, Node: Aspects, Next: Files, Prev: Concepts, Up: Introduction 1.3 Aspects in Native Language Support ====================================== For a totally multi-lingual distribution, there are many things to translate beyond output messages. * As of today, GNU `gettext' offers a complete toolset for translating messages output by C programs. Perl scripts and shell scripts will also need to be translated. Even if there are today some hooks by which this can be done, these hooks are not integrated as well as they should be. * Some programs, like `autoconf' or `bison', are able to produce other programs (or scripts). Even if the generating programs themselves are internationalized, the generated programs they produce may need internationalization on their own, and this indirect internationalization could be automated right from the generating program. In fact, quite usually, generating and generated programs could be internationalized independently, as the effort needed is fairly orthogonal. * A few programs include textual tables which might need translation themselves, independently of the strings contained in the program itself. For example, RFC 1345 gives an English description for each character which the `recode' program is able to reconstruct at execution. Since these descriptions are extracted from the RFC by mechanical means, translating them properly would require a prior translation of the RFC itself. * Almost all programs accept options, which are often worded out so to be descriptive for the English readers; one might want to consider offering translated versions for program options as well. * Many programs read, interpret, compile, or are somewhat driven by input files which are texts containing keywords, identifiers, or replies which are inherently translatable. For example, one may want `gcc' to allow diacriticized characters in identifiers or use translated keywords; `rm -i' might accept something else than `y' or `n' for replies, etc. Even if the program will eventually make most of its output in the foreign languages, one has to decide whether the input syntax, option values, etc., are to be localized or not. * The manual accompanying a package, as well as all documentation files in the distribution, could surely be translated, too. Translating a manual, with the intent of later keeping up with updates, is a major undertaking in itself, generally. As we already stressed, translation is only one aspect of locales. Other internationalization aspects are system services and are handled in GNU `libc'. There are many attributes that are needed to define a country's cultural conventions. These attributes include beside the country's native language, the formatting of the date and time, the representation of numbers, the symbols for currency, etc. These local "rules" are termed the country's locale. The locale represents the knowledge needed to support the country's native attributes. There are a few major areas which may vary between countries and hence, define what a locale must describe. The following list helps putting multi-lingual messages into the proper context of other tasks related to locales. See the GNU `libc' manual for details. _Characters and Codesets_ The codeset most commonly used through out the USA and most English speaking parts of the world is the ASCII codeset. However, there are many characters needed by various locales that are not found within this codeset. The 8-bit ISO 8859-1 code set has most of the special characters needed to handle the major European languages. However, in many cases, choosing ISO 8859-1 is nevertheless not adequate: it doesn't even handle the major European currency. Hence each locale will need to specify which codeset they need to use and will need to have the appropriate character handling routines to cope with the codeset. _Currency_ The symbols used vary from country to country as does the position used by the symbol. Software needs to be able to transparently display currency figures in the native mode for each locale. _Dates_ The format of date varies between locales. For example, Christmas day in 1994 is written as 12/25/94 in the USA and as 25/12/94 in Australia. Other countries might use ISO 8601 dates, etc. Time of the day may be noted as HH:MM, HH.MM, or otherwise. Some locales require time to be specified in 24-hour mode rather than as AM or PM. Further, the nature and yearly extent of the Daylight Saving correction vary widely between countries. _Numbers_ Numbers can be represented differently in different locales. For example, the following numbers are all written correctly for their respective locales: 12,345.67 English 12.345,67 German 12345,67 French 1,2345.67 Asia Some programs could go further and use different unit systems, like English units or Metric units, or even take into account variants about how numbers are spelled in full. _Messages_ The most obvious area is the language support within a locale. This is where GNU `gettext' provides the means for developers and users to easily change the language that the software uses to communicate to the user. These areas of cultural conventions are called _locale categories_. It is an unfortunate term; _locale aspects_ or _locale feature categories_ would be a better term, because each "locale category" describes an area or task that requires localization. The concrete data that describes the cultural conventions for such an area and for a particular culture is also called a _locale category_. In this sense, a locale is composed of several locale categories: the locale category describing the codeset, the locale category describing the formatting of numbers, the locale category containing the translated messages, and so on. Components of locale outside of message handling are standardized in the ISO C standard and the POSIX:2001 standard (also known as the SUSV3 specification). GNU `libc' fully implements this, and most other modern systems provide a more or less reasonable support for at least some of the missing components.  File: gettext.info, Node: Files, Next: Overview, Prev: Aspects, Up: Introduction 1.4 Files Conveying Translations ================================ The letters PO in `.po' files means Portable Object, to distinguish it from `.mo' files, where MO stands for Machine Object. This paradigm, as well as the PO file format, is inspired by the NLS standard developed by Uniforum, and first implemented by Sun in their Solaris system. PO files are meant to be read and edited by humans, and associate each original, translatable string of a given package with its translation in a particular target language. A single PO file is dedicated to a single target language. If a package supports many languages, there is one such PO file per language supported, and each package has its own set of PO files. These PO files are best created by the `xgettext' program, and later updated or refreshed through the `msgmerge' program. Program `xgettext' extracts all marked messages from a set of C files and initializes a PO file with empty translations. Program `msgmerge' takes care of adjusting PO files between releases of the corresponding sources, commenting obsolete entries, initializing new ones, and updating all source line references. Files ending with `.pot' are kind of base translation files found in distributions, in PO file format. MO files are meant to be read by programs, and are binary in nature. A few systems already offer tools for creating and handling MO files as part of the Native Language Support coming with the system, but the format of these MO files is often different from system to system, and non-portable. The tools already provided with these systems don't support all the features of GNU `gettext'. Therefore GNU `gettext' uses its own format for MO files. Files ending with `.gmo' are really MO files, when it is known that these files use the GNU format.  File: gettext.info, Node: Overview, Prev: Files, Up: Introduction 1.5 Overview of GNU `gettext' ============================= The following diagram summarizes the relation between the files handled by GNU `gettext' and the tools acting on these files. It is followed by somewhat detailed explanations, which you should read while keeping an eye on the diagram. Having a clear understanding of these interrelations will surely help programmers, translators and maintainers. Original C Sources ---> Preparation ---> Marked C Sources ---. | .---------<--- GNU gettext Library | .--- make <---+ | | `---------<--------------------+---------------' | | | .-----<--- PACKAGE.pot <--- xgettext <---' .---<--- PO Compendium | | | ^ | | `---. | | `---. +---> PO editor ---. | +----> msgmerge ------> LANG.po ---->--------' | | .---' | | | | | `-------------<---------------. | | +--- New LANG.po <--------------------' | .--- LANG.gmo <--- msgfmt <---' | | | `---> install ---> /.../LANG/PACKAGE.mo ---. | +---> "Hello world!" `-------> install ---> /.../bin/PROGRAM -------' As a programmer, the first step to bringing GNU `gettext' into your package is identifying, right in the C sources, those strings which are meant to be translatable, and those which are untranslatable. This tedious job can be done a little more comfortably using emacs PO mode, but you can use any means familiar to you for modifying your C sources. Beside this some other simple, standard changes are needed to properly initialize the translation library. *Note Sources::, for more information about all this. For newly written software the strings of course can and should be marked while writing it. The `gettext' approach makes this very easy. Simply put the following lines at the beginning of each file or in a central header file: #define _(String) (String) #define N_(String) String #define textdomain(Domain) #define bindtextdomain(Package, Directory) Doing this allows you to prepare the sources for internationalization. Later when you feel ready for the step to use the `gettext' library simply replace these definitions by the following: #include <libintl.h> #define _(String) gettext (String) #define gettext_noop(String) String #define N_(String) gettext_noop (String) and link against `libintl.a' or `libintl.so'. Note that on GNU systems, you don't need to link with `libintl' because the `gettext' library functions are already contained in GNU libc. That is all you have to change. Once the C sources have been modified, the `xgettext' program is used to find and extract all translatable strings, and create a PO template file out of all these. This `PACKAGE.pot' file contains all original program strings. It has sets of pointers to exactly where in C sources each string is used. All translations are set to empty. The letter `t' in `.pot' marks this as a Template PO file, not yet oriented towards any particular language. *Note xgettext Invocation::, for more details about how one calls the `xgettext' program. If you are _really_ lazy, you might be interested at working a lot more right away, and preparing the whole distribution setup (*note Maintainers::). By doing so, you spare yourself typing the `xgettext' command, as `make' should now generate the proper things automatically for you! The first time through, there is no `LANG.po' yet, so the `msgmerge' step may be skipped and replaced by a mere copy of `PACKAGE.pot' to `LANG.po', where LANG represents the target language. See *note Creating:: for details. Then comes the initial translation of messages. Translation in itself is a whole matter, still exclusively meant for humans, and whose complexity far overwhelms the level of this manual. Nevertheless, a few hints are given in some other chapter of this manual (*note Translators::). You will also find there indications about how to contact translating teams, or becoming part of them, for sharing your translating concerns with others who target the same native language. While adding the translated messages into the `LANG.po' PO file, if you are not using one of the dedicated PO file editors (*note Editing::), you are on your own for ensuring that your efforts fully respect the PO file format, and quoting conventions (*note PO Files::). This is surely not an impossible task, as this is the way many people have handled PO files around 1995. On the other hand, by using a PO file editor, most details of PO file format are taken care of for you, but you have to acquire some familiarity with PO file editor itself. If some common translations have already been saved into a compendium PO file, translators may use PO mode for initializing untranslated entries from the compendium, and also save selected translations into the compendium, updating it (*note Compendium::). Compendium files are meant to be exchanged between members of a given translation team. Programs, or packages of programs, are dynamic in nature: users write bug reports and suggestion for improvements, maintainers react by modifying programs in various ways. The fact that a package has already been internationalized should not make maintainers shy of adding new strings, or modifying strings already translated. They just do their job the best they can. For the Translation Project to work smoothly, it is important that maintainers do not carry translation concerns on their already loaded shoulders, and that translators be kept as free as possible of programming concerns. The only concern maintainers should have is carefully marking new strings as translatable, when they should be, and do not otherwise worry about them being translated, as this will come in proper time. Consequently, when programs and their strings are adjusted in various ways by maintainers, and for matters usually unrelated to translation, `xgettext' would construct `PACKAGE.pot' files which are evolving over time, so the translations carried by `LANG.po' are slowly fading out of date. It is important for translators (and even maintainers) to understand that package translation is a continuous process in the lifetime of a package, and not something which is done once and for all at the start. After an initial burst of translation activity for a given package, interventions are needed once in a while, because here and there, translated entries become obsolete, and new untranslated entries appear, needing translation. The `msgmerge' program has the purpose of refreshing an already existing `LANG.po' file, by comparing it with a newer `PACKAGE.pot' template file, extracted by `xgettext' out of recent C sources. The refreshing operation adjusts all references to C source locations for strings, since these strings move as programs are modified. Also, `msgmerge' comments out as obsolete, in `LANG.po', those already translated entries which are no longer used in the program sources (*note Obsolete Entries::). It finally discovers new strings and inserts them in the resulting PO file as untranslated entries (*note Untranslated Entries::). *Note msgmerge Invocation::, for more information about what `msgmerge' really does. Whatever route or means taken, the goal is to obtain an updated `LANG.po' file offering translations for all strings. The temporal mobility, or fluidity of PO files, is an integral part of the translation game, and should be well understood, and accepted. People resisting it will have a hard time participating in the Translation Project, or will give a hard time to other participants! In particular, maintainers should relax and include all available official PO files in their distributions, even if these have not recently been updated, without exerting pressure on the translator teams to get the job done. The pressure should rather come from the community of users speaking a particular language, and maintainers should consider themselves fairly relieved of any concern about the adequacy of translation files. On the other hand, translators should reasonably try updating the PO files they are responsible for, while the package is undergoing pretest, prior to an official distribution. Once the PO file is complete and dependable, the `msgfmt' program is used for turning the PO file into a machine-oriented format, which may yield efficient retrieval of translations by the programs of the package, whenever needed at runtime (*note MO Files::). *Note msgfmt Invocation::, for more information about all modes of execution for the `msgfmt' program. Finally, the modified and marked C sources are compiled and linked with the GNU `gettext' library, usually through the operation of `make', given a suitable `Makefile' exists for the project, and the resulting executable is installed somewhere users will find it. The MO files themselves should also be properly installed. Given the appropriate environment variables are set (*note Setting the POSIX Locale::), the program should localize itself automatically, whenever it executes. The remainder of this manual has the purpose of explaining in depth the various steps outlined above.  File: gettext.info, Node: Users, Next: PO Files, Prev: Introduction, Up: Top 2 The User's View ***************** Nowadays, when users log into a computer, they usually find that all their programs show messages in their native language - at least for users of languages with an active free software community, like French or German; to a lesser extent for languages with a smaller participation in free software and the GNU project, like Hindi and Filipino. How does this work? How can the user influence the language that is used by the programs? This chapter will answer it. * Menu: * System Installation:: Questions During Operating System Installation * Setting the GUI Locale:: How to Specify the Locale Used by GUI Programs * Setting the POSIX Locale:: How to Specify the Locale According to POSIX * Installing Localizations:: How to Install Additional Translations  File: gettext.info, Node: System Installation, Next: Setting the GUI Locale, Prev: Users, Up: Users 2.1 Operating System Installation ================================= The default language is often already specified during operating system installation. When the operating system is installed, the installer typically asks for the language used for the installation process and, separately, for the language to use in the installed system. Some OS installers only ask for the language once. This determines the system-wide default language for all users. But the installers often give the possibility to install extra localizations for additional languages. For example, the localizations of KDE (the K Desktop Environment) and OpenOffice.org are often bundled separately, as one installable package per language. At this point it is good to consider the intended use of the machine: If it is a machine designated for personal use, additional localizations are probably not necessary. If, however, the machine is in use in an organization or company that has international relationships, one can consider the needs of guest users. If you have a guest from abroad, for a week, what could be his preferred locales? It may be worth installing these additional localizations ahead of time, since they cost only a bit of disk space at this point. The system-wide default language is the locale configuration that is used when a new user account is created. But the user can have his own locale configuration that is different from the one of the other users of the same machine. He can specify it, typically after the first login, as described in the next section.  File: gettext.info, Node: Setting the GUI Locale, Next: Setting the POSIX Locale, Prev: System Installation, Up: Users 2.2 Setting the Locale Used by GUI Programs =========================================== The immediately available programs in a user's desktop come from a group of programs called a "desktop environment"; it usually includes the window manager, a web browser, a text editor, and more. The most common free desktop environments are KDE, GNOME, and Xfce. The locale used by GUI programs of the desktop environment can be specified in a configuration screen called "control center", "language settings" or "country settings". Individual GUI programs that are not part of the desktop environment can have their locale specified either in a settings panel, or through environment variables. For some programs, it is possible to specify the locale through environment variables, possibly even to a different locale than the desktop's locale. This means, instead of starting a program through a menu or from the file system, you can start it from the command-line, after having set some environment variables. The environment variables can be those specified in the next section (*note Setting the POSIX Locale::); for some versions of KDE, however, the locale is specified through a variable `KDE_LANG', rather than `LANG' or `LC_ALL'.  File: gettext.info, Node: Setting the POSIX Locale, Next: Installing Localizations, Prev: Setting the GUI Locale, Up: Users 2.3 Setting the Locale through Environment Variables ==================================================== As a user, if your language has been installed for this package, in the simplest case, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. * Menu: * Locale Names:: How a Locale Specification Looks Like * Locale Environment Variables:: Which Environment Variable Specfies What * The LANGUAGE variable:: How to Specify a Priority List of Languages  File: gettext.info, Node: Locale Names, Next: Locale Environment Variables, Prev: Setting the POSIX Locale, Up: Setting the POSIX Locale 2.3.1 Locale Names ------------------ A locale name usually has the form `LL_CC'. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, for German in Germany, LL is `de', and CC is `DE'. You find a list of the language codes in appendix *note Language Codes:: and a list of the country codes in appendix *note Country Codes::. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. Many locale names have an extended syntax `LL_CC.ENCODING' that also specifies the character encoding. These are in use because between 2000 and 2005, most users have switched to locales in UTF-8 encoding. For example, the German locale on glibc systems is nowadays `de_DE.UTF-8'. The older name `de_DE' still refers to the German locale as of 2000 that stores characters in ISO-8859-1 encoding - a text encoding that cannot even accomodate the Euro currency sign. Some locale names use `LL_CC.@VARIANT' instead of `LL_CC'. The `@VARIANT' can denote any kind of characteristics that is not already implied by the language LL and the country CC. It can denote a particular monetary unit. For example, on glibc systems, `de_DE@euro' denotes the locale that uses the Euro currency, in contrast to the older locale `de_DE' which implies the use of the currency before 2002. It can also denote a dialect of the language, or the script used to write text (for example, `sr_RS@latin' uses the Latin script, whereas `sr_RS' uses the Cyrillic script to write Serbian), or the orthography rules, or similar. On other systems, some variations of this scheme are used, such as `LL'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. There is also a special locale, called `C'. When it is used, it disables all localization: in this locale, all programs standardized by POSIX use English messages and an unspecified character encoding (often US-ASCII, but sometimes also ISO-8859-1 or UTF-8, depending on the operating system).  File: gettext.info, Node: Locale Environment Variables, Next: The LANGUAGE variable, Prev: Locale Names, Up: Setting the POSIX Locale 2.3.2 Locale Environment Variables ---------------------------------- A locale is composed of several _locale categories_, see *note Aspects::. When a program looks up locale dependent values, it does this according to the following environment variables, in priority order: 1. `LANGUAGE' 2. `LC_ALL' 3. `LC_xxx', according to selected locale category: `LC_CTYPE', `LC_NUMERIC', `LC_TIME', `LC_COLLATE', `LC_MONETARY', `LC_MESSAGES', ... 4. `LANG' Variables whose value is set but is empty are ignored in this lookup. `LANG' is the normal environment variable for specifying a locale. As a user, you normally set this variable (unless some of the other variables have already been set by the system, in `/etc/profile' or similar initialization files). `LC_CTYPE', `LC_NUMERIC', `LC_TIME', `LC_COLLATE', `LC_MONETARY', `LC_MESSAGES', and so on, are the environment variables meant to override `LANG' and affecting a single locale category only. For example, assume you are a Swedish user in Spain, and you want your programs to handle numbers and dates according to Spanish conventions, and only the messages should be in Swedish. Then you could create a locale named `sv_ES' or `sv_ES.UTF-8' by use of the `localedef' program. But it is simpler, and achieves the same effect, to set the `LANG' variable to `es_ES.UTF-8' and the `LC_MESSAGES' variable to `sv_SE.UTF-8'; these two locales come already preinstalled with the operating system. `LC_ALL' is an environment variable that overrides all of these. It is typically used in scripts that run particular programs. For example, `configure' scripts generated by GNU autoconf use `LC_ALL' to make sure that the configuration tests don't operate in locale dependent ways. Some systems, unfortunately, set `LC_ALL' in `/etc/profile' or in similar initialization files. As a user, you therefore have to unset this variable if you want to set `LANG' and optionally some of the other `LC_xxx' variables. The `LANGUAGE' variable is described in the next subsection.  File: gettext.info, Node: The LANGUAGE variable, Prev: Locale Environment Variables, Up: Setting the POSIX Locale 2.3.3 Specifying a Priority List of Languages --------------------------------------------- Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LC_ALL' and `LANG' for the purpose of message handling, but you still need to have `LANG' (or `LC_ALL') set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it is recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the other environment variables, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. Note: The variable `LANGUAGE' is ignored if the locale is set to `C'. In other words, you have to first enable localization, by setting `LANG' (or `LC_ALL') to a value other than `C', before you can use a language priority list through the `LANGUAGE' variable.  File: gettext.info, Node: Installing Localizations, Prev: Setting the POSIX Locale, Up: Users 2.4 Installing Translations for Particular Programs =================================================== Languages are not equally well supported in all packages using GNU `gettext', and more translations are added over time. Usually, you use the translations that are shipped with the operating system or with particular packages that you install afterwards. But you can also install newer localizations directly. For doing this, you will need an understanding where each localization file is stored on the file system. For programs that participate in the Translation Project, you can start looking for translations here: `http://translationproject.org/team/index.html'. A snapshot of this information is also found in the `ABOUT-NLS' file that is shipped with GNU gettext. For programs that are part of the KDE project, the starting point is: `http://i18n.kde.org/'. For programs that are part of the GNOME project, the starting point is: `http://www.gnome.org/i18n/'. For other programs, you may check whether the program's source code package contains some `LL.po' files; often they are kept together in a directory called `po/'. Each `LL.po' file contains the message translations for the language whose abbreviation of LL.  File: gettext.info, Node: PO Files, Next: Sources, Prev: Users, Up: Top 3 The Format of PO Files ************************ The GNU `gettext' toolset helps programmers and translators at producing, updating and using translation files, mainly those PO files which are textual, editable files. This chapter explains the format of PO files. A PO file is made up of many entries, each entry holding the relation between an original untranslated string and its corresponding translation. All entries in a given PO file usually pertain to a single project, and all translations are expressed in a single target language. One PO file "entry" has the following schematic structure: WHITE-SPACE # TRANSLATOR-COMMENTS #. EXTRACTED-COMMENTS #: REFERENCE... #, FLAG... #| msgid PREVIOUS-UNTRANSLATED-STRING msgid UNTRANSLATED-STRING msgstr TRANSLATED-STRING The general structure of a PO file should be well understood by the translator. When using PO mode, very little has to be known about the format details, as PO mode takes care of them for her. A simple entry can look like this: #: lib/error.c:116 msgid "Unknown system error" msgstr "Error desconegut del sistema" Entries begin with some optional white space. Usually, when generated through GNU `gettext' tools, there is exactly one blank line between entries. Then comments follow, on lines all starting with the character `#'. There are two kinds of comments: those which have some white space immediately following the `#' - the TRANSLATOR COMMENTS -, which comments are created and maintained exclusively by the translator, and those which have some non-white character just after the `#' - the AUTOMATIC COMMENTS -, which comments are created and maintained automatically by GNU `gettext' tools. Comment lines starting with `#.' contain comments given by the programmer, directed at the translator; these comments are called EXTRACTED COMMENTS because the `xgettext' program extracts them from the program's source code. Comment lines starting with `#:' contain references to the program's source code. Comment lines starting with `#,' contain flags; more about these below. Comment lines starting with `#|' contain the previous untranslated string for which the translator gave a translation. All comments, of either kind, are optional. After white space and comments, entries show two strings, namely first the untranslated string as it appears in the original program sources, and then, the translation of this string. The original string is introduced by the keyword `msgid', and the translation, by `msgstr'. The two strings, untranslated and translated, are quoted in various ways in the PO file, using `"' delimiters and `\' escapes, but the translator does not really have to pay attention to the precise quoting format, as PO mode fully takes care of quoting for her. The `msgid' strings, as well as automatic comments, are produced and managed by other GNU `gettext' tools, and PO mode does not provide means for the translator to alter these. The most she can do is merely deleting them, and only by deleting the whole entry. On the other hand, the `msgstr' string, as well as translator comments, are really meant for the translator, and PO mode gives her the full control she needs. The comment lines beginning with `#,' are special because they are not completely ignored by the programs as comments generally are. The comma separated list of FLAGs is used by the `msgfmt' program to give the user some better diagnostic messages. Currently there are two forms of flags defined: `fuzzy' This flag can be generated by the `msgmerge' program or it can be inserted by the translator herself. It shows that the `msgstr' string might not be a correct translation (anymore). Only the translator can judge if the translation requires further modification, or is acceptable as is. Once satisfied with the translation, she then removes this `fuzzy' attribute. The `msgmerge' program inserts this when it combined the `msgid' and `msgstr' entries after fuzzy search only. *Note Fuzzy Entries::. `c-format' `no-c-format' These flags should not be added by a human. Instead only the `xgettext' program adds them. In an automated PO file processing system as proposed here, the user's changes would be thrown away again as soon as the `xgettext' program generates a new template file. The `c-format' flag indicates that the untranslated string and the translation are supposed to be C format strings. The `no-c-format' flag indicates that they are not C format strings, even though the untranslated string happens to look like a C format string (with `%' directives). When the `c-format' flag is given for a string the `msgfmt' program does some more tests to check the validity of the translation. *Note msgfmt Invocation::, *note c-format Flag:: and *note c-format::. `objc-format' `no-objc-format' Likewise for Objective C, see *note objc-format::. `sh-format' `no-sh-format' Likewise for Shell, see *note sh-format::. `python-format' `no-python-format' Likewise for Python, see *note python-format::. `lisp-format' `no-lisp-format' Likewise for Lisp, see *note lisp-format::. `elisp-format' `no-elisp-format' Likewise for Emacs Lisp, see *note elisp-format::. `librep-format' `no-librep-format' Likewise for librep, see *note librep-format::. `scheme-format' `no-scheme-format' Likewise for Scheme, see *note scheme-format::. `smalltalk-format' `no-smalltalk-format' Likewise for Smalltalk, see *note smalltalk-format::. `java-format' `no-java-format' Likewise for Java, see *note java-format::. `csharp-format' `no-csharp-format' Likewise for C#, see *note csharp-format::. `awk-format' `no-awk-format' Likewise for awk, see *note awk-format::. `object-pascal-format' `no-object-pascal-format' Likewise for Object Pascal, see *note object-pascal-format::. `ycp-format' `no-ycp-format' Likewise for YCP, see *note ycp-format::. `tcl-format' `no-tcl-format' Likewise for Tcl, see *note tcl-format::. `perl-format' `no-perl-format' Likewise for Perl, see *note perl-format::. `perl-brace-format' `no-perl-brace-format' Likewise for Perl brace, see *note perl-format::. `php-format' `no-php-format' Likewise for PHP, see *note php-format::. `gcc-internal-format' `no-gcc-internal-format' Likewise for the GCC sources, see *note gcc-internal-format::. `gfc-internal-format' `no-gfc-internal-format' Likewise for the GNU Fortran Compiler sources, see *note gfc-internal-format::. `qt-format' `no-qt-format' Likewise for Qt, see *note qt-format::. `qt-plural-format' `no-qt-plural-format' Likewise for Qt plural forms, see *note qt-plural-format::. `kde-format' `no-kde-format' Likewise for KDE, see *note kde-format::. `boost-format' `no-boost-format' Likewise for Boost, see *note boost-format::. It is also possible to have entries with a context specifier. They look like this: WHITE-SPACE # TRANSLATOR-COMMENTS #. EXTRACTED-COMMENTS #: REFERENCE... #, FLAG... #| msgctxt PREVIOUS-CONTEXT #| msgid PREVIOUS-UNTRANSLATED-STRING msgctxt CONTEXT msgid UNTRANSLATED-STRING msgstr TRANSLATED-STRING The context serves to disambiguate messages with the same UNTRANSLATED-STRING. It is possible to have several entries with the same UNTRANSLATED-STRING in a PO file, provided that they each have a different CONTEXT. Note that an empty CONTEXT string and an absent `msgctxt' line do not mean the same thing. A different kind of entries is used for translations which involve plural forms. WHITE-SPACE # TRANSLATOR-COMMENTS #. EXTRACTED-COMMENTS #: REFERENCE... #, FLAG... #| msgid PREVIOUS-UNTRANSLATED-STRING-SINGULAR #| msgid_plural PREVIOUS-UNTRANSLATED-STRING-PLURAL msgid UNTRANSLATED-STRING-SINGULAR msgid_plural UNTRANSLATED-STRING-PLURAL msgstr[0] TRANSLATED-STRING-CASE-0 ... msgstr[N] TRANSLATED-STRING-CASE-N Such an entry can look like this: #: src/msgcmp.c:338 src/po-lex.c:699 #, c-format msgid "found %d fatal error" msgid_plural "found %d fatal errors" msgstr[0] "s'ha trobat %d error fatal" msgstr[1] "s'han trobat %d errors fatals" Here also, a `msgctxt' context can be specified before `msgid', like above. Here, additional kinds of flags can be used: `range:' This flag is followed by a range of non-negative numbers, using the syntax `range: MINIMUM-VALUE..MAXIMUM-VALUE'. It designates the possible values that the numeric parameter of the message can take. In some languages, translators may produce slightly better translations if they know that the value can only take on values between 0 and 10, for example. The PREVIOUS-UNTRANSLATED-STRING is optionally inserted by the `msgmerge' program, at the same time when it marks a message fuzzy. It helps the translator to see which changes were done by the developers on the UNTRANSLATED-STRING. It happens that some lines, usually whitespace or comments, follow the very last entry of a PO file. Such lines are not part of any entry, and will be dropped when the PO file is processed by the tools, or may disturb some PO file editors. The remainder of this section may be safely skipped by those using a PO file editor, yet it may be interesting for everybody to have a better idea of the precise format of a PO file. On the other hand, those wishing to modify PO files by hand should carefully continue reading on. Each of UNTRANSLATED-STRING and TRANSLATED-STRING respects the C syntax for a character string, including the surrounding quotes and embedded backslashed escape sequences. When the time comes to write multi-line strings, one should not use escaped newlines. Instead, a closing quote should follow the last character on the line to be continued, and an opening quote should resume the string at the beginning of the following PO file line. For example: msgid "" "Here is an example of how one might continue a very long string\n" "for the common case the string represents multi-line output.\n" In this example, the empty string is used on the first line, to allow better alignment of the `H' from the word `Here' over the `f' from the word `for'. In this example, the `msgid' keyword is followed by three strings, which are meant to be concatenated. Concatenating the empty string does not change the resulting overall string, but it is a way for us to comply with the necessity of `msgid' to be followed by a string on the same line, while keeping the multi-line presentation left-justified, as we find this to be a cleaner disposition. The empty string could have been omitted, but only if the string starting with `Here' was promoted on the first line, right after `msgid'.(1) It was not really necessary either to switch between the two last quoted strings immediately after the newline `\n', the switch could have occurred after _any_ other character, we just did it this way because it is neater. One should carefully distinguish between end of lines marked as `\n' _inside_ quotes, which are part of the represented string, and end of lines in the PO file itself, outside string quotes, which have no incidence on the represented string. Outside strings, white lines and comments may be used freely. Comments start at the beginning of a line with `#' and extend until the end of the PO file line. Comments written by translators should have the initial `#' immediately followed by some white space. If the `#' is not immediately followed by white space, this comment is most likely generated and managed by specialized GNU tools, and might disappear or be replaced unexpectedly when the PO file is given to `msgmerge'. ---------- Footnotes ---------- (1) This limitation is not imposed by GNU `gettext', but is for compatibility with the `msgfmt' implementation on Solaris.  File: gettext.info, Node: Sources, Next: Template, Prev: PO Files, Up: Top 4 Preparing Program Sources *************************** For the programmer, changes to the C source code fall into three categories. First, you have to make the localization functions known to all modules needing message translation. Second, you should properly trigger the operation of GNU `gettext' when the program initializes, usually from the `main' function. Last, you should identify, adjust and mark all constant strings in your program needing translation. * Menu: * Importing:: Importing the `gettext' declaration * Triggering:: Triggering `gettext' Operations * Preparing Strings:: Preparing Translatable Strings * Mark Keywords:: How Marks Appear in Sources * Marking:: Marking Translatable Strings * c-format Flag:: Telling something about the following string * Special cases:: Special Cases of Translatable Strings * Bug Report Address:: Letting Users Report Translation Bugs * Names:: Marking Proper Names for Translation * Libraries:: Preparing Library Sources  File: gettext.info, Node: Importing, Next: Triggering, Prev: Sources, Up: Sources 4.1 Importing the `gettext' declaration ======================================= Presuming that your set of programs, or package, has been adjusted so all needed GNU `gettext' files are available, and your `Makefile' files are adjusted (*note Maintainers::), each C module having translated C strings should contain the line: #include <libintl.h> Similarly, each C module containing `printf()'/`fprintf()'/... calls with a format string that could be a translated C string (even if the C string comes from a different C module) should contain the line: #include <libintl.h>  File: gettext.info, Node: Triggering, Next: Preparing Strings, Prev: Importing, Up: Sources 4.2 Triggering `gettext' Operations =================================== The initialization of locale data should be done with more or less the same code in every program, as demonstrated below: int main (int argc, char *argv[]) { ... setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); ... } PACKAGE and LOCALEDIR should be provided either by `config.h' or by the Makefile. For now consult the `gettext' or `hello' sources for more information. The use of `LC_ALL' might not be appropriate for you. `LC_ALL' includes all locale categories and especially `LC_CTYPE'. This latter category is responsible for determining character classes with the `isalnum' etc. functions from `ctype.h' which could especially for programs, which process some kind of input language, be wrong. For example this would mean that a source code using the ç (c-cedilla character) is runnable in France but not in the U.S. Some systems also have problems with parsing numbers using the `scanf' functions if an other but the `LC_ALL' locale category is used. The standards say that additional formats but the one known in the `"C"' locale might be recognized. But some systems seem to reject numbers in the `"C"' locale format. In some situation, it might also be a problem with the notation itself which makes it impossible to recognize whether the number is in the `"C"' locale or the local format. This can happen if thousands separator characters are used. Some locales define this character according to the national conventions to `'.'' which is the same character used in the `"C"' locale to denote the decimal point. So it is sometimes necessary to replace the `LC_ALL' line in the code above by a sequence of `setlocale' lines { ... setlocale (LC_CTYPE, ""); setlocale (LC_MESSAGES, ""); ... } On all POSIX conformant systems the locale categories `LC_CTYPE', `LC_MESSAGES', `LC_COLLATE', `LC_MONETARY', `LC_NUMERIC', and `LC_TIME' are available. On some systems which are only ISO C compliant, `LC_MESSAGES' is missing, but a substitute for it is defined in GNU gettext's `<libintl.h>' and in GNU gnulib's `<locale.h>'. Note that changing the `LC_CTYPE' also affects the functions declared in the `<ctype.h>' standard header and some functions declared in the `<string.h>' and `<stdlib.h>' standard headers. If this is not desirable in your application (for example in a compiler's parser), you can use a set of substitute functions which hardwire the C locale, such as found in the modules `c-ctype', `c-strcase', `c-strcasestr', `c-strtod', `c-strtold' in the GNU gnulib source distribution. It is also possible to switch the locale forth and back between the environment dependent locale and the C locale, but this approach is normally avoided because a `setlocale' call is expensive, because it is tedious to determine the places where a locale switch is needed in a large program's source, and because switching a locale is not multithread-safe.  File: gettext.info, Node: Preparing Strings, Next: Mark Keywords, Prev: Triggering, Up: Sources 4.3 Preparing Translatable Strings ================================== Before strings can be marked for translations, they sometimes need to be adjusted. Usually preparing a string for translation is done right before marking it, during the marking phase which is described in the next sections. What you have to keep in mind while doing that is the following. * Decent English style. * Entire sentences. * Split at paragraphs. * Use format strings instead of string concatenation. * Avoid unusual markup and unusual control characters. Let's look at some examples of these guidelines. Translatable strings should be in good English style. If slang language with abbreviations and shortcuts is used, often translators will not understand the message and will produce very inappropriate translations. "%s: is parameter\n" This is nearly untranslatable: Is the displayed item _a_ parameter or _the_ parameter? "No match" The ambiguity in this message makes it unintelligible: Is the program attempting to set something on fire? Does it mean "The given object does not match the template"? Does it mean "The template does not fit for any of the objects"? In both cases, adding more words to the message will help both the translator and the English speaking user. Translatable strings should be entire sentences. It is often not possible to translate single verbs or adjectives in a substitutable way. printf ("File %s is %s protected", filename, rw ? "write" : "read"); Most translators will not look at the source and will thus only see the string `"File %s is %s protected"', which is unintelligible. Change this to printf (rw ? "File %s is write protected" : "File %s is read protected", filename); This way the translator will not only understand the message, she will also be able to find the appropriate grammatical construction. A French translator for example translates "write protected" like "protected against writing". Entire sentences are also important because in many languages, the declination of some word in a sentence depends on the gender or the number (singular/plural) of another part of the sentence. There are usually more interdependencies between words than in English. The consequence is that asking a translator to translate two half-sentences and then combining these two half-sentences through dumb string concatenation will not work, for many languages, even though it would work for English. That's why translators need to handle entire sentences. Often sentences don't fit into a single line. If a sentence is output using two subsequent `printf' statements, like this printf ("Locale charset \"%s\" is different from\n", lcharset); printf ("input file charset \"%s\".\n", fcharset); the translator would have to translate two half sentences, but nothing in the POT file would tell her that the two half sentences belong together. It is necessary to merge the two `printf' statements so that the translator can handle the entire sentence at once and decide at which place to insert a line break in the translation (if at all): printf ("Locale charset \"%s\" is different from\n\ input file charset \"%s\".\n", lcharset, fcharset); You may now ask: how about two or more adjacent sentences? Like in this case: puts ("Apollo 13 scenario: Stack overflow handling failed."); puts ("On the next stack overflow we will crash!!!"); Should these two statements merged into a single one? I would recommend to merge them if the two sentences are related to each other, because then it makes it easier for the translator to understand and translate both. On the other hand, if one of the two messages is a stereotypic one, occurring in other places as well, you will do a favour to the translator by not merging the two. (Identical messages occurring in several places are combined by xgettext, so the translator has to handle them once only.) Translatable strings should be limited to one paragraph; don't let a single message be longer than ten lines. The reason is that when the translatable string changes, the translator is faced with the task of updating the entire translated string. Maybe only a single word will have changed in the English string, but the translator doesn't see that (with the current translation tools), therefore she has to proofread the entire message. Many GNU programs have a `--help' output that extends over several screen pages. It is a courtesy towards the translators to split such a message into several ones of five to ten lines each. While doing that, you can also attempt to split the documented options into groups, such as the input options, the output options, and the informative output options. This will help every user to find the option he is looking for. Hardcoded string concatenation is sometimes used to construct English strings: strcpy (s, "Replace "); strcat (s, object1); strcat (s, " with "); strcat (s, object2); strcat (s, "?"); In order to present to the translator only entire sentences, and also because in some languages the translator might want to swap the order of `object1' and `object2', it is necessary to change this to use a format string: sprintf (s, "Replace %s with %s?", object1, object2); A similar case is compile time concatenation of strings. The ISO C 99 include file `<inttypes.h>' contains a macro `PRId64' that can be used as a formatting directive for outputting an `int64_t' integer through `printf'. It expands to a constant string, usually "d" or "ld" or "lld" or something like this, depending on the platform. Assume you have code like printf ("The amount is %0" PRId64 "\n", number); The `gettext' tools and library have special support for these `<inttypes.h>' macros. You can therefore simply write printf (gettext ("The amount is %0" PRId64 "\n"), number); The PO file will contain the string "The amount is %0<PRId64>\n". The translators will provide a translation containing "%0<PRId64>" as well, and at runtime the `gettext' function's result will contain the appropriate constant string, "d" or "ld" or "lld". This works only for the predefined `<inttypes.h>' macros. If you have defined your own similar macros, let's say `MYPRId64', that are not known to `xgettext', the solution for this problem is to change the code like this: char buf1[100]; sprintf (buf1, "%0" MYPRId64, number); printf (gettext ("The amount is %s\n"), buf1); This means, you put the platform dependent code in one statement, and the internationalization code in a different statement. Note that a buffer length of 100 is safe, because all available hardware integer types are limited to 128 bits, and to print a 128 bit integer one needs at most 54 characters, regardless whether in decimal, octal or hexadecimal. All this applies to other programming languages as well. For example, in Java and C#, string concatenation is very frequently used, because it is a compiler built-in operator. Like in C, in Java, you would change System.out.println("Replace "+object1+" with "+object2+"?"); into a statement involving a format string: System.out.println( MessageFormat.format("Replace {0} with {1}?", new Object[] { object1, object2 })); Similarly, in C#, you would change Console.WriteLine("Replace "+object1+" with "+object2+"?"); into a statement involving a format string: Console.WriteLine( String.Format("Replace {0} with {1}?", object1, object2)); Unusual markup or control characters should not be used in translatable strings. Translators will likely not understand the particular meaning of the markup or control characters. For example, if you have a convention that `|' delimits the left-hand and right-hand part of some GUI elements, translators will often not understand it without specific comments. It might be better to have the translator translate the left-hand and right-hand part separately. Another example is the `argp' convention to use a single `\v' (vertical tab) control character to delimit two sections inside a string. This is flawed. Some translators may convert it to a simple newline, some to blank lines. With some PO file editors it may not be easy to even enter a vertical tab control character. So, you cannot be sure that the translation will contain a `\v' character, at the corresponding position. The solution is, again, to let the translator translate two separate strings and combine at run-time the two translated strings with the `\v' required by the convention. HTML markup, however, is common enough that it's probably ok to use in translatable strings. But please bear in mind that the GNU gettext tools don't verify that the translations are well-formed HTML.  File: gettext.info, Node: Mark Keywords, Next: Marking, Prev: Preparing Strings, Up: Sources 4.4 How Marks Appear in Sources =============================== All strings requiring translation should be marked in the C sources. Marking is done in such a way that each translatable string appears to be the sole argument of some function or preprocessor macro. There are only a few such possible functions or macros meant for translation, and their names are said to be marking keywords. The marking is attached to strings themselves, rather than to what we do with them. This approach has more uses. A blatant example is an error message produced by formatting. The format string needs translation, as well as some strings inserted through some `%s' specification in the format, while the result from `sprintf' may have so many different instances that it is impractical to list them all in some `error_string_out()' routine, say. This marking operation has two goals. The first goal of marking is for triggering the retrieval of the translation, at run time. The keyword is possibly resolved into a routine able to dynamically return the proper translation, as far as possible or wanted, for the argument string. Most localizable strings are found in executable positions, that is, attached to variables or given as parameters to functions. But this is not universal usage, and some translatable strings appear in structured initializations. *Note Special cases::. The second goal of the marking operation is to help `xgettext' at properly extracting all translatable strings when it scans a set of program sources and produces PO file templates. The canonical keyword for marking translatable strings is `gettext', it gave its name to the whole GNU `gettext' package. For packages making only light use of the `gettext' keyword, macro or function, it is easily used _as is_. However, for packages using the `gettext' interface more heavily, it is usually more convenient to give the main keyword a shorter, less obtrusive name. Indeed, the keyword might appear on a lot of strings all over the package, and programmers usually do not want nor need their program sources to remind them forcefully, all the time, that they are internationalized. Further, a long keyword has the disadvantage of using more horizontal space, forcing more indentation work on sources for those trying to keep them within 79 or 80 columns. Many packages use `_' (a simple underline) as a keyword, and write `_("Translatable string")' instead of `gettext ("Translatable string")'. Further, the coding rule, from GNU standards, wanting that there is a space between the keyword and the opening parenthesis is relaxed, in practice, for this particular usage. So, the textual overhead per translatable string is reduced to only three characters: the underline and the two parentheses. However, even if GNU `gettext' uses this convention internally, it does not offer it officially. The real, genuine keyword is truly `gettext' indeed. It is fairly easy for those wanting to use `_' instead of `gettext' to declare: #include <libintl.h> #define _(String) gettext (String) instead of merely using `#include <libintl.h>'. The marking keywords `gettext' and `_' take the translatable string as sole argument. It is also possible to define marking functions that take it at another argument position. It is even possible to make the marked argument position depend on the total number of arguments of the function call; this is useful in C++. All this is achieved using `xgettext''s `--keyword' option. How to pass such an option to `xgettext', assuming that `gettextize' is used, is described in *note po/Makevars:: and *note AM_XGETTEXT_OPTION::. Note also that long strings can be split across lines, into multiple adjacent string tokens. Automatic string concatenation is performed at compile time according to ISO C and ISO C++; `xgettext' also supports this syntax. Later on, the maintenance is relatively easy. If, as a programmer, you add or modify a string, you will have to ask yourself if the new or altered string requires translation, and include it within `_()' if you think it should be translated. For example, `"%s"' is an example of string _not_ requiring translation. But `"%s: %d"' _does_ require translation, because in French, unlike in English, it's customary to put a space before a colon.  File: gettext.info, Node: Marking, Next: c-format Flag, Prev: Mark Keywords, Up: Sources 4.5 Marking Translatable Strings ================================ In PO mode, one set of features is meant more for the programmer than for the translator, and allows him to interactively mark which strings, in a set of program sources, are translatable, and which are not. Even if it is a fairly easy job for a programmer to find and mark such strings by other means, using any editor of his choice, PO mode makes this work more comfortable. Further, this gives translators who feel a little like programmers, or programmers who feel a little like translators, a tool letting them work at marking translatable strings in the program sources, while simultaneously producing a set of translation in some language, for the package being internationalized. The set of program sources, targeted by the PO mode commands describe here, should have an Emacs tags table constructed for your project, prior to using these PO file commands. This is easy to do. In any shell window, change the directory to the root of your project, then execute a command resembling: etags src/*.[hc] lib/*.[hc] presuming here you want to process all `.h' and `.c' files from the `src/' and `lib/' directories. This command will explore all said files and create a `TAGS' file in your root directory, somewhat summarizing the contents using a special file format Emacs can understand. For packages following the GNU coding standards, there is a make goal `tags' or `TAGS' which constructs the tag files in all directories and for all files containing source code. Once your `TAGS' file is ready, the following commands assist the programmer at marking translatable strings in his set of sources. But these commands are necessarily driven from within a PO file window, and it is likely that you do not even have such a PO file yet. This is not a problem at all, as you may safely open a new, empty PO file, mainly for using these commands. This empty PO file will slowly fill in while you mark strings as translatable in your program sources. `,' Search through program sources for a string which looks like a candidate for translation (`po-tags-search'). `M-,' Mark the last string found with `_()' (`po-mark-translatable'). `M-.' Mark the last string found with a keyword taken from a set of possible keywords. This command with a prefix allows some management of these keywords (`po-select-mark-and-mark'). The `,' (`po-tags-search') command searches for the next occurrence of a string which looks like a possible candidate for translation, and displays the program source in another Emacs window, positioned in such a way that the string is near the top of this other window. If the string is too big to fit whole in this window, it is positioned so only its end is shown. In any case, the cursor is left in the PO file window. If the shown string would be better presented differently in different native languages, you may mark it using `M-,' or `M-.'. Otherwise, you might rather ignore it and skip to the next string by merely repeating the `,' command. A string is a good candidate for translation if it contains a sequence of three or more letters. A string containing at most two letters in a row will be considered as a candidate if it has more letters than non-letters. The command disregards strings containing no letters, or isolated letters only. It also disregards strings within comments, or strings already marked with some keyword PO mode knows (see below). If you have never told Emacs about some `TAGS' file to use, the command will request that you specify one from the minibuffer, the first time you use the command. You may later change your `TAGS' file by using the regular Emacs command `M-x visit-tags-table', which will ask you to name the precise `TAGS' file you want to use. *Note Tag Tables: (emacs)Tags. Each time you use the `,' command, the search resumes from where it was left by the previous search, and goes through all program sources, obeying the `TAGS' file, until all sources have been processed. However, by giving a prefix argument to the command (`C-u ,'), you may request that the search be restarted all over again from the first program source; but in this case, strings that you recently marked as translatable will be automatically skipped. Using this `,' command does not prevent using of other regular Emacs tags commands. For example, regular `tags-search' or `tags-query-replace' commands may be used without disrupting the independent `,' search sequence. However, as implemented, the _initial_ `,' command (or the `,' command is used with a prefix) might also reinitialize the regular Emacs tags searching to the first tags file, this reinitialization might be considered spurious. The `M-,' (`po-mark-translatable') command will mark the recently found string with the `_' keyword. The `M-.' (`po-select-mark-and-mark') command will request that you type one keyword from the minibuffer and use that keyword for marking the string. Both commands will automatically create a new PO file untranslated entry for the string being marked, and make it the current entry (making it easy for you to immediately proceed to its translation, if you feel like doing it right away). It is possible that the modifications made to the program source by `M-,' or `M-.' render some source line longer than 80 columns, forcing you to break and re-indent this line differently. You may use the `O' command from PO mode, or any other window changing command from Emacs, to break out into the program source window, and do any needed adjustments. You will have to use some regular Emacs command to return the cursor to the PO file window, if you want command `,' for the next string, say. The `M-.' command has a few built-in speedups, so you do not have to explicitly type all keywords all the time. The first such speedup is that you are presented with a _preferred_ keyword, which you may accept by merely typing `<RET>' at the prompt. The second speedup is that you may type any non-ambiguous prefix of the keyword you really mean, and the command will complete it automatically for you. This also means that PO mode has to _know_ all your possible keywords, and that it will not accept mistyped keywords. If you reply `?' to the keyword request, the command gives a list of all known keywords, from which you may choose. When the command is prefixed by an argument (`C-u M-.'), it inhibits updating any program source or PO file buffer, and does some simple keyword management instead. In this case, the command asks for a keyword, written in full, which becomes a new allowed keyword for later `M-.' commands. Moreover, this new keyword automatically becomes the _preferred_ keyword for later commands. By typing an already known keyword in response to `C-u M-.', one merely changes the _preferred_ keyword and does nothing more. All keywords known for `M-.' are recognized by the `,' command when scanning for strings, and strings already marked by any of those known keywords are automatically skipped. If many PO files are opened simultaneously, each one has its own independent set of known keywords. There is no provision in PO mode, currently, for deleting a known keyword, you have to quit the file (maybe using `q') and reopen it afresh. When a PO file is newly brought up in an Emacs window, only `gettext' and `_' are known as keywords, and `gettext' is preferred for the `M-.' command. In fact, this is not useful to prefer `_', as this one is already built in the `M-,' command.  File: gettext.info, Node: c-format Flag, Next: Special cases, Prev: Marking, Up: Sources 4.6 Special Comments preceding Keywords ======================================= In C programs strings are often used within calls of functions from the `printf' family. The special thing about these format strings is that they can contain format specifiers introduced with `%'. Assume we have the code printf (gettext ("String `%s' has %d characters\n"), s, strlen (s)); A possible German translation for the above string might be: "%d Zeichen lang ist die Zeichenkette `%s'" A C programmer, even if he cannot speak German, will recognize that there is something wrong here. The order of the two format specifiers is changed but of course the arguments in the `printf' don't have. This will most probably lead to problems because now the length of the string is regarded as the address. To prevent errors at runtime caused by translations the `msgfmt' tool can check statically whether the arguments in the original and the translation string match in type and number. If this is not the case and the `-c' option has been passed to `msgfmt', `msgfmt' will give an error and refuse to produce a MO file. Thus consequent use of `msgfmt -c' will catch the error, so that it cannot cause cause problems at runtime. If the word order in the above German translation would be correct one would have to write "%2$d Zeichen lang ist die Zeichenkette `%1$s'" The routines in `msgfmt' know about this special notation. Because not all strings in a program must be format strings it is not useful for `msgfmt' to test all the strings in the `.po' file. This might cause problems because the string might contain what looks like a format specifier, but the string is not used in `printf'. Therefore the `xgettext' adds a special tag to those messages it thinks might be a format string. There is no absolute rule for this, only a heuristic. In the `.po' file the entry is marked using the `c-format' flag in the `#,' comment line (*note PO Files::). The careful reader now might say that this again can cause problems. The heuristic might guess it wrong. This is true and therefore `xgettext' knows about a special kind of comment which lets the programmer take over the decision. If in the same line as or the immediately preceding line to the `gettext' keyword the `xgettext' program finds a comment containing the words `xgettext:c-format', it will mark the string in any case with the `c-format' flag. This kind of comment should be used when `xgettext' does not recognize the string as a format string but it really is one and it should be tested. Please note that when the comment is in the same line as the `gettext' keyword, it must be before the string to be translated. This situation happens quite often. The `printf' function is often called with strings which do not contain a format specifier. Of course one would normally use `fputs' but it does happen. In this case `xgettext' does not recognize this as a format string but what happens if the translation introduces a valid format specifier? The `printf' function will try to access one of the parameters but none exists because the original code does not pass any parameters. `xgettext' of course could make a wrong decision the other way round, i.e. a string marked as a format string actually is not a format string. In this case the `msgfmt' might give too many warnings and would prevent translating the `.po' file. The method to prevent this wrong decision is similar to the one used above, only the comment to use must contain the string `xgettext:no-c-format'. If a string is marked with `c-format' and this is not correct the user can find out who is responsible for the decision. See *note xgettext Invocation:: to see how the `--debug' option can be used for solving this problem.  File: gettext.info, Node: Special cases, Next: Bug Report Address, Prev: c-format Flag, Up: Sources 4.7 Special Cases of Translatable Strings ========================================= The attentive reader might now point out that it is not always possible to mark translatable string with `gettext' or something like this. Consider the following case: { static const char *messages[] = { "some very meaningful message", "and another one" }; const char *string; ... string = index > 1 ? "a default message" : messages[index]; fputs (string); ... } While it is no problem to mark the string `"a default message"' it is not possible to mark the string initializers for `messages'. What is to be done? We have to fulfill two tasks. First we have to mark the strings so that the `xgettext' program (*note xgettext Invocation::) can find them, and second we have to translate the string at runtime before printing them. The first task can be fulfilled by creating a new keyword, which names a no-op. For the second we have to mark all access points to a string from the array. So one solution can look like this: #define gettext_noop(String) String { static const char *messages[] = { gettext_noop ("some very meaningful message"), gettext_noop ("and another one") }; const char *string; ... string = index > 1 ? gettext ("a default message") : gettext (messages[index]); fputs (string); ... } Please convince yourself that the string which is written by `fputs' is translated in any case. How to get `xgettext' know the additional keyword `gettext_noop' is explained in *note xgettext Invocation::. The above is of course not the only solution. You could also come along with the following one: #define gettext_noop(String) String { static const char *messages[] = { gettext_noop ("some very meaningful message", gettext_noop ("and another one") }; const char *string; ... string = index > 1 ? gettext_noop ("a default message") : messages[index]; fputs (gettext (string)); ... } But this has a drawback. The programmer has to take care that he uses `gettext_noop' for the string `"a default message"'. A use of `gettext' could have in rare cases unpredictable results. One advantage is that you need not make control flow analysis to make sure the output is really translated in any case. But this analysis is generally not very difficult. If it should be in any situation you can use this second method in this situation.  File: gettext.info, Node: Bug Report Address, Next: Names, Prev: Special cases, Up: Sources 4.8 Letting Users Report Translation Bugs ========================================= Code sometimes has bugs, but translations sometimes have bugs too. The users need to be able to report them. Reporting translation bugs to the programmer or maintainer of a package is not very useful, since the maintainer must never change a translation, except on behalf of the translator. Hence the translation bugs must be reported to the translators. Here is a way to organize this so that the maintainer does not need to forward translation bug reports, nor even keep a list of the addresses of the translators or their translation teams. Every program has a place where is shows the bug report address. For GNU programs, it is the code which handles the "-help" option, typically in a function called "usage". In this place, instruct the translator to add her own bug reporting address. For example, if that code has a statement printf (_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT); you can add some translator instructions like this: /* TRANSLATORS: The placeholder indicates the bug-reporting address for this package. Please add _another line_ saying "Report translation bugs to <...>\n" with the address for translation bugs (typically your translation team's web or email address). */ printf (_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT); These will be extracted by `xgettext', leading to a .pot file that contains this: #. TRANSLATORS: The placeholder indicates the bug-reporting address #. for this package. Please add _another line_ saying #. "Report translation bugs to <...>\n" with the address for translation #. bugs (typically your translation team's web or email address). #: src/hello.c:178 #, c-format msgid "Report bugs to <%s>.\n" msgstr ""  File: gettext.info, Node: Names, Next: Libraries, Prev: Bug Report Address, Up: Sources 4.9 Marking Proper Names for Translation ======================================== Should names of persons, cities, locations etc. be marked for translation or not? People who only know languages that can be written with Latin letters (English, Spanish, French, German, etc.) are tempted to say "no", because names usually do not change when transported between these languages. However, in general when translating from one script to another, names are translated too, usually phonetically or by transliteration. For example, Russian or Greek names are converted to the Latin alphabet when being translated to English, and English or French names are converted to the Katakana script when being translated to Japanese. This is necessary because the speakers of the target language in general cannot read the script the name is originally written in. As a programmer, you should therefore make sure that names are marked for translation, with a special comment telling the translators that it is a proper name and how to pronounce it. In its simple form, it looks like this: printf (_("Written by %s.\n"), /* TRANSLATORS: This is a proper name. See the gettext manual, section Names. Note this is actually a non-ASCII name: The first name is (with Unicode escapes) "Fran\u00e7ois" or (with HTML entities) "François". Pronunciation is like "fraa-swa pee-nar". */ _("Francois Pinard")); The GNU gnulib library offers a module `propername' (`http://www.gnu.org/software/gnulib/MODULES.html#module=propername') which takes care to automatically append the original name, in parentheses, to the translated name. For names that cannot be written in ASCII, it also frees the translator from the task of entering the appropriate non-ASCII characters if no script change is needed. In this more comfortable form, it looks like this: printf (_("Written by %s and %s.\n"), proper_name ("Ulrich Drepper"), /* TRANSLATORS: This is a proper name. See the gettext manual, section Names. Note this is actually a non-ASCII name: The first name is (with Unicode escapes) "Fran\u00e7ois" or (with HTML entities) "François". Pronunciation is like "fraa-swa pee-nar". */ proper_name_utf8 ("Francois Pinard", "Fran\303\247ois Pinard")); You can also write the original name directly in Unicode (rather than with Unicode escapes or HTML entities) and denote the pronunciation using the International Phonetic Alphabet (see `http://www.wikipedia.org/wiki/International_Phonetic_Alphabet'). As a translator, you should use some care when translating names, because it is frustrating if people see their names mutilated or distorted. If your language uses the Latin script, all you need to do is to reproduce the name as perfectly as you can within the usual character set of your language. In this particular case, this means to provide a translation containing the c-cedilla character. If your language uses a different script and the people speaking it don't usually read Latin words, it means transliteration. If the programmer used the simple case, you should still give, in parentheses, the original writing of the name - for the sake of the people that do read the Latin script. If the programmer used the `propername' module mentioned above, you don't need to give the original writing of the name in parentheses, because the program will already do so. Here is an example, using Greek as the target script: #. This is a proper name. See the gettext #. manual, section Names. Note this is actually a non-ASCII #. name: The first name is (with Unicode escapes) #. "Fran\u00e7ois" or (with HTML entities) "François". #. Pronunciation is like "fraa-swa pee-nar". msgid "Francois Pinard" msgstr "\phi\rho\alpha\sigma\omicron\alpha \pi\iota\nu\alpha\rho" " (Francois Pinard)" Because translation of names is such a sensitive domain, it is a good idea to test your translation before submitting it.  File: gettext.info, Node: Libraries, Prev: Names, Up: Sources 4.10 Preparing Library Sources ============================== When you are preparing a library, not a program, for the use of `gettext', only a few details are different. Here we assume that the library has a translation domain and a POT file of its own. (If it uses the translation domain and POT file of the main program, then the previous sections apply without changes.) 1. The library code doesn't call `setlocale (LC_ALL, "")'. It's the responsibility of the main program to set the locale. The library's documentation should mention this fact, so that developers of programs using the library are aware of it. 2. The library code doesn't call `textdomain (PACKAGE)', because it would interfere with the text domain set by the main program. 3. The initialization code for a program was setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); For a library it is reduced to bindtextdomain (PACKAGE, LOCALEDIR); If your library's API doesn't already have an initialization function, you need to create one, containing at least the `bindtextdomain' invocation. However, you usually don't need to export and document this initialization function: It is sufficient that all entry points of the library call the initialization function if it hasn't been called before. The typical idiom used to achieve this is a static boolean variable that indicates whether the initialization function has been called. Like this: static bool libfoo_initialized; static void libfoo_initialize (void) { bindtextdomain (PACKAGE, LOCALEDIR); libfoo_initialized = true; } /* This function is part of the exported API. */ struct foo * create_foo (...) { /* Must ensure the initialization is performed. */ if (!libfoo_initialized) libfoo_initialize (); ... } /* This function is part of the exported API. The argument must be non-NULL and have been created through create_foo(). */ int foo_refcount (struct foo *argument) { /* No need to invoke the initialization function here, because create_foo() must already have been called before. */ ... } 4. The usual declaration of the `_' macro in each source file was #include <libintl.h> #define _(String) gettext (String) for a program. For a library, which has its own translation domain, it reads like this: #include <libintl.h> #define _(String) dgettext (PACKAGE, String) In other words, `dgettext' is used instead of `gettext'. Similarly, the `dngettext' function should be used in place of the `ngettext' function.  File: gettext.info, Node: Template, Next: Creating, Prev: Sources, Up: Top 5 Making the PO Template File ***************************** After preparing the sources, the programmer creates a PO template file. This section explains how to use `xgettext' for this purpose. `xgettext' creates a file named `DOMAINNAME.po'. You should then rename it to `DOMAINNAME.pot'. (Why doesn't `xgettext' create it under the name `DOMAINNAME.pot' right away? The answer is: for historical reasons. When `xgettext' was specified, the distinction between a PO file and PO file template was fuzzy, and the suffix `.pot' wasn't in use at that time.) * Menu: * xgettext Invocation:: Invoking the `xgettext' Program  File: gettext.info, Node: xgettext Invocation, Prev: Template, Up: Template 5.1 Invoking the `xgettext' Program =================================== xgettext [OPTION] [INPUTFILE] ... The `xgettext' program extracts translatable strings from given input files. 5.1.1 Input file location ------------------------- `INPUTFILE ...' Input files. `-f FILE' `--files-from=FILE' Read the names of the input files from FILE instead of getting them from the command line. `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting `.po' file will be written relative to the current directory, though. If INPUTFILE is `-', standard input is read. 5.1.2 Output file location -------------------------- `-d NAME' `--default-domain=NAME' Use `NAME.po' for output (instead of `messages.po'). `-o FILE' `--output=FILE' Write output to specified file (instead of `NAME.po' or `messages.po'). `-p DIR' `--output-dir=DIR' Output files will be placed in directory DIR. If the output FILE is `-' or `/dev/stdout', the output is written to standard output. 5.1.3 Choice of input file language ----------------------------------- `-L NAME' `--language=NAME' Specifies the language of the input files. The supported languages are `C', `C++', `ObjectiveC', `PO', `Python', `Lisp', `EmacsLisp', `librep', `Scheme', `Smalltalk', `Java', `JavaProperties', `C#', `awk', `YCP', `Tcl', `Perl', `PHP', `GCC-source', `NXStringTable', `RST', `Glade'. `-C' `--c++' This is a shorthand for `--language=C++'. By default the language is guessed depending on the input file name extension. 5.1.4 Input file interpretation ------------------------------- `--from-code=NAME' Specifies the encoding of the input files. This option is needed only if some untranslated message strings or their corresponding comments contain non-ASCII characters. Note that Tcl and Glade input files are always assumed to be in UTF-8, regardless of this option. By default the input files are assumed to be in ASCII. 5.1.5 Operation mode -------------------- `-j' `--join-existing' Join messages with existing file. `-x FILE' `--exclude-file=FILE' Entries from FILE are not extracted. FILE should be a PO or POT file. `-c[TAG]' `--add-comments[=TAG]' Place comment blocks starting with TAG and preceding keyword lines in the output file. Without a TAG, the option means to put _all_ comment blocks preceding keyword lines in the output file. 5.1.6 Language specific options ------------------------------- `-a' `--extract-all' Extract all strings. This option has an effect with most languages, namely C, C++, ObjectiveC, Shell, Python, Lisp, EmacsLisp, librep, Java, C#, awk, Tcl, Perl, PHP, GCC-source, Glade. `-k[KEYWORDSPEC]' `--keyword[=KEYWORDSPEC]' Specify KEYWORDSPEC as an additional keyword to be looked for. Without a KEYWORDSPEC, the option means to not use default keywords. If KEYWORDSPEC is a C identifier ID, `xgettext' looks for strings in the first argument of each call to the function or macro ID. If KEYWORDSPEC is of the form `ID:ARGNUM', `xgettext' looks for strings in the ARGNUMth argument of the call. If KEYWORDSPEC is of the form `ID:ARGNUM1,ARGNUM2', `xgettext' looks for strings in the ARGNUM1st argument and in the ARGNUM2nd argument of the call, and treats them as singular/plural variants for a message with plural handling. Also, if KEYWORDSPEC is of the form `ID:CONTEXTARGNUMc,ARGNUM' or `ID:ARGNUM,CONTEXTARGNUMc', `xgettext' treats strings in the CONTEXTARGNUMth argument as a context specifier. And, as a special-purpose support for GNOME, if KEYWORDSPEC is of the form `ID:ARGNUMg', `xgettext' recognizes the ARGNUMth argument as a string with context, using the GNOME `glib' syntax `"msgctxt|msgid"'. Furthermore, if KEYWORDSPEC is of the form `ID:...,TOTALNUMARGSt', `xgettext' recognizes this argument specification only if the number of actual arguments is equal to TOTALNUMARGS. This is useful for disambiguating overloaded function calls in C++. Finally, if KEYWORDSPEC is of the form `ID:ARGNUM...,"XCOMMENT"', `xgettext', when extracting a message from the specified argument strings, adds an extracted comment XCOMMENT to the message. Note that when used through a normal shell command line, the double-quotes around the XCOMMENT need to be escaped. This option has an effect with most languages, namely C, C++, ObjectiveC, Shell, Python, Lisp, EmacsLisp, librep, Java, C#, awk, Tcl, Perl, PHP, GCC-source, Glade. The default keyword specifications, which are always looked for if not explicitly disabled, are language dependent. They are: * For C, C++, and GCC-source: `gettext', `dgettext:2', `dcgettext:2', `ngettext:1,2', `dngettext:2,3', `dcngettext:2,3', `gettext_noop', and `pgettext:1c,2', `dpgettext:2c,3', `dcpgettext:2c,3', `npgettext:1c,2,3', `dnpgettext:2c,3,4', `dcnpgettext:2c,3,4'. * For Objective C: Like for C, and also `NSLocalizedString', `_', `NSLocalizedStaticString', `__'. * For Shell scripts: `gettext', `ngettext:1,2', `eval_gettext', `eval_ngettext:1,2'. * For Python: `gettext', `ugettext', `dgettext:2', `ngettext:1,2', `ungettext:1,2', `dngettext:2,3', `_'. * For Lisp: `gettext', `ngettext:1,2', `gettext-noop'. * For EmacsLisp: `_'. * For librep: `_'. * For Scheme: `gettext', `ngettext:1,2', `gettext-noop'. * For Java: `GettextResource.gettext:2', `GettextResource.ngettext:2,3', `GettextResource.pgettext:2c,3', `GettextResource.npgettext:2c,3,4', `gettext', `ngettext:1,2', `pgettext:1c,2', `npgettext:1c,2,3', `getString'. * For C#: `GetString', `GetPluralString:1,2', `GetParticularString:1c,2', `GetParticularPluralString:1c,2,3'. * For awk: `dcgettext', `dcngettext:1,2'. * For Tcl: `::msgcat::mc'. * For Perl: `gettext', `%gettext', `$gettext', `dgettext:2', `dcgettext:2', `ngettext:1,2', `dngettext:2,3', `dcngettext:2,3', `gettext_noop'. * For PHP: `_', `gettext', `dgettext:2', `dcgettext:2', `ngettext:1,2', `dngettext:2,3', `dcngettext:2,3'. * For Glade 1: `label', `title', `text', `format', `copyright', `comments', `preview_text', `tooltip'. To disable the default keyword specifications, the option `-k' or `--keyword' or `--keyword=', without a KEYWORDSPEC, can be used. `--flag=WORD:ARG:FLAG' Specifies additional flags for strings occurring as part of the ARGth argument of the function WORD. The possible flags are the possible format string indicators, such as `c-format', and their negations, such as `no-c-format', possibly prefixed with `pass-'. The meaning of `--flag=FUNCTION:ARG:LANG-format' is that in language LANG, the specified FUNCTION expects as ARGth argument a format string. (For those of you familiar with GCC function attributes, `--flag=FUNCTION:ARG:c-format' is roughly equivalent to the declaration `__attribute__ ((__format__ (__printf__, ARG, ...)))' attached to FUNCTION in a C source file.) For example, if you use the `error' function from GNU libc, you can specify its behaviour through `--flag=error:3:c-format'. The effect of this specification is that `xgettext' will mark as format strings all `gettext' invocations that occur as ARGth argument of FUNCTION. This is useful when such strings contain no format string directives: together with the checks done by `msgfmt -c' it will ensure that translators cannot accidentally use format string directives that would lead to a crash at runtime. The meaning of `--flag=FUNCTION:ARG:pass-LANG-format' is that in language LANG, if the FUNCTION call occurs in a position that must yield a format string, then its ARGth argument must yield a format string of the same type as well. (If you know GCC function attributes, the `--flag=FUNCTION:ARG:pass-c-format' option is roughly equivalent to the declaration `__attribute__ ((__format_arg__ (ARG)))' attached to FUNCTION in a C source file.) For example, if you use the `_' shortcut for the `gettext' function, you should use `--flag=_:1:pass-c-format'. The effect of this specification is that `xgettext' will propagate a format string requirement for a `_("string")' call to its first argument, the literal `"string"', and thus mark it as a format string. This is useful when such strings contain no format string directives: together with the checks done by `msgfmt -c' it will ensure that translators cannot accidentally use format string directives that would lead to a crash at runtime. This option has an effect with most languages, namely C, C++, ObjectiveC, Shell, Python, Lisp, EmacsLisp, librep, Scheme, Java, C#, awk, YCP, Tcl, Perl, PHP, GCC-source. `-T' `--trigraphs' Understand ANSI C trigraphs for input. This option has an effect only with the languages C, C++, ObjectiveC. `--qt' Recognize Qt format strings. This option has an effect only with the language C++. `--kde' Recognize KDE 4 format strings. This option has an effect only with the language C++. `--boost' Recognize Boost format strings. This option has an effect only with the language C++. `--debug' Use the flags `c-format' and `possible-c-format' to show who was responsible for marking a message as a format string. The latter form is used if the `xgettext' program decided, the format form is used if the programmer prescribed it. By default only the `c-format' form is used. The translator should not have to care about these details. This implementation of `xgettext' is able to process a few awkward cases, like strings in preprocessor macros, ANSI concatenation of adjacent strings, and escaped end of lines for continued strings. 5.1.7 Output details -------------------- `--color' `--color=WHEN' Specify whether or when to use colors and other text attributes. See *note The --color option:: for details. `--style=STYLE_FILE' Specify the CSS style rule file to use for `--color'. See *note The --style option:: for details. `--force-po' Always write an output file even if no message is defined. `-i' `--indent' Write the .po file using indented style. `--no-location' Do not write `#: FILENAME:LINE' lines. Note that using this option makes it harder for technically skilled translators to understand each message's context. `-n' `--add-location' Generate `#: FILENAME:LINE' lines (default). `--strict' Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions. `--properties-output' Write out a Java ResourceBundle in Java `.properties' syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages. `--stringtable-output' Write out a NeXTstep/GNUstep localized resource file in `.strings' syntax. Note that this file format doesn't support plural forms. `-w NUMBER' `--width=NUMBER' Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER. `--no-wrap' Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split. `-s' `--sort-output' Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context. `-F' `--sort-by-file' Sort output by file location. `--omit-header' Don't write header with `msgid ""' entry. This is useful for testing purposes because it eliminates a source of variance for generated `.gmo' files. With `--omit-header', two invocations of `xgettext' on the same files with the same options at different times are guaranteed to produce the same results. Note that using this option will lead to an error if the resulting file would not entirely be in ASCII. `--copyright-holder=STRING' Set the copyright holder in the output. STRING should be the copyright holder of the surrounding package. (Note that the msgstr strings, extracted from the package's sources, belong to the copyright holder of the package.) Translators are expected to transfer or disclaim the copyright for their translations, so that package maintainers can distribute them without legal risk. If STRING is empty, the output files are marked as being in the public domain; in this case, the translators are expected to disclaim their copyright, again so that package maintainers can distribute them without legal risk. The default value for STRING is the Free Software Foundation, Inc., simply because `xgettext' was first used in the GNU project. `--foreign-user' Omit FSF copyright in output. This option is equivalent to `--copyright-holder='''. It can be useful for packages outside the GNU project that want their translations to be in the public domain. `--package-name=PACKAGE' Set the package name in the header of the output. `--package-version=VERSION' Set the package version in the header of the output. This option has an effect only if the `--package-name' option is also used. `--msgid-bugs-address=EMAIL@ADDRESS' Set the reporting address for msgid bugs. This is the email address or URL to which the translators shall report bugs in the untranslated strings: - Strings which are not entire sentences, see the maintainer guidelines in *note Preparing Strings::. - Strings which use unclear terms or require additional context to be understood. - Strings which make invalid assumptions about notation of date, time or money. - Pluralisation problems. - Incorrect English spelling. - Incorrect formatting. It can be your email address, or a mailing list address where translators can write to without being subscribed, or the URL of a web page through which the translators can contact you. The default value is empty, which means that translators will be clueless! Don't forget to specify this option. `-m[STRING]' `--msgstr-prefix[=STRING]' Use STRING (or "" if not specified) as prefix for msgstr values. `-M[STRING]' `--msgstr-suffix[=STRING]' Use STRING (or "" if not specified) as suffix for msgstr values. 5.1.8 Informative output ------------------------ `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit.  File: gettext.info, Node: Creating, Next: Updating, Prev: Template, Up: Top 6 Creating a New PO File ************************ When starting a new translation, the translator creates a file called `LANG.po', as a copy of the `PACKAGE.pot' template file with modifications in the initial comments (at the beginning of the file) and in the header entry (the first entry, near the beginning of the file). The easiest way to do so is by use of the `msginit' program. For example: $ cd PACKAGE-VERSION $ cd po $ msginit The alternative way is to do the copy and modifications by hand. To do so, the translator copies `PACKAGE.pot' to `LANG.po'. Then she modifies the initial comments and the header entry of this file. * Menu: * msginit Invocation:: Invoking the `msginit' Program * Header Entry:: Filling in the Header Entry  File: gettext.info, Node: msginit Invocation, Next: Header Entry, Prev: Creating, Up: Creating 6.1 Invoking the `msginit' Program ================================== msginit [OPTION] The `msginit' program creates a new PO file, initializing the meta information with values from the user's environment. 6.1.1 Input file location ------------------------- `-i INPUTFILE' `--input=INPUTFILE' Input POT file. If no INPUTFILE is given, the current directory is searched for the POT file. If it is `-', standard input is read. 6.1.2 Output file location -------------------------- `-o FILE' `--output-file=FILE' Write output to specified PO file. If no output file is given, it depends on the `--locale' option or the user's locale setting. If it is `-', the results are written to standard output. 6.1.3 Input file syntax ----------------------- `-P' `--properties-input' Assume the input file is a Java ResourceBundle in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input file is a NeXTstep/GNUstep localized resource file in `.strings' syntax, not in PO file syntax. 6.1.4 Output details -------------------- `-l LL_CC' `--locale=LL_CC' Set target locale. LL should be a language code, and CC should be a country code. The command `locale -a' can be used to output a list of all installed locales. The default is the user's locale setting. `--no-translator' Declares that the PO file will not have a human translator and is instead automatically generated. `--color' `--color=WHEN' Specify whether or when to use colors and other text attributes. See *note The --color option:: for details. `--style=STYLE_FILE' Specify the CSS style rule file to use for `--color'. See *note The --style option:: for details. `-p' `--properties-output' Write out a Java ResourceBundle in Java `.properties' syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages. `--stringtable-output' Write out a NeXTstep/GNUstep localized resource file in `.strings' syntax. Note that this file format doesn't support plural forms. `-w NUMBER' `--width=NUMBER' Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER. `--no-wrap' Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split. 6.1.5 Informative output ------------------------ `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit.  File: gettext.info, Node: Header Entry, Prev: msginit Invocation, Up: Creating 6.2 Filling in the Header Entry =============================== The initial comments "SOME DESCRIPTIVE TITLE", "YEAR" and "FIRST AUTHOR <EMAIL@ADDRESS>, YEAR" ought to be replaced by sensible information. This can be done in any text editor; if Emacs is used and it switched to PO mode automatically (because it has recognized the file's suffix), you can disable it by typing `M-x fundamental-mode'. Modifying the header entry can already be done using PO mode: in Emacs, type `M-x po-mode RET' and then `RET' again to start editing the entry. You should fill in the following fields. Project-Id-Version This is the name and version of the package. Fill it in if it has not already been filled in by `xgettext'. Report-Msgid-Bugs-To This has already been filled in by `xgettext'. It contains an email address or URL where you can report bugs in the untranslated strings: - Strings which are not entire sentences, see the maintainer guidelines in *note Preparing Strings::. - Strings which use unclear terms or require additional context to be understood. - Strings which make invalid assumptions about notation of date, time or money. - Pluralisation problems. - Incorrect English spelling. - Incorrect formatting. POT-Creation-Date This has already been filled in by `xgettext'. PO-Revision-Date You don't need to fill this in. It will be filled by the PO file editor when you save the file. Last-Translator Fill in your name and email address (without double quotes). Language-Team Fill in the English name of the language, and the email address or homepage URL of the language team you are part of. Before starting a translation, it is a good idea to get in touch with your translation team, not only to make sure you don't do duplicated work, but also to coordinate difficult linguistic issues. In the Free Translation Project, each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. Language Fill in the language code of the language. This can be in one of three forms: - `LL', an ISO 639 two-letter language code (lowercase). See *note Language Codes:: for the list of codes. - `LL_CC', where `LL' is an ISO 639 two-letter language code (lowercase) and `CC' is an ISO 3166 two-letter country code (uppercase). The country code specification is not redundant: Some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. See *note Language Codes:: and *note Country Codes:: for the lists of codes. - `LL_CC@VARIANT', where `LL' is an ISO 639 two-letter language code (lowercase), `CC' is an ISO 3166 two-letter country code (uppercase), and `VARIANT' is a variant designator. The variant designator (lowercase) can be a script designator, such as `latin' or `cyrillic'. The naming convention `LL_CC' is also the way locales are named on systems based on GNU libc. But there are three important differences: * In this PO file field, but not in locale names, `LL_CC' combinations denoting a language's main dialect are abbreviated as `LL'. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. * In this PO file field, suffixes like `.ENCODING' are not used. * In this PO file field, variant designators that are not relevant to message translation, such as `@euro', are not used. So, if your locale name is `de_DE.UTF-8', the language specification in PO files is just `de'. Content-Type Replace `CHARSET' with the character encoding used for your language, in your locale, or UTF-8. This field is needed for correct operation of the `msgmerge' and `msgfmt' programs, as well as for users whose locale's character encoding differs from yours (see *note Charset conversion::). You get the character encoding of your locale by running the shell command `locale charmap'. If the result is `C' or `ANSI_X3.4-1968', which is equivalent to `ASCII' (= `US-ASCII'), it means that your locale is not correctly configured. In this case, ask your translation team which charset to use. `ASCII' is not usable for any language except Latin. Because the PO files must be portable to operating systems with less advanced internationalization facilities, the character encodings that can be used are limited to those supported by both GNU `libc' and GNU `libiconv'. These are: `ASCII', `ISO-8859-1', `ISO-8859-2', `ISO-8859-3', `ISO-8859-4', `ISO-8859-5', `ISO-8859-6', `ISO-8859-7', `ISO-8859-8', `ISO-8859-9', `ISO-8859-13', `ISO-8859-14', `ISO-8859-15', `KOI8-R', `KOI8-U', `KOI8-T', `CP850', `CP866', `CP874', `CP932', `CP949', `CP950', `CP1250', `CP1251', `CP1252', `CP1253', `CP1254', `CP1255', `CP1256', `CP1257', `GB2312', `EUC-JP', `EUC-KR', `EUC-TW', `BIG5', `BIG5-HKSCS', `GBK', `GB18030', `SHIFT_JIS', `JOHAB', `TIS-620', `VISCII', `GEORGIAN-PS', `UTF-8'. In the GNU system, the following encodings are frequently used for the corresponding languages. * `ISO-8859-1' for Afrikaans, Albanian, Basque, Breton, Catalan, Cornish, Danish, Dutch, English, Estonian, Faroese, Finnish, French, Galician, German, Greenlandic, Icelandic, Indonesian, Irish, Italian, Malay, Manx, Norwegian, Occitan, Portuguese, Spanish, Swedish, Tagalog, Uzbek, Walloon, * `ISO-8859-2' for Bosnian, Croatian, Czech, Hungarian, Polish, Romanian, Serbian, Slovak, Slovenian, * `ISO-8859-3' for Maltese, * `ISO-8859-5' for Macedonian, Serbian, * `ISO-8859-6' for Arabic, * `ISO-8859-7' for Greek, * `ISO-8859-8' for Hebrew, * `ISO-8859-9' for Turkish, * `ISO-8859-13' for Latvian, Lithuanian, Maori, * `ISO-8859-14' for Welsh, * `ISO-8859-15' for Basque, Catalan, Dutch, English, Finnish, French, Galician, German, Irish, Italian, Portuguese, Spanish, Swedish, Walloon, * `KOI8-R' for Russian, * `KOI8-U' for Ukrainian, * `KOI8-T' for Tajik, * `CP1251' for Bulgarian, Belarusian, * `GB2312', `GBK', `GB18030' for simplified writing of Chinese, * `BIG5', `BIG5-HKSCS' for traditional writing of Chinese, * `EUC-JP' for Japanese, * `EUC-KR' for Korean, * `TIS-620' for Thai, * `GEORGIAN-PS' for Georgian, * `UTF-8' for any language, including those listed above. When single quote characters or double quote characters are used in translations for your language, and your locale's encoding is one of the ISO-8859-* charsets, it is best if you create your PO files in UTF-8 encoding, instead of your locale's encoding. This is because in UTF-8 the real quote characters can be represented (single quote characters: U+2018, U+2019, double quote characters: U+201C, U+201D), whereas none of ISO-8859-* charsets has them all. Users in UTF-8 locales will see the real quote characters, whereas users in ISO-8859-* locales will see the vertical apostrophe and the vertical double quote instead (because that's what the character set conversion will transliterate them to). To enter such quote characters under X11, you can change your keyboard mapping using the `xmodmap' program. The X11 names of the quote characters are "leftsinglequotemark", "rightsinglequotemark", "leftdoublequotemark", "rightdoublequotemark", "singlelowquotemark", "doublelowquotemark". Note that only recent versions of GNU Emacs support the UTF-8 encoding: Emacs 20 with Mule-UCS, and Emacs 21. As of January 2001, XEmacs doesn't support the UTF-8 encoding. The character encoding name can be written in either upper or lower case. Usually upper case is preferred. Content-Transfer-Encoding Set this to `8bit'. Plural-Forms This field is optional. It is only needed if the PO file has plural forms. You can find them by searching for the `msgid_plural' keyword. The format of the plural forms field is described in *note Plural forms:: and *note Translating plural forms::.  File: gettext.info, Node: Updating, Next: Editing, Prev: Creating, Up: Top 7 Updating Existing PO Files **************************** * Menu: * msgmerge Invocation:: Invoking the `msgmerge' Program  File: gettext.info, Node: msgmerge Invocation, Prev: Updating, Up: Updating 7.1 Invoking the `msgmerge' Program =================================== msgmerge [OPTION] DEF.po REF.pot The `msgmerge' program merges two Uniforum style .po files together. The DEF.po file is an existing PO file with translations which will be taken over to the newly created file as long as they still match; comments will be preserved, but extracted comments and file positions will be discarded. The REF.pot file is the last created PO file with up-to-date source references but old translations, or a PO Template file (generally created by `xgettext'); any translations or comments in the file will be discarded, however dot comments and file positions will be preserved. Where an exact match cannot be found, fuzzy matching is used to produce better results. 7.1.1 Input file location ------------------------- `DEF.po' Translations referring to old sources. `REF.pot' References to the new sources. `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting `.po' file will be written relative to the current directory, though. `-C FILE' `--compendium=FILE' Specify an additional library of message translations. *Note Compendium::. This option may be specified more than once. 7.1.2 Operation mode -------------------- `-U' `--update' Update DEF.po. Do nothing if DEF.po is already up to date. 7.1.3 Output file location -------------------------- `-o FILE' `--output-file=FILE' Write output to specified file. The results are written to standard output if no output file is specified or if it is `-'. 7.1.4 Output file location in update mode ----------------------------------------- The result is written back to DEF.po. `--backup=CONTROL' Make a backup of DEF.po `--suffix=SUFFIX' Override the usual backup suffix. The version control method may be selected via the `--backup' option or through the `VERSION_CONTROL' environment variable. Here are the values: `none' `off' Never make backups (even if `--backup' is given). `numbered' `t' Make numbered backups. `existing' `nil' Make numbered backups if numbered backups for this file already exist, otherwise make simple backups. `simple' `never' Always make simple backups. The backup suffix is `~', unless set with `--suffix' or the `SIMPLE_BACKUP_SUFFIX' environment variable. 7.1.5 Operation modifiers ------------------------- `-m' `--multi-domain' Apply REF.pot to each of the domains in DEF.po. `-N' `--no-fuzzy-matching' Do not use fuzzy matching when an exact match is not found. This may speed up the operation considerably. `--previous' Keep the previous msgids of translated messages, marked with `#|', when adding the fuzzy marker to such messages. 7.1.6 Input file syntax ----------------------- `-P' `--properties-input' Assume the input files are Java ResourceBundles in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input files are NeXTstep/GNUstep localized resource files in `.strings' syntax, not in PO file syntax. 7.1.7 Output details -------------------- `--lang=CATALOGNAME' Specify the `Language' field to be used in the header entry. See *note Header Entry:: for the meaning of this field. Note: The `Language-Team' and `Plural-Forms' fields are left unchanged. If this option is not specified, the `Language' field is inferred, as best as possible, from the `Language-Team' field. `--color' `--color=WHEN' Specify whether or when to use colors and other text attributes. See *note The --color option:: for details. `--style=STYLE_FILE' Specify the CSS style rule file to use for `--color'. See *note The --style option:: for details. `--force-po' Always write an output file even if it contains no message. `-i' `--indent' Write the .po file using indented style. `--no-location' Do not write `#: FILENAME:LINE' lines. `--add-location' Generate `#: FILENAME:LINE' lines (default). `--strict' Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions. `-p' `--properties-output' Write out a Java ResourceBundle in Java `.properties' syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages. `--stringtable-output' Write out a NeXTstep/GNUstep localized resource file in `.strings' syntax. Note that this file format doesn't support plural forms. `-w NUMBER' `--width=NUMBER' Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER. `--no-wrap' Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split. `-s' `--sort-output' Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context. `-F' `--sort-by-file' Sort output by file location. 7.1.8 Informative output ------------------------ `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit. `-v' `--verbose' Increase verbosity level. `-q' `--quiet' `--silent' Suppress progress indicators.  File: gettext.info, Node: Editing, Next: Manipulating, Prev: Updating, Up: Top 8 Editing PO Files ****************** * Menu: * KBabel:: KDE's PO File Editor * Gtranslator:: GNOME's PO File Editor * PO Mode:: Emacs's PO File Editor * Compendium:: Using Translation Compendia  File: gettext.info, Node: KBabel, Next: Gtranslator, Prev: Editing, Up: Editing 8.1 KDE's PO File Editor ========================  File: gettext.info, Node: Gtranslator, Next: PO Mode, Prev: KBabel, Up: Editing 8.2 GNOME's PO File Editor ==========================  File: gettext.info, Node: PO Mode, Next: Compendium, Prev: Gtranslator, Up: Editing 8.3 Emacs's PO File Editor ========================== For those of you being the lucky users of Emacs, PO mode has been specifically created for providing a cozy environment for editing or modifying PO files. While editing a PO file, PO mode allows for the easy browsing of auxiliary and compendium PO files, as well as for following references into the set of C program sources from which PO files have been derived. It has a few special features, among which are the interactive marking of program strings as translatable, and the validation of PO files with easy repositioning to PO file lines showing errors. For the beginning, besides main PO mode commands (*note Main PO Commands::), you should know how to move between entries (*note Entry Positioning::), and how to handle untranslated entries (*note Untranslated Entries::). * Menu: * Installation:: Completing GNU `gettext' Installation * Main PO Commands:: Main Commands * Entry Positioning:: Entry Positioning * Normalizing:: Normalizing Strings in Entries * Translated Entries:: Translated Entries * Fuzzy Entries:: Fuzzy Entries * Untranslated Entries:: Untranslated Entries * Obsolete Entries:: Obsolete Entries * Modifying Translations:: Modifying Translations * Modifying Comments:: Modifying Comments * Subedit:: Mode for Editing Translations * C Sources Context:: C Sources Context * Auxiliary:: Consulting Auxiliary PO Files  File: gettext.info, Node: Installation, Next: Main PO Commands, Prev: PO Mode, Up: PO Mode 8.3.1 Completing GNU `gettext' Installation ------------------------------------------- Once you have received, unpacked, configured and compiled the GNU `gettext' distribution, the `make install' command puts in place the programs `xgettext', `msgfmt', `gettext', and `msgmerge', as well as their available message catalogs. To top off a comfortable installation, you might also want to make the PO mode available to your Emacs users. During the installation of the PO mode, you might want to modify your file `.emacs', once and for all, so it contains a few lines looking like: (setq auto-mode-alist (cons '("\\.po\\'\\|\\.po\\." . po-mode) auto-mode-alist)) (autoload 'po-mode "po-mode" "Major mode for translators to edit PO files" t) Later, whenever you edit some `.po' file, or any file having the string `.po.' within its name, Emacs loads `po-mode.elc' (or `po-mode.el') as needed, and automatically activates PO mode commands for the associated buffer. The string _PO_ appears in the mode line for any buffer for which PO mode is active. Many PO files may be active at once in a single Emacs session. If you are using Emacs version 20 or newer, and have already installed the appropriate international fonts on your system, you may also tell Emacs how to determine automatically the coding system of every PO file. This will often (but not always) cause the necessary fonts to be loaded and used for displaying the translations on your Emacs screen. For this to happen, add the lines: (modify-coding-system-alist 'file "\\.po\\'\\|\\.po\\." 'po-find-file-coding-system) (autoload 'po-find-file-coding-system "po-mode") to your `.emacs' file. If, with this, you still see boxes instead of international characters, try a different font set (via Shift Mouse button 1).  File: gettext.info, Node: Main PO Commands, Next: Entry Positioning, Prev: Installation, Up: PO Mode 8.3.2 Main PO mode Commands --------------------------- After setting up Emacs with something similar to the lines in *note Installation::, PO mode is activated for a window when Emacs finds a PO file in that window. This puts the window read-only and establishes a po-mode-map, which is a genuine Emacs mode, in a way that is not derived from text mode in any way. Functions found on `po-mode-hook', if any, will be executed. When PO mode is active in a window, the letters `PO' appear in the mode line for that window. The mode line also displays how many entries of each kind are held in the PO file. For example, the string `132t+3f+10u+2o' would tell the translator that the PO mode contains 132 translated entries (*note Translated Entries::, 3 fuzzy entries (*note Fuzzy Entries::), 10 untranslated entries (*note Untranslated Entries::) and 2 obsolete entries (*note Obsolete Entries::). Zero-coefficients items are not shown. So, in this example, if the fuzzy entries were unfuzzied, the untranslated entries were translated and the obsolete entries were deleted, the mode line would merely display `145t' for the counters. The main PO commands are those which do not fit into the other categories of subsequent sections. These allow for quitting PO mode or for managing windows in special ways. `_' Undo last modification to the PO file (`po-undo'). `Q' Quit processing and save the PO file (`po-quit'). `q' Quit processing, possibly after confirmation (`po-confirm-and-quit'). `0' Temporary leave the PO file window (`po-other-window'). `?' `h' Show help about PO mode (`po-help'). `=' Give some PO file statistics (`po-statistics'). `V' Batch validate the format of the whole PO file (`po-validate'). The command `_' (`po-undo') interfaces to the Emacs _undo_ facility. *Note Undoing Changes: (emacs)Undo. Each time `_' is typed, modifications which the translator did to the PO file are undone a little more. For the purpose of undoing, each PO mode command is atomic. This is especially true for the `<RET>' command: the whole edition made by using a single use of this command is undone at once, even if the edition itself implied several actions. However, while in the editing window, one can undo the edition work quite parsimoniously. The commands `Q' (`po-quit') and `q' (`po-confirm-and-quit') are used when the translator is done with the PO file. The former is a bit less verbose than the latter. If the file has been modified, it is saved to disk first. In both cases, and prior to all this, the commands check if any untranslated messages remain in the PO file and, if so, the translator is asked if she really wants to leave off working with this PO file. This is the preferred way of getting rid of an Emacs PO file buffer. Merely killing it through the usual command `C-x k' (`kill-buffer') is not the tidiest way to proceed. The command `0' (`po-other-window') is another, softer way, to leave PO mode, temporarily. It just moves the cursor to some other Emacs window, and pops one if necessary. For example, if the translator just got PO mode to show some source context in some other, she might discover some apparent bug in the program source that needs correction. This command allows the translator to change sex, become a programmer, and have the cursor right into the window containing the program she (or rather _he_) wants to modify. By later getting the cursor back in the PO file window, or by asking Emacs to edit this file once again, PO mode is then recovered. The command `h' (`po-help') displays a summary of all available PO mode commands. The translator should then type any character to resume normal PO mode operations. The command `?' has the same effect as `h'. The command `=' (`po-statistics') computes the total number of entries in the PO file, the ordinal of the current entry (counted from 1), the number of untranslated entries, the number of obsolete entries, and displays all these numbers. The command `V' (`po-validate') launches `msgfmt' in checking and verbose mode over the current PO file. This command first offers to save the current PO file on disk. The `msgfmt' tool, from GNU `gettext', has the purpose of creating a MO file out of a PO file, and PO mode uses the features of this program for checking the overall format of a PO file, as well as all individual entries. The program `msgfmt' runs asynchronously with Emacs, so the translator regains control immediately while her PO file is being studied. Error output is collected in the Emacs `*compilation*' buffer, displayed in another window. The regular Emacs command `C-x`' (`next-error'), as well as other usual compile commands, allow the translator to reposition quickly to the offending parts of the PO file. Once the cursor is on the line in error, the translator may decide on any PO mode action which would help correcting the error.  File: gettext.info, Node: Entry Positioning, Next: Normalizing, Prev: Main PO Commands, Up: PO Mode 8.3.3 Entry Positioning ----------------------- The cursor in a PO file window is almost always part of an entry. The only exceptions are the special case when the cursor is after the last entry in the file, or when the PO file is empty. The entry where the cursor is found to be is said to be the current entry. Many PO mode commands operate on the current entry, so moving the cursor does more than allowing the translator to browse the PO file, this also selects on which entry commands operate. Some PO mode commands alter the position of the cursor in a specialized way. A few of those special purpose positioning are described here, the others are described in following sections (for a complete list try `C-h m'): `.' Redisplay the current entry (`po-current-entry'). `n' Select the entry after the current one (`po-next-entry'). `p' Select the entry before the current one (`po-previous-entry'). `<' Select the first entry in the PO file (`po-first-entry'). `>' Select the last entry in the PO file (`po-last-entry'). `m' Record the location of the current entry for later use (`po-push-location'). `r' Return to a previously saved entry location (`po-pop-location'). `x' Exchange the current entry location with the previously saved one (`po-exchange-location'). Any Emacs command able to reposition the cursor may be used to select the current entry in PO mode, including commands which move by characters, lines, paragraphs, screens or pages, and search commands. However, there is a kind of standard way to display the current entry in PO mode, which usual Emacs commands moving the cursor do not especially try to enforce. The command `.' (`po-current-entry') has the sole purpose of redisplaying the current entry properly, after the current entry has been changed by means external to PO mode, or the Emacs screen otherwise altered. It is yet to be decided if PO mode helps the translator, or otherwise irritates her, by forcing a rigid window disposition while she is doing her work. We originally had quite precise ideas about how windows should behave, but on the other hand, anyone used to Emacs is often happy to keep full control. Maybe a fixed window disposition might be offered as a PO mode option that the translator might activate or deactivate at will, so it could be offered on an experimental basis. If nobody feels a real need for using it, or a compulsion for writing it, we should drop this whole idea. The incentive for doing it should come from translators rather than programmers, as opinions from an experienced translator are surely more worth to me than opinions from programmers _thinking_ about how _others_ should do translation. The commands `n' (`po-next-entry') and `p' (`po-previous-entry') move the cursor the entry following, or preceding, the current one. If `n' is given while the cursor is on the last entry of the PO file, or if `p' is given while the cursor is on the first entry, no move is done. The commands `<' (`po-first-entry') and `>' (`po-last-entry') move the cursor to the first entry, or last entry, of the PO file. When the cursor is located past the last entry in a PO file, most PO mode commands will return an error saying `After last entry'. Moreover, the commands `<' and `>' have the special property of being able to work even when the cursor is not into some PO file entry, and one may use them for nicely correcting this situation. But even these commands will fail on a truly empty PO file. There are development plans for the PO mode for it to interactively fill an empty PO file from sources. *Note Marking::. The translator may decide, before working at the translation of a particular entry, that she needs to browse the remainder of the PO file, maybe for finding the terminology or phraseology used in related entries. She can of course use the standard Emacs idioms for saving the current cursor location in some register, and use that register for getting back, or else, use the location ring. PO mode offers another approach, by which cursor locations may be saved onto a special stack. The command `m' (`po-push-location') merely adds the location of current entry to the stack, pushing the already saved locations under the new one. The command `r' (`po-pop-location') consumes the top stack element and repositions the cursor to the entry associated with that top element. This position is then lost, for the next `r' will move the cursor to the previously saved location, and so on until no locations remain on the stack. If the translator wants the position to be kept on the location stack, maybe for taking a look at the entry associated with the top element, then go elsewhere with the intent of getting back later, she ought to use `m' immediately after `r'. The command `x' (`po-exchange-location') simultaneously repositions the cursor to the entry associated with the top element of the stack of saved locations, and replaces that top element with the location of the current entry before the move. Consequently, repeating the `x' command toggles alternatively between two entries. For achieving this, the translator will position the cursor on the first entry, use `m', then position to the second entry, and merely use `x' for making the switch.  File: gettext.info, Node: Normalizing, Next: Translated Entries, Prev: Entry Positioning, Up: PO Mode 8.3.4 Normalizing Strings in Entries ------------------------------------ There are many different ways for encoding a particular string into a PO file entry, because there are so many different ways to split and quote multi-line strings, and even, to represent special characters by backslashed escaped sequences. Some features of PO mode rely on the ability for PO mode to scan an already existing PO file for a particular string encoded into the `msgid' field of some entry. Even if PO mode has internally all the built-in machinery for implementing this recognition easily, doing it fast is technically difficult. To facilitate a solution to this efficiency problem, we decided on a canonical representation for strings. A conventional representation of strings in a PO file is currently under discussion, and PO mode experiments with a canonical representation. Having both `xgettext' and PO mode converging towards a uniform way of representing equivalent strings would be useful, as the internal normalization needed by PO mode could be automatically satisfied when using `xgettext' from GNU `gettext'. An explicit PO mode normalization should then be only necessary for PO files imported from elsewhere, or for when the convention itself evolves. So, for achieving normalization of at least the strings of a given PO file needing a canonical representation, the following PO mode command is available: `M-x po-normalize' Tidy the whole PO file by making entries more uniform. The special command `M-x po-normalize', which has no associated keys, revises all entries, ensuring that strings of both original and translated entries use uniform internal quoting in the PO file. It also removes any crumb after the last entry. This command may be useful for PO files freshly imported from elsewhere, or if we ever improve on the canonical quoting format we use. This canonical format is not only meant for getting cleaner PO files, but also for greatly speeding up `msgid' string lookup for some other PO mode commands. `M-x po-normalize' presently makes three passes over the entries. The first implements heuristics for converting PO files for GNU `gettext' 0.6 and earlier, in which `msgid' and `msgstr' fields were using K&R style C string syntax for multi-line strings. These heuristics may fail for comments not related to obsolete entries and ending with a backslash; they also depend on subsequent passes for finalizing the proper commenting of continued lines for obsolete entries. This first pass might disappear once all oldish PO files would have been adjusted. The second and third pass normalize all `msgid' and `msgstr' strings respectively. They also clean out those trailing backslashes used by XView's `msgfmt' for continued lines. Having such an explicit normalizing command allows for importing PO files from other sources, but also eases the evolution of the current convention, evolution driven mostly by aesthetic concerns, as of now. It is easy to make suggested adjustments at a later time, as the normalizing command and eventually, other GNU `gettext' tools should greatly automate conformance. A description of the canonical string format is given below, for the particular benefit of those not having Emacs handy, and who would nevertheless want to handcraft their PO files in nice ways. Right now, in PO mode, strings are single line or multi-line. A string goes multi-line if and only if it has _embedded_ newlines, that is, if it matches `[^\n]\n+[^\n]'. So, we would have: msgstr "\n\nHello, world!\n\n\n" but, replacing the space by a newline, this becomes: msgstr "" "\n" "\n" "Hello,\n" "world!\n" "\n" "\n" We are deliberately using a caricatural example, here, to make the point clearer. Usually, multi-lines are not that bad looking. It is probable that we will implement the following suggestion. We might lump together all initial newlines into the empty string, and also all newlines introducing empty lines (that is, for N > 1, the N-1'th last newlines would go together on a separate string), so making the previous example appear: msgstr "\n\n" "Hello,\n" "world!\n" "\n\n" There are a few yet undecided little points about string normalization, to be documented in this manual, once these questions settle.  File: gettext.info, Node: Translated Entries, Next: Fuzzy Entries, Prev: Normalizing, Up: PO Mode 8.3.5 Translated Entries ------------------------ Each PO file entry for which the `msgstr' field has been filled with a translation, and which is not marked as fuzzy (*note Fuzzy Entries::), is said to be a "translated" entry. Only translated entries will later be compiled by GNU `msgfmt' and become usable in programs. Other entry types will be excluded; translation will not occur for them. Some commands are more specifically related to translated entry processing. `t' Find the next translated entry (`po-next-translated-entry'). `T' Find the previous translated entry (`po-previous-translated-entry'). The commands `t' (`po-next-translated-entry') and `T' (`po-previous-translated-entry') move forwards or backwards, chasing for an translated entry. If none is found, the search is extended and wraps around in the PO file buffer. Translated entries usually result from the translator having edited in a translation for them, *note Modifying Translations::. However, if the variable `po-auto-fuzzy-on-edit' is not `nil', the entry having received a new translation first becomes a fuzzy entry, which ought to be later unfuzzied before becoming an official, genuine translated entry. *Note Fuzzy Entries::.  File: gettext.info, Node: Fuzzy Entries, Next: Untranslated Entries, Prev: Translated Entries, Up: PO Mode 8.3.6 Fuzzy Entries ------------------- Each PO file entry may have a set of "attributes", which are qualities given a name and explicitly associated with the translation, using a special system comment. One of these attributes has the name `fuzzy', and entries having this attribute are said to have a fuzzy translation. They are called fuzzy entries, for short. Fuzzy entries, even if they account for translated entries for most other purposes, usually call for revision by the translator. Those may be produced by applying the program `msgmerge' to update an older translated PO files according to a new PO template file, when this tool hypothesises that some new `msgid' has been modified only slightly out of an older one, and chooses to pair what it thinks to be the old translation for the new modified entry. The slight alteration in the original string (the `msgid' string) should often be reflected in the translated string, and this requires the intervention of the translator. For this reason, `msgmerge' might mark some entries as being fuzzy. Also, the translator may decide herself to mark an entry as fuzzy for her own convenience, when she wants to remember that the entry has to be later revisited. So, some commands are more specifically related to fuzzy entry processing. `f' Find the next fuzzy entry (`po-next-fuzzy-entry'). `F' Find the previous fuzzy entry (`po-previous-fuzzy-entry'). `<TAB>' Remove the fuzzy attribute of the current entry (`po-unfuzzy'). The commands `f' (`po-next-fuzzy-entry') and `F' (`po-previous-fuzzy-entry') move forwards or backwards, chasing for a fuzzy entry. If none is found, the search is extended and wraps around in the PO file buffer. The command `<TAB>' (`po-unfuzzy') removes the fuzzy attribute associated with an entry, usually leaving it translated. Further, if the variable `po-auto-select-on-unfuzzy' has not the `nil' value, the `<TAB>' command will automatically chase for another interesting entry to work on. The initial value of `po-auto-select-on-unfuzzy' is `nil'. The initial value of `po-auto-fuzzy-on-edit' is `nil'. However, if the variable `po-auto-fuzzy-on-edit' is set to `t', any entry edited through the `<RET>' command is marked fuzzy, as a way to ensure some kind of double check, later. In this case, the usual paradigm is that an entry becomes fuzzy (if not already) whenever the translator modifies it. If she is satisfied with the translation, she then uses `<TAB>' to pick another entry to work on, clearing the fuzzy attribute on the same blow. If she is not satisfied yet, she merely uses `<SPC>' to chase another entry, leaving the entry fuzzy. The translator may also use the `<DEL>' command (`po-fade-out-entry') over any translated entry to mark it as being fuzzy, when she wants to easily leave a trace she wants to later return working at this entry. Also, when time comes to quit working on a PO file buffer with the `q' command, the translator is asked for confirmation, if fuzzy string still exists.  File: gettext.info, Node: Untranslated Entries, Next: Obsolete Entries, Prev: Fuzzy Entries, Up: PO Mode 8.3.7 Untranslated Entries -------------------------- When `xgettext' originally creates a PO file, unless told otherwise, it initializes the `msgid' field with the untranslated string, and leaves the `msgstr' string to be empty. Such entries, having an empty translation, are said to be "untranslated" entries. Later, when the programmer slightly modifies some string right in the program, this change is later reflected in the PO file by the appearance of a new untranslated entry for the modified string. The usual commands moving from entry to entry consider untranslated entries on the same level as active entries. Untranslated entries are easily recognizable by the fact they end with `msgstr ""'. The work of the translator might be (quite naively) seen as the process of seeking for an untranslated entry, editing a translation for it, and repeating these actions until no untranslated entries remain. Some commands are more specifically related to untranslated entry processing. `u' Find the next untranslated entry (`po-next-untranslated-entry'). `U' Find the previous untranslated entry (`po-previous-untransted-entry'). `k' Turn the current entry into an untranslated one (`po-kill-msgstr'). The commands `u' (`po-next-untranslated-entry') and `U' (`po-previous-untransted-entry') move forwards or backwards, chasing for an untranslated entry. If none is found, the search is extended and wraps around in the PO file buffer. An entry can be turned back into an untranslated entry by merely emptying its translation, using the command `k' (`po-kill-msgstr'). *Note Modifying Translations::. Also, when time comes to quit working on a PO file buffer with the `q' command, the translator is asked for confirmation, if some untranslated string still exists.  File: gettext.info, Node: Obsolete Entries, Next: Modifying Translations, Prev: Untranslated Entries, Up: PO Mode 8.3.8 Obsolete Entries ---------------------- By "obsolete" PO file entries, we mean those entries which are commented out, usually by `msgmerge' when it found that the translation is not needed anymore by the package being localized. The usual commands moving from entry to entry consider obsolete entries on the same level as active entries. Obsolete entries are easily recognizable by the fact that all their lines start with `#', even those lines containing `msgid' or `msgstr'. Commands exist for emptying the translation or reinitializing it to the original untranslated string. Commands interfacing with the kill ring may force some previously saved text into the translation. The user may interactively edit the translation. All these commands may apply to obsolete entries, carefully leaving the entry obsolete after the fact. Moreover, some commands are more specifically related to obsolete entry processing. `o' Find the next obsolete entry (`po-next-obsolete-entry'). `O' Find the previous obsolete entry (`po-previous-obsolete-entry'). `<DEL>' Make an active entry obsolete, or zap out an obsolete entry (`po-fade-out-entry'). The commands `o' (`po-next-obsolete-entry') and `O' (`po-previous-obsolete-entry') move forwards or backwards, chasing for an obsolete entry. If none is found, the search is extended and wraps around in the PO file buffer. PO mode does not provide ways for un-commenting an obsolete entry and making it active, because this would reintroduce an original untranslated string which does not correspond to any marked string in the program sources. This goes with the philosophy of never introducing useless `msgid' values. However, it is possible to comment out an active entry, so making it obsolete. GNU `gettext' utilities will later react to the disappearance of a translation by using the untranslated string. The command `<DEL>' (`po-fade-out-entry') pushes the current entry a little further towards annihilation. If the entry is active (it is a translated entry), then it is first made fuzzy. If it is already fuzzy, then the entry is merely commented out, with confirmation. If the entry is already obsolete, then it is completely deleted from the PO file. It is easy to recycle the translation so deleted into some other PO file entry, usually one which is untranslated. *Note Modifying Translations::. Here is a quite interesting problem to solve for later development of PO mode, for those nights you are not sleepy. The idea would be that PO mode might become bright enough, one of these days, to make good guesses at retrieving the most probable candidate, among all obsolete entries, for initializing the translation of a newly appeared string. I think it might be a quite hard problem to do this algorithmically, as we have to develop good and efficient measures of string similarity. Right now, PO mode completely lets the decision to the translator, when the time comes to find the adequate obsolete translation, it merely tries to provide handy tools for helping her to do so.  File: gettext.info, Node: Modifying Translations, Next: Modifying Comments, Prev: Obsolete Entries, Up: PO Mode 8.3.9 Modifying Translations ---------------------------- PO mode prevents direct modification of the PO file, by the usual means Emacs gives for altering a buffer's contents. By doing so, it pretends helping the translator to avoid little clerical errors about the overall file format, or the proper quoting of strings, as those errors would be easily made. Other kinds of errors are still possible, but some may be caught and diagnosed by the batch validation process, which the translator may always trigger by the `V' command. For all other errors, the translator has to rely on her own judgment, and also on the linguistic reports submitted to her by the users of the translated package, having the same mother tongue. When the time comes to create a translation, correct an error diagnosed mechanically or reported by a user, the translators have to resort to using the following commands for modifying the translations. `<RET>' Interactively edit the translation (`po-edit-msgstr'). `<LFD>' `C-j' Reinitialize the translation with the original, untranslated string (`po-msgid-to-msgstr'). `k' Save the translation on the kill ring, and delete it (`po-kill-msgstr'). `w' Save the translation on the kill ring, without deleting it (`po-kill-ring-save-msgstr'). `y' Replace the translation, taking the new from the kill ring (`po-yank-msgstr'). The command `<RET>' (`po-edit-msgstr') opens a new Emacs window meant to edit in a new translation, or to modify an already existing translation. The new window contains a copy of the translation taken from the current PO file entry, all ready for edition, expunged of all quoting marks, fully modifiable and with the complete extent of Emacs modifying commands. When the translator is done with her modifications, she may use `C-c C-c' to close the subedit window with the automatically requoted results, or `C-c C-k' to abort her modifications. *Note Subedit::, for more information. The command `<LFD>' (`po-msgid-to-msgstr') initializes, or reinitializes the translation with the original string. This command is normally used when the translator wants to redo a fresh translation of the original string, disregarding any previous work. It is possible to arrange so, whenever editing an untranslated entry, the `<LFD>' command be automatically executed. If you set `po-auto-edit-with-msgid' to `t', the translation gets initialised with the original string, in case none exists already. The default value for `po-auto-edit-with-msgid' is `nil'. In fact, whether it is best to start a translation with an empty string, or rather with a copy of the original string, is a matter of taste or habit. Sometimes, the source language and the target language are so different that is simply best to start writing on an empty page. At other times, the source and target languages are so close that it would be a waste to retype a number of words already being written in the original string. A translator may also like having the original string right under her eyes, as she will progressively overwrite the original text with the translation, even if this requires some extra editing work to get rid of the original. The command `k' (`po-kill-msgstr') merely empties the translation string, so turning the entry into an untranslated one. But while doing so, its previous contents is put apart in a special place, known as the kill ring. The command `w' (`po-kill-ring-save-msgstr') has also the effect of taking a copy of the translation onto the kill ring, but it otherwise leaves the entry alone, and does _not_ remove the translation from the entry. Both commands use exactly the Emacs kill ring, which is shared between buffers, and which is well known already to Emacs lovers. The translator may use `k' or `w' many times in the course of her work, as the kill ring may hold several saved translations. From the kill ring, strings may later be reinserted in various Emacs buffers. In particular, the kill ring may be used for moving translation strings between different entries of a single PO file buffer, or if the translator is handling many such buffers at once, even between PO files. To facilitate exchanges with buffers which are not in PO mode, the translation string put on the kill ring by the `k' command is fully unquoted before being saved: external quotes are removed, multi-line strings are concatenated, and backslash escaped sequences are turned into their corresponding characters. In the special case of obsolete entries, the translation is also uncommented prior to saving. The command `y' (`po-yank-msgstr') completely replaces the translation of the current entry by a string taken from the kill ring. Following Emacs terminology, we then say that the replacement string is "yanked" into the PO file buffer. *Note Yanking: (emacs)Yanking. The first time `y' is used, the translation receives the value of the most recent addition to the kill ring. If `y' is typed once again, immediately, without intervening keystrokes, the translation just inserted is taken away and replaced by the second most recent addition to the kill ring. By repeating `y' many times in a row, the translator may travel along the kill ring for saved strings, until she finds the string she really wanted. When a string is yanked into a PO file entry, it is fully and automatically requoted for complying with the format PO files should have. Further, if the entry is obsolete, PO mode then appropriately push the inserted string inside comments. Once again, translators should not burden themselves with quoting considerations besides, of course, the necessity of the translated string itself respective to the program using it. Note that `k' or `w' are not the only commands pushing strings on the kill ring, as almost any PO mode command replacing translation strings (or the translator comments) automatically saves the old string on the kill ring. The main exceptions to this general rule are the yanking commands themselves. To better illustrate the operation of killing and yanking, let's use an actual example, taken from a common situation. When the programmer slightly modifies some string right in the program, his change is later reflected in the PO file by the appearance of a new untranslated entry for the modified string, and the fact that the entry translating the original or unmodified string becomes obsolete. In many cases, the translator might spare herself some work by retrieving the unmodified translation from the obsolete entry, then initializing the untranslated entry `msgstr' field with this retrieved translation. Once this done, the obsolete entry is not wanted anymore, and may be safely deleted. When the translator finds an untranslated entry and suspects that a slight variant of the translation exists, she immediately uses `m' to mark the current entry location, then starts chasing obsolete entries with `o', hoping to find some translation corresponding to the unmodified string. Once found, she uses the `<DEL>' command for deleting the obsolete entry, knowing that `<DEL>' also _kills_ the translation, that is, pushes the translation on the kill ring. Then, `r' returns to the initial untranslated entry, and `y' then _yanks_ the saved translation right into the `msgstr' field. The translator is then free to use `<RET>' for fine tuning the translation contents, and maybe to later use `u', then `m' again, for going on with the next untranslated string. When some sequence of keys has to be typed over and over again, the translator may find it useful to become better acquainted with the Emacs capability of learning these sequences and playing them back under request. *Note Keyboard Macros: (emacs)Keyboard Macros.  File: gettext.info, Node: Modifying Comments, Next: Subedit, Prev: Modifying Translations, Up: PO Mode 8.3.10 Modifying Comments ------------------------- Any translation work done seriously will raise many linguistic difficulties, for which decisions have to be made, and the choices further documented. These documents may be saved within the PO file in form of translator comments, which the translator is free to create, delete, or modify at will. These comments may be useful to herself when she returns to this PO file after a while. Comments not having whitespace after the initial `#', for example, those beginning with `#.' or `#:', are _not_ translator comments, they are exclusively created by other `gettext' tools. So, the commands below will never alter such system added comments, they are not meant for the translator to modify. *Note PO Files::. The following commands are somewhat similar to those modifying translations, so the general indications given for those apply here. *Note Modifying Translations::. `#' Interactively edit the translator comments (`po-edit-comment'). `K' Save the translator comments on the kill ring, and delete it (`po-kill-comment'). `W' Save the translator comments on the kill ring, without deleting it (`po-kill-ring-save-comment'). `Y' Replace the translator comments, taking the new from the kill ring (`po-yank-comment'). These commands parallel PO mode commands for modifying the translation strings, and behave much the same way as they do, except that they handle this part of PO file comments meant for translator usage, rather than the translation strings. So, if the descriptions given below are slightly succinct, it is because the full details have already been given. *Note Modifying Translations::. The command `#' (`po-edit-comment') opens a new Emacs window containing a copy of the translator comments on the current PO file entry. If there are no such comments, PO mode understands that the translator wants to add a comment to the entry, and she is presented with an empty screen. Comment marks (`#') and the space following them are automatically removed before edition, and reinstated after. For translator comments pertaining to obsolete entries, the uncommenting and recommenting operations are done twice. Once in the editing window, the keys `C-c C-c' allow the translator to tell she is finished with editing the comment. *Note Subedit::, for further details. Functions found on `po-subedit-mode-hook', if any, are executed after the string has been inserted in the edit buffer. The command `K' (`po-kill-comment') gets rid of all translator comments, while saving those comments on the kill ring. The command `W' (`po-kill-ring-save-comment') takes a copy of the translator comments on the kill ring, but leaves them undisturbed in the current entry. The command `Y' (`po-yank-comment') completely replaces the translator comments by a string taken at the front of the kill ring. When this command is immediately repeated, the comments just inserted are withdrawn, and replaced by other strings taken along the kill ring. On the kill ring, all strings have the same nature. There is no distinction between _translation_ strings and _translator comments_ strings. So, for example, let's presume the translator has just finished editing a translation, and wants to create a new translator comment to document why the previous translation was not good, just to remember what was the problem. Foreseeing that she will do that in her documentation, the translator may want to quote the previous translation in her translator comments. To do so, she may initialize the translator comments with the previous translation, still at the head of the kill ring. Because editing already pushed the previous translation on the kill ring, she merely has to type `M-w' prior to `#', and the previous translation will be right there, all ready for being introduced by some explanatory text. On the other hand, presume there are some translator comments already and that the translator wants to add to those comments, instead of wholly replacing them. Then, she should edit the comment right away with `#'. Once inside the editing window, she can use the regular Emacs commands `C-y' (`yank') and `M-y' (`yank-pop') to get the previous translation where she likes.  File: gettext.info, Node: Subedit, Next: C Sources Context, Prev: Modifying Comments, Up: PO Mode 8.3.11 Details of Sub Edition ----------------------------- The PO subedit minor mode has a few peculiarities worth being described in fuller detail. It installs a few commands over the usual editing set of Emacs, which are described below. `C-c C-c' Complete edition (`po-subedit-exit'). `C-c C-k' Abort edition (`po-subedit-abort'). `C-c C-a' Consult auxiliary PO files (`po-subedit-cycle-auxiliary'). The window's contents represents a translation for a given message, or a translator comment. The translator may modify this window to her heart's content. Once this is done, the command `C-c C-c' (`po-subedit-exit') may be used to return the edited translation into the PO file, replacing the original translation, even if it moved out of sight or if buffers were switched. If the translator becomes unsatisfied with her translation or comment, to the extent she prefers keeping what was existent prior to the `<RET>' or `#' command, she may use the command `C-c C-k' (`po-subedit-abort') to merely get rid of edition, while preserving the original translation or comment. Another way would be for her to exit normally with `C-c C-c', then type `U' once for undoing the whole effect of last edition. The command `C-c C-a' (`po-subedit-cycle-auxiliary') allows for glancing through translations already achieved in other languages, directly while editing the current translation. This may be quite convenient when the translator is fluent at many languages, but of course, only makes sense when such completed auxiliary PO files are already available to her (*note Auxiliary::). Functions found on `po-subedit-mode-hook', if any, are executed after the string has been inserted in the edit buffer. While editing her translation, the translator should pay attention to not inserting unwanted `<RET>' (newline) characters at the end of the translated string if those are not meant to be there, or to removing such characters when they are required. Since these characters are not visible in the editing buffer, they are easily introduced by mistake. To help her, `<RET>' automatically puts the character `<' at the end of the string being edited, but this `<' is not really part of the string. On exiting the editing window with `C-c C-c', PO mode automatically removes such `<' and all whitespace added after it. If the translator adds characters after the terminating `<', it looses its delimiting property and integrally becomes part of the string. If she removes the delimiting `<', then the edited string is taken _as is_, with all trailing newlines, even if invisible. Also, if the translated string ought to end itself with a genuine `<', then the delimiting `<' may not be removed; so the string should appear, in the editing window, as ending with two `<' in a row. When a translation (or a comment) is being edited, the translator may move the cursor back into the PO file buffer and freely move to other entries, browsing at will. If, with an edition pending, the translator wanders in the PO file buffer, she may decide to start modifying another entry. Each entry being edited has its own subedit buffer. It is possible to simultaneously edit the translation _and_ the comment of a single entry, or to edit entries in different PO files, all at once. Typing `<RET>' on a field already being edited merely resumes that particular edit. Yet, the translator should better be comfortable at handling many Emacs windows! Pending subedits may be completed or aborted in any order, regardless of how or when they were started. When many subedits are pending and the translator asks for quitting the PO file (with the `q' command), subedits are automatically resumed one at a time, so she may decide for each of them.  File: gettext.info, Node: C Sources Context, Next: Auxiliary, Prev: Subedit, Up: PO Mode 8.3.12 C Sources Context ------------------------ PO mode is particularly powerful when used with PO files created through GNU `gettext' utilities, as those utilities insert special comments in the PO files they generate. Some of these special comments relate the PO file entry to exactly where the untranslated string appears in the program sources. When the translator gets to an untranslated entry, she is fairly often faced with an original string which is not as informative as it normally should be, being succinct, cryptic, or otherwise ambiguous. Before choosing how to translate the string, she needs to understand better what the string really means and how tight the translation has to be. Most of the time, when problems arise, the only way left to make her judgment is looking at the true program sources from where this string originated, searching for surrounding comments the programmer might have put in there, and looking around for helping clues of _any_ kind. Surely, when looking at program sources, the translator will receive more help if she is a fluent programmer. However, even if she is not versed in programming and feels a little lost in C code, the translator should not be shy at taking a look, once in a while. It is most probable that she will still be able to find some of the hints she needs. She will learn quickly to not feel uncomfortable in program code, paying more attention to programmer's comments, variable and function names (if he dared choosing them well), and overall organization, than to the program code itself. The following commands are meant to help the translator at getting program source context for a PO file entry. `s' Resume the display of a program source context, or cycle through them (`po-cycle-source-reference'). `M-s' Display of a program source context selected by menu (`po-select-source-reference'). `S' Add a directory to the search path for source files (`po-consider-source-path'). `M-S' Delete a directory from the search path for source files (`po-ignore-source-path'). The commands `s' (`po-cycle-source-reference') and `M-s' (`po-select-source-reference') both open another window displaying some source program file, and already positioned in such a way that it shows an actual use of the string to be translated. By doing so, the command gives source program context for the string. But if the entry has no source context references, or if all references are unresolved along the search path for program sources, then the command diagnoses this as an error. Even if `s' (or `M-s') opens a new window, the cursor stays in the PO file window. If the translator really wants to get into the program source window, she ought to do it explicitly, maybe by using command `O'. When `s' is typed for the first time, or for a PO file entry which is different of the last one used for getting source context, then the command reacts by giving the first context available for this entry, if any. If some context has already been recently displayed for the current PO file entry, and the translator wandered off to do other things, typing `s' again will merely resume, in another window, the context last displayed. In particular, if the translator moved the cursor away from the context in the source file, the command will bring the cursor back to the context. By using `s' many times in a row, with no other commands intervening, PO mode will cycle to the next available contexts for this particular entry, getting back to the first context once the last has been shown. The command `M-s' behaves differently. Instead of cycling through references, it lets the translator choose a particular reference among many, and displays that reference. It is best used with completion, if the translator types `<TAB>' immediately after `M-s', in response to the question, she will be offered a menu of all possible references, as a reminder of which are the acceptable answers. This command is useful only where there are really many contexts available for a single string to translate. Program source files are usually found relative to where the PO file stands. As a special provision, when this fails, the file is also looked for, but relative to the directory immediately above it. Those two cases take proper care of most PO files. However, it might happen that a PO file has been moved, or is edited in a different place than its normal location. When this happens, the translator should tell PO mode in which directory normally sits the genuine PO file. Many such directories may be specified, and all together, they constitute what is called the "search path" for program sources. The command `S' (`po-consider-source-path') is used to interactively enter a new directory at the front of the search path, and the command `M-S' (`po-ignore-source-path') is used to select, with completion, one of the directories she does not want anymore on the search path.  File: gettext.info, Node: Auxiliary, Prev: C Sources Context, Up: PO Mode 8.3.13 Consulting Auxiliary PO Files ------------------------------------ PO mode is able to help the knowledgeable translator, being fluent in many languages, at taking advantage of translations already achieved in other languages she just happens to know. It provides these other language translations as additional context for her own work. Moreover, it has features to ease the production of translations for many languages at once, for translators preferring to work in this way. An "auxiliary" PO file is an existing PO file meant for the same package the translator is working on, but targeted to a different mother tongue language. Commands exist for declaring and handling auxiliary PO files, and also for showing contexts for the entry under work. Here are the auxiliary file commands available in PO mode. `a' Seek auxiliary files for another translation for the same entry (`po-cycle-auxiliary'). `C-c C-a' Switch to a particular auxiliary file (`po-select-auxiliary'). `A' Declare this PO file as an auxiliary file (`po-consider-as-auxiliary'). `M-A' Remove this PO file from the list of auxiliary files (`po-ignore-as-auxiliary'). Command `A' (`po-consider-as-auxiliary') adds the current PO file to the list of auxiliary files, while command `M-A' (`po-ignore-as-auxiliary' just removes it. The command `a' (`po-cycle-auxiliary') seeks all auxiliary PO files, round-robin, searching for a translated entry in some other language having an `msgid' field identical as the one for the current entry. The found PO file, if any, takes the place of the current PO file in the display (its window gets on top). Before doing so, the current PO file is also made into an auxiliary file, if not already. So, `a' in this newly displayed PO file will seek another PO file, and so on, so repeating `a' will eventually yield back the original PO file. The command `C-c C-a' (`po-select-auxiliary') asks the translator for her choice of a particular auxiliary file, with completion, and then switches to that selected PO file. The command also checks if the selected file has an `msgid' field identical as the one for the current entry, and if yes, this entry becomes current. Otherwise, the cursor of the selected file is left undisturbed. For all this to work fully, auxiliary PO files will have to be normalized, in that way that `msgid' fields should be written _exactly_ the same way. It is possible to write `msgid' fields in various ways for representing the same string, different writing would break the proper behaviour of the auxiliary file commands of PO mode. This is not expected to be much a problem in practice, as most existing PO files have their `msgid' entries written by the same GNU `gettext' tools. However, PO files initially created by PO mode itself, while marking strings in source files, are normalised differently. So are PO files resulting of the `M-x normalize' command. Until these discrepancies between PO mode and other GNU `gettext' tools get fully resolved, the translator should stay aware of normalisation issues.  File: gettext.info, Node: Compendium, Prev: PO Mode, Up: Editing 8.4 Using Translation Compendia =============================== A "compendium" is a special PO file containing a set of translations recurring in many different packages. The translator can use gettext tools to build a new compendium, to add entries to her compendium, and to initialize untranslated entries, or to update already translated entries, from translations kept in the compendium. * Menu: * Creating Compendia:: Merging translations for later use * Using Compendia:: Using older translations if they fit  File: gettext.info, Node: Creating Compendia, Next: Using Compendia, Prev: Compendium, Up: Compendium 8.4.1 Creating Compendia ------------------------ Basically every PO file consisting of translated entries only can be declared as a valid compendium. Often the translator wants to have special compendia; let's consider two cases: `concatenating PO files' and `extracting a message subset from a PO file'. 8.4.1.1 Concatenate PO Files ............................ To concatenate several valid PO files into one compendium file you can use `msgcomm' or `msgcat' (the latter preferred): msgcat -o compendium.po file1.po file2.po By default, `msgcat' will accumulate divergent translations for the same string. Those occurrences will be marked as `fuzzy' and highly visible decorated; calling `msgcat' on `file1.po': #: src/hello.c:200 #, c-format msgid "Report bugs to <%s>.\n" msgstr "Comunicar `bugs' a <%s>.\n" and `file2.po': #: src/bye.c:100 #, c-format msgid "Report bugs to <%s>.\n" msgstr "Comunicar \"bugs\" a <%s>.\n" will result in: #: src/hello.c:200 src/bye.c:100 #, fuzzy, c-format msgid "Report bugs to <%s>.\n" msgstr "" "#-#-#-#-# file1.po #-#-#-#-#\n" "Comunicar `bugs' a <%s>.\n" "#-#-#-#-# file2.po #-#-#-#-#\n" "Comunicar \"bugs\" a <%s>.\n" The translator will have to resolve this "conflict" manually; she has to decide whether the first or the second version is appropriate (or provide a new translation), to delete the "marker lines", and finally to remove the `fuzzy' mark. If the translator knows in advance the first found translation of a message is always the best translation she can make use to the `--use-first' switch: msgcat --use-first -o compendium.po file1.po file2.po A good compendium file must not contain `fuzzy' or untranslated entries. If input files are "dirty" you must preprocess the input files or postprocess the result using `msgattrib --translated --no-fuzzy'. 8.4.1.2 Extract a Message Subset from a PO File ............................................... Nobody wants to translate the same messages again and again; thus you may wish to have a compendium file containing `getopt.c' messages. To extract a message subset (e.g., all `getopt.c' messages) from an existing PO file into one compendium file you can use `msggrep': msggrep --location src/getopt.c -o compendium.po file.po  File: gettext.info, Node: Using Compendia, Prev: Creating Compendia, Up: Compendium 8.4.2 Using Compendia --------------------- You can use a compendium file to initialize a translation from scratch or to update an already existing translation. 8.4.2.1 Initialize a New Translation File ......................................... Since a PO file with translations does not exist the translator can merely use `/dev/null' to fake the "old" translation file. msgmerge --compendium compendium.po -o file.po /dev/null file.pot 8.4.2.2 Update an Existing Translation File ........................................... Concatenate the compendium file(s) and the existing PO, merge the result with the POT file and remove the obsolete entries (optional, here done using `sed'): msgcat --use-first -o update.po compendium1.po compendium2.po file.po msgmerge update.po file.pot | msgattrib --no-obsolete > file.po  File: gettext.info, Node: Manipulating, Next: Binaries, Prev: Editing, Up: Top 9 Manipulating PO Files *********************** Sometimes it is necessary to manipulate PO files in a way that is better performed automatically than by hand. GNU `gettext' includes a complete set of tools for this purpose. When merging two packages into a single package, the resulting POT file will be the concatenation of the two packages' POT files. Thus the maintainer must concatenate the two existing package translations into a single translation catalog, for each language. This is best performed using `msgcat'. It is then the translators' duty to deal with any possible conflicts that arose during the merge. When a translator takes over the translation job from another translator, but she uses a different character encoding in her locale, she will convert the catalog to her character encoding. This is best done through the `msgconv' program. When a maintainer takes a source file with tagged messages from another package, he should also take the existing translations for this source file (and not let the translators do the same job twice). One way to do this is through `msggrep', another is to create a POT file for that source file and use `msgmerge'. When a translator wants to adjust some translation catalog for a special dialect or orthography -- for example, German as written in Switzerland versus German as written in Germany -- she needs to apply some text processing to every message in the catalog. The tool for doing this is `msgfilter'. Another use of `msgfilter' is to produce approximately the POT file for which a given PO file was made. This can be done through a filter command like `msgfilter sed -e d | sed -e '/^# /d''. Note that the original POT file may have had different comments and different plural message counts, that's why it's better to use the original POT file if available. When a translator wants to check her translations, for example according to orthography rules or using a non-interactive spell checker, she can do so using the `msgexec' program. When third party tools create PO or POT files, sometimes duplicates cannot be avoided. But the GNU `gettext' tools give an error when they encounter duplicate msgids in the same file and in the same domain. To merge duplicates, the `msguniq' program can be used. `msgcomm' is a more general tool for keeping or throwing away duplicates, occurring in different files. `msgcmp' can be used to check whether a translation catalog is completely translated. `msgattrib' can be used to select and extract only the fuzzy or untranslated messages of a translation catalog. `msgen' is useful as a first step for preparing English translation catalogs. It copies each message's msgid to its msgstr. Finally, for those applications where all these various programs are not sufficient, a library `libgettextpo' is provided that can be used to write other specialized programs that process PO files. * Menu: * msgcat Invocation:: Invoking the `msgcat' Program * msgconv Invocation:: Invoking the `msgconv' Program * msggrep Invocation:: Invoking the `msggrep' Program * msgfilter Invocation:: Invoking the `msgfilter' Program * msguniq Invocation:: Invoking the `msguniq' Program * msgcomm Invocation:: Invoking the `msgcomm' Program * msgcmp Invocation:: Invoking the `msgcmp' Program * msgattrib Invocation:: Invoking the `msgattrib' Program * msgen Invocation:: Invoking the `msgen' Program * msgexec Invocation:: Invoking the `msgexec' Program * Colorizing:: Highlighting parts of PO files * libgettextpo:: Writing your own programs that process PO files  File: gettext.info, Node: msgcat Invocation, Next: msgconv Invocation, Prev: Manipulating, Up: Manipulating 9.1 Invoking the `msgcat' Program ================================= msgcat [OPTION] [INPUTFILE]... The `msgcat' program concatenates and merges the specified PO files. It finds messages which are common to two or more of the specified PO files. By using the `--more-than' option, greater commonality may be requested before messages are printed. Conversely, the `--less-than' option may be used to specify less commonality before messages are printed (i.e. `--less-than=2' will only print the unique messages). Translations, comments and extract comments will be cumulated, except that if `--use-first' is specified, they will be taken from the first PO file to define them. File positions from all PO files will be cumulated. 9.1.1 Input file location ------------------------- `INPUTFILE ...' Input files. `-f FILE' `--files-from=FILE' Read the names of the input files from FILE instead of getting them from the command line. `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting `.po' file will be written relative to the current directory, though. If INPUTFILE is `-', standard input is read. 9.1.2 Output file location -------------------------- `-o FILE' `--output-file=FILE' Write output to specified file. The results are written to standard output if no output file is specified or if it is `-'. 9.1.3 Message selection ----------------------- `-< NUMBER' `--less-than=NUMBER' Print messages with less than NUMBER definitions, defaults to infinite if not set. `-> NUMBER' `--more-than=NUMBER' Print messages with more than NUMBER definitions, defaults to 0 if not set. `-u' `--unique' Shorthand for `--less-than=2'. Requests that only unique messages be printed. 9.1.4 Input file syntax ----------------------- `-P' `--properties-input' Assume the input files are Java ResourceBundles in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input files are NeXTstep/GNUstep localized resource files in `.strings' syntax, not in PO file syntax. 9.1.5 Output details -------------------- `-t' `--to-code=NAME' Specify encoding for output. `--use-first' Use first available translation for each message. Don't merge several translations into one. `--lang=CATALOGNAME' Specify the `Language' field to be used in the header entry. See *note Header Entry:: for the meaning of this field. Note: The `Language-Team' and `Plural-Forms' fields are left unchanged. `--color' `--color=WHEN' Specify whether or when to use colors and other text attributes. See *note The --color option:: for details. `--style=STYLE_FILE' Specify the CSS style rule file to use for `--color'. See *note The --style option:: for details. `--force-po' Always write an output file even if it contains no message. `-i' `--indent' Write the .po file using indented style. `--no-location' Do not write `#: FILENAME:LINE' lines. `-n' `--add-location' Generate `#: FILENAME:LINE' lines (default). `--strict' Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions. `-p' `--properties-output' Write out a Java ResourceBundle in Java `.properties' syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages. `--stringtable-output' Write out a NeXTstep/GNUstep localized resource file in `.strings' syntax. Note that this file format doesn't support plural forms. `-w NUMBER' `--width=NUMBER' Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER. `--no-wrap' Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split. `-s' `--sort-output' Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context. `-F' `--sort-by-file' Sort output by file location. 9.1.6 Informative output ------------------------ `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit.  File: gettext.info, Node: msgconv Invocation, Next: msggrep Invocation, Prev: msgcat Invocation, Up: Manipulating 9.2 Invoking the `msgconv' Program ================================== msgconv [OPTION] [INPUTFILE] The `msgconv' program converts a translation catalog to a different character encoding. 9.2.1 Input file location ------------------------- `INPUTFILE' Input PO file. `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting `.po' file will be written relative to the current directory, though. If no INPUTFILE is given or if it is `-', standard input is read. 9.2.2 Output file location -------------------------- `-o FILE' `--output-file=FILE' Write output to specified file. The results are written to standard output if no output file is specified or if it is `-'. 9.2.3 Conversion target ----------------------- `-t' `--to-code=NAME' Specify encoding for output. The default encoding is the current locale's encoding. 9.2.4 Input file syntax ----------------------- `-P' `--properties-input' Assume the input file is a Java ResourceBundle in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input file is a NeXTstep/GNUstep localized resource file in `.strings' syntax, not in PO file syntax. 9.2.5 Output details -------------------- `--color' `--color=WHEN' Specify whether or when to use colors and other text attributes. See *note The --color option:: for details. `--style=STYLE_FILE' Specify the CSS style rule file to use for `--color'. See *note The --style option:: for details. `--force-po' Always write an output file even if it contains no message. `-i' `--indent' Write the .po file using indented style. `--no-location' Do not write `#: FILENAME:LINE' lines. `--add-location' Generate `#: FILENAME:LINE' lines (default). `--strict' Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions. `-p' `--properties-output' Write out a Java ResourceBundle in Java `.properties' syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages. `--stringtable-output' Write out a NeXTstep/GNUstep localized resource file in `.strings' syntax. Note that this file format doesn't support plural forms. `-w NUMBER' `--width=NUMBER' Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER. `--no-wrap' Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split. `-s' `--sort-output' Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context. `-F' `--sort-by-file' Sort output by file location. 9.2.6 Informative output ------------------------ `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit.  File: gettext.info, Node: msggrep Invocation, Next: msgfilter Invocation, Prev: msgconv Invocation, Up: Manipulating 9.3 Invoking the `msggrep' Program ================================== msggrep [OPTION] [INPUTFILE] The `msggrep' program extracts all messages of a translation catalog that match a given pattern or belong to some given source files. 9.3.1 Input file location ------------------------- `INPUTFILE' Input PO file. `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting `.po' file will be written relative to the current directory, though. If no INPUTFILE is given or if it is `-', standard input is read. 9.3.2 Output file location -------------------------- `-o FILE' `--output-file=FILE' Write output to specified file. The results are written to standard output if no output file is specified or if it is `-'. 9.3.3 Message selection ----------------------- [-N SOURCEFILE]... [-M DOMAINNAME]... [-J MSGCTXT-PATTERN] [-K MSGID-PATTERN] [-T MSGSTR-PATTERN] [-C COMMENT-PATTERN] A message is selected if * it comes from one of the specified source files, * or if it comes from one of the specified domains, * or if `-J' is given and its context (msgctxt) matches MSGCTXT-PATTERN, * or if `-K' is given and its key (msgid or msgid_plural) matches MSGID-PATTERN, * or if `-T' is given and its translation (msgstr) matches MSGSTR-PATTERN, * or if `-C' is given and the translator's comment matches COMMENT-PATTERN. When more than one selection criterion is specified, the set of selected messages is the union of the selected messages of each criterion. MSGCTXT-PATTERN or MSGID-PATTERN or MSGSTR-PATTERN syntax: [-E | -F] [-e PATTERN | -f FILE]... PATTERNs are basic regular expressions by default, or extended regular expressions if -E is given, or fixed strings if -F is given. `-N SOURCEFILE' `--location=SOURCEFILE' Select messages extracted from SOURCEFILE. SOURCEFILE can be either a literal file name or a wildcard pattern. `-M DOMAINNAME' `--domain=DOMAINNAME' Select messages belonging to domain DOMAINNAME. `-J' `--msgctxt' Start of patterns for the msgctxt. `-K' `--msgid' Start of patterns for the msgid. `-T' `--msgstr' Start of patterns for the msgstr. `-C' `--comment' Start of patterns for the translator's comment. `-X' `--extracted-comment' Start of patterns for the extracted comments. `-E' `--extended-regexp' Specify that PATTERN is an extended regular expression. `-F' `--fixed-strings' Specify that PATTERN is a set of newline-separated strings. `-e PATTERN' `--regexp=PATTERN' Use PATTERN as a regular expression. `-f FILE' `--file=FILE' Obtain PATTERN from FILE. `-i' `--ignore-case' Ignore case distinctions. `-v' `--invert-match' Output only the messages that do not match any selection criterion, instead of the messages that match a selection criterion. 9.3.4 Input file syntax ----------------------- `-P' `--properties-input' Assume the input file is a Java ResourceBundle in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input file is a NeXTstep/GNUstep localized resource file in `.strings' syntax, not in PO file syntax. 9.3.5 Output details -------------------- `--color' `--color=WHEN' Specify whether or when to use colors and other text attributes. See *note The --color option:: for details. `--style=STYLE_FILE' Specify the CSS style rule file to use for `--color'. See *note The --style option:: for details. `--force-po' Always write an output file even if it contains no message. `--indent' Write the .po file using indented style. `--no-location' Do not write `#: FILENAME:LINE' lines. `--add-location' Generate `#: FILENAME:LINE' lines (default). `--strict' Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions. `-p' `--properties-output' Write out a Java ResourceBundle in Java `.properties' syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages. `--stringtable-output' Write out a NeXTstep/GNUstep localized resource file in `.strings' syntax. Note that this file format doesn't support plural forms. `-w NUMBER' `--width=NUMBER' Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER. `--no-wrap' Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split. `--sort-output' Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context. `--sort-by-file' Sort output by file location. 9.3.6 Informative output ------------------------ `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit. 9.3.7 Examples -------------- To extract the messages that come from the source files `gnulib-lib/error.c' and `gnulib-lib/getopt.c': msggrep -N gnulib-lib/error.c -N gnulib-lib/getopt.c input.po To extract the messages that contain the string "Please specify" in the original string: msggrep --msgid -F -e 'Please specify' input.po To extract the messages that have a context specifier of either "Menu>File" or "Menu>Edit" or a submenu of them: msggrep --msgctxt -E -e '^Menu>(File|Edit)' input.po To extract the messages whose translation contains one of the strings in the file `wordlist.txt': msggrep --msgstr -F -f wordlist.txt input.po  File: gettext.info, Node: msgfilter Invocation, Next: msguniq Invocation, Prev: msggrep Invocation, Up: Manipulating 9.4 Invoking the `msgfilter' Program ==================================== msgfilter [OPTION] FILTER [FILTER-OPTION] The `msgfilter' program applies a filter to all translations of a translation catalog. During each FILTER invocation, the environment variable `MSGFILTER_MSGID' is bound to the message's msgid, and the environment variable `MSGFILTER_LOCATION' is bound to the location in the PO file of the message. If the message has a context, the environment variable `MSGFILTER_MSGCTXT' is bound to the message's msgctxt, otherwise it is unbound. 9.4.1 Input file location ------------------------- `-i INPUTFILE' `--input=INPUTFILE' Input PO file. `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting `.po' file will be written relative to the current directory, though. If no INPUTFILE is given or if it is `-', standard input is read. 9.4.2 Output file location -------------------------- `-o FILE' `--output-file=FILE' Write output to specified file. The results are written to standard output if no output file is specified or if it is `-'. 9.4.3 The filter ---------------- The FILTER can be any program that reads a translation from standard input and writes a modified translation to standard output. A frequently used filter is `sed'. A few particular built-in filters are also recognized. Note: If the filter is not a built-in filter, you have to care about encodings: It is your responsibility to ensure that the FILTER can cope with input encoded in the translation catalog's encoding. If the FILTER wants input in a particular encoding, you can in a first step convert the translation catalog to that encoding using the `msgconv' program, before invoking `msgfilter'. If the FILTER wants input in the locale's encoding, but you want to avoid the locale's encoding, then you can first convert the translation catalog to UTF-8 using the `msgconv' program and then make `msgfilter' work in an UTF-8 locale, by using the `LC_ALL' environment variable. Note: Most translations in a translation catalog don't end with a newline character. For this reason, it is important that the FILTER recognizes its last input line even if it ends without a newline, and that it doesn't add an undesired trailing newline at the end. The `sed' program on some platforms is known to ignore the last line of input if it is not terminated with a newline. You can use GNU `sed' instead; it does not have this limitation. 9.4.4 Useful FILTER-OPTIONs when the FILTER is `sed' ---------------------------------------------------- `-e SCRIPT' `--expression=SCRIPT' Add SCRIPT to the commands to be executed. `-f SCRIPTFILE' `--file=SCRIPTFILE' Add the contents of SCRIPTFILE to the commands to be executed. `-n' `--quiet' `--silent' Suppress automatic printing of pattern space. 9.4.5 Built-in FILTERs ---------------------- The filter `recode-sr-latin' is recognized as a built-in filter. The command `recode-sr-latin' converts Serbian text, written in the Cyrillic script, to the Latin script. The command `msgfilter recode-sr-latin' applies this conversion to the translations of a PO file. Thus, it can be used to convert an `sr.po' file to an `sr@latin.po' file. The use of built-in filters is not sensitive to the current locale's encoding. Moreover, when used with a built-in filter, `msgfilter' can automatically convert the message catalog to the UTF-8 encoding when needed. 9.4.6 Input file syntax ----------------------- `-P' `--properties-input' Assume the input file is a Java ResourceBundle in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input file is a NeXTstep/GNUstep localized resource file in `.strings' syntax, not in PO file syntax. 9.4.7 Output details -------------------- `--color' `--color=WHEN' Specify whether or when to use colors and other text attributes. See *note The --color option:: for details. `--style=STYLE_FILE' Specify the CSS style rule file to use for `--color'. See *note The --style option:: for details. `--force-po' Always write an output file even if it contains no message. `--indent' Write the .po file using indented style. `--keep-header' Keep the header entry, i.e. the message with `msgid ""', unmodified, instead of filtering it. By default, the header entry is subject to filtering like any other message. `--no-location' Do not write `#: FILENAME:LINE' lines. `--add-location' Generate `#: FILENAME:LINE' lines (default). `--strict' Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions. `-p' `--properties-output' Write out a Java ResourceBundle in Java `.properties' syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages. `--stringtable-output' Write out a NeXTstep/GNUstep localized resource file in `.strings' syntax. Note that this file format doesn't support plural forms. `-w NUMBER' `--width=NUMBER' Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER. `--no-wrap' Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split. `-s' `--sort-output' Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context. `-F' `--sort-by-file' Sort output by file location. 9.4.8 Informative output ------------------------ `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit. 9.4.9 Examples -------------- To convert German translations to Swiss orthography (in an UTF-8 locale): msgconv -t UTF-8 de.po | msgfilter sed -e 's/ß/ss/g' To convert Serbian translations in Cyrillic script to Latin script: msgfilter recode-sr-latin < sr.po  File: gettext.info, Node: msguniq Invocation, Next: msgcomm Invocation, Prev: msgfilter Invocation, Up: Manipulating 9.5 Invoking the `msguniq' Program ================================== msguniq [OPTION] [INPUTFILE] The `msguniq' program unifies duplicate translations in a translation catalog. It finds duplicate translations of the same message ID. Such duplicates are invalid input for other programs like `msgfmt', `msgmerge' or `msgcat'. By default, duplicates are merged together. When using the `--repeated' option, only duplicates are output, and all other messages are discarded. Comments and extracted comments will be cumulated, except that if `--use-first' is specified, they will be taken from the first translation. File positions will be cumulated. When using the `--unique' option, duplicates are discarded. 9.5.1 Input file location ------------------------- `INPUTFILE' Input PO file. `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting `.po' file will be written relative to the current directory, though. If no INPUTFILE is given or if it is `-', standard input is read. 9.5.2 Output file location -------------------------- `-o FILE' `--output-file=FILE' Write output to specified file. The results are written to standard output if no output file is specified or if it is `-'. 9.5.3 Message selection ----------------------- `-d' `--repeated' Print only duplicates. `-u' `--unique' Print only unique messages, discard duplicates. 9.5.4 Input file syntax ----------------------- `-P' `--properties-input' Assume the input file is a Java ResourceBundle in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input file is a NeXTstep/GNUstep localized resource file in `.strings' syntax, not in PO file syntax. 9.5.5 Output details -------------------- `-t' `--to-code=NAME' Specify encoding for output. `--use-first' Use first available translation for each message. Don't merge several translations into one. `--color' `--color=WHEN' Specify whether or when to use colors and other text attributes. See *note The --color option:: for details. `--style=STYLE_FILE' Specify the CSS style rule file to use for `--color'. See *note The --style option:: for details. `--force-po' Always write an output file even if it contains no message. `-i' `--indent' Write the .po file using indented style. `--no-location' Do not write `#: FILENAME:LINE' lines. `-n' `--add-location' Generate `#: FILENAME:LINE' lines (default). `--strict' Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions. `-p' `--properties-output' Write out a Java ResourceBundle in Java `.properties' syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages. `--stringtable-output' Write out a NeXTstep/GNUstep localized resource file in `.strings' syntax. Note that this file format doesn't support plural forms. `-w NUMBER' `--width=NUMBER' Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER. `--no-wrap' Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split. `-s' `--sort-output' Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context. `-F' `--sort-by-file' Sort output by file location. 9.5.6 Informative output ------------------------ `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit.  File: gettext.info, Node: msgcomm Invocation, Next: msgcmp Invocation, Prev: msguniq Invocation, Up: Manipulating 9.6 Invoking the `msgcomm' Program ================================== msgcomm [OPTION] [INPUTFILE]... The `msgcomm' program finds messages which are common to two or more of the specified PO files. By using the `--more-than' option, greater commonality may be requested before messages are printed. Conversely, the `--less-than' option may be used to specify less commonality before messages are printed (i.e. `--less-than=2' will only print the unique messages). Translations, comments and extract comments will be preserved, but only from the first PO file to define them. File positions from all PO files will be cumulated. 9.6.1 Input file location ------------------------- `INPUTFILE ...' Input files. `-f FILE' `--files-from=FILE' Read the names of the input files from FILE instead of getting them from the command line. `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting `.po' file will be written relative to the current directory, though. If INPUTFILE is `-', standard input is read. 9.6.2 Output file location -------------------------- `-o FILE' `--output-file=FILE' Write output to specified file. The results are written to standard output if no output file is specified or if it is `-'. 9.6.3 Message selection ----------------------- `-< NUMBER' `--less-than=NUMBER' Print messages with less than NUMBER definitions, defaults to infinite if not set. `-> NUMBER' `--more-than=NUMBER' Print messages with more than NUMBER definitions, defaults to 1 if not set. `-u' `--unique' Shorthand for `--less-than=2'. Requests that only unique messages be printed. 9.6.4 Input file syntax ----------------------- `-P' `--properties-input' Assume the input files are Java ResourceBundles in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input files are NeXTstep/GNUstep localized resource files in `.strings' syntax, not in PO file syntax. 9.6.5 Output details -------------------- `--color' `--color=WHEN' Specify whether or when to use colors and other text attributes. See *note The --color option:: for details. `--style=STYLE_FILE' Specify the CSS style rule file to use for `--color'. See *note The --style option:: for details. `--force-po' Always write an output file even if it contains no message. `-i' `--indent' Write the .po file using indented style. `--no-location' Do not write `#: FILENAME:LINE' lines. `-n' `--add-location' Generate `#: FILENAME:LINE' lines (default). `--strict' Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions. `-p' `--properties-output' Write out a Java ResourceBundle in Java `.properties' syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages. `--stringtable-output' Write out a NeXTstep/GNUstep localized resource file in `.strings' syntax. Note that this file format doesn't support plural forms. `-w NUMBER' `--width=NUMBER' Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER. `--no-wrap' Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split. `-s' `--sort-output' Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context. `-F' `--sort-by-file' Sort output by file location. `--omit-header' Don't write header with `msgid ""' entry. 9.6.6 Informative output ------------------------ `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit.  File: gettext.info, Node: msgcmp Invocation, Next: msgattrib Invocation, Prev: msgcomm Invocation, Up: Manipulating 9.7 Invoking the `msgcmp' Program ================================= msgcmp [OPTION] DEF.po REF.pot The `msgcmp' program compares two Uniforum style .po files to check that both contain the same set of msgid strings. The DEF.po file is an existing PO file with the translations. The REF.pot file is the last created PO file, or a PO Template file (generally created by `xgettext'). This is useful for checking that you have translated each and every message in your program. Where an exact match cannot be found, fuzzy matching is used to produce better diagnostics. 9.7.1 Input file location ------------------------- `DEF.po' Translations. `REF.pot' References to the sources. `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. 9.7.2 Operation modifiers ------------------------- `-m' `--multi-domain' Apply REF.pot to each of the domains in DEF.po. `-N' `--no-fuzzy-matching' Do not use fuzzy matching when an exact match is not found. This may speed up the operation considerably. `--use-fuzzy' Consider fuzzy messages in the DEF.po file like translated messages. Note that using this option is usually wrong, because fuzzy messages are exactly those which have not been validated by a human translator. `--use-untranslated' Consider untranslated messages in the DEF.po file like translated messages. Note that using this option is usually wrong. 9.7.3 Input file syntax ----------------------- `-P' `--properties-input' Assume the input files are Java ResourceBundles in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input files are NeXTstep/GNUstep localized resource files in `.strings' syntax, not in PO file syntax. 9.7.4 Informative output ------------------------ `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit.  File: gettext.info, Node: msgattrib Invocation, Next: msgen Invocation, Prev: msgcmp Invocation, Up: Manipulating 9.8 Invoking the `msgattrib' Program ==================================== msgattrib [OPTION] [INPUTFILE] The `msgattrib' program filters the messages of a translation catalog according to their attributes, and manipulates the attributes. 9.8.1 Input file location ------------------------- `INPUTFILE' Input PO file. `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting `.po' file will be written relative to the current directory, though. If no INPUTFILE is given or if it is `-', standard input is read. 9.8.2 Output file location -------------------------- `-o FILE' `--output-file=FILE' Write output to specified file. The results are written to standard output if no output file is specified or if it is `-'. 9.8.3 Message selection ----------------------- `--translated' Keep translated messages, remove untranslated messages. `--untranslated' Keep untranslated messages, remove translated messages. `--no-fuzzy' Remove `fuzzy' marked messages. `--only-fuzzy' Keep `fuzzy' marked messages, remove all other messages. `--no-obsolete' Remove obsolete #~ messages. `--only-obsolete' Keep obsolete #~ messages, remove all other messages. 9.8.4 Attribute manipulation ---------------------------- Attributes are modified after the message selection/removal has been performed. If the `--only-file' or `--ignore-file' option is specified, the attribute modification is applied only to those messages that are listed in the ONLY-FILE and not listed in the IGNORE-FILE. `--set-fuzzy' Set all messages `fuzzy'. `--clear-fuzzy' Set all messages non-`fuzzy'. `--set-obsolete' Set all messages obsolete. `--clear-obsolete' Set all messages non-obsolete. `--clear-previous' Remove the "previous msgid" (`#|') comments from all messages. `--only-file=FILE' Limit the attribute changes to entries that are listed in FILE. FILE should be a PO or POT file. `--ignore-file=FILE' Limit the attribute changes to entries that are not listed in FILE. FILE should be a PO or POT file. `--fuzzy' Synonym for `--only-fuzzy --clear-fuzzy': It keeps only the fuzzy messages and removes their `fuzzy' mark. `--obsolete' Synonym for `--only-obsolete --clear-obsolete': It keeps only the obsolete messages and makes them non-obsolete. 9.8.5 Input file syntax ----------------------- `-P' `--properties-input' Assume the input file is a Java ResourceBundle in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input file is a NeXTstep/GNUstep localized resource file in `.strings' syntax, not in PO file syntax. 9.8.6 Output details -------------------- `--color' `--color=WHEN' Specify whether or when to use colors and other text attributes. See *note The --color option:: for details. `--style=STYLE_FILE' Specify the CSS style rule file to use for `--color'. See *note The --style option:: for details. `--force-po' Always write an output file even if it contains no message. `-i' `--indent' Write the .po file using indented style. `--no-location' Do not write `#: FILENAME:LINE' lines. `-n' `--add-location' Generate `#: FILENAME:LINE' lines (default). `--strict' Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions. `-p' `--properties-output' Write out a Java ResourceBundle in Java `.properties' syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages. `--stringtable-output' Write out a NeXTstep/GNUstep localized resource file in `.strings' syntax. Note that this file format doesn't support plural forms. `-w NUMBER' `--width=NUMBER' Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER. `--no-wrap' Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split. `-s' `--sort-output' Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context. `-F' `--sort-by-file' Sort output by file location. 9.8.7 Informative output ------------------------ `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit.  File: gettext.info, Node: msgen Invocation, Next: msgexec Invocation, Prev: msgattrib Invocation, Up: Manipulating 9.9 Invoking the `msgen' Program ================================ msgen [OPTION] INPUTFILE The `msgen' program creates an English translation catalog. The input file is the last created English PO file, or a PO Template file (generally created by xgettext). Untranslated entries are assigned a translation that is identical to the msgid. Note: `msginit --no-translator --locale=en' performs a very similar task. The main difference is that `msginit' cares specially about the header entry, whereas `msgen' doesn't. 9.9.1 Input file location ------------------------- `INPUTFILE' Input PO or POT file. `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting `.po' file will be written relative to the current directory, though. If INPUTFILE is `-', standard input is read. 9.9.2 Output file location -------------------------- `-o FILE' `--output-file=FILE' Write output to specified file. The results are written to standard output if no output file is specified or if it is `-'. 9.9.3 Input file syntax ----------------------- `-P' `--properties-input' Assume the input file is a Java ResourceBundle in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input file is a NeXTstep/GNUstep localized resource file in `.strings' syntax, not in PO file syntax. 9.9.4 Output details -------------------- `--lang=CATALOGNAME' Specify the `Language' field to be used in the header entry. See *note Header Entry:: for the meaning of this field. Note: The `Language-Team' and `Plural-Forms' fields are not set by this option. `--color' `--color=WHEN' Specify whether or when to use colors and other text attributes. See *note The --color option:: for details. `--style=STYLE_FILE' Specify the CSS style rule file to use for `--color'. See *note The --style option:: for details. `--force-po' Always write an output file even if it contains no message. `-i' `--indent' Write the .po file using indented style. `--no-location' Do not write `#: FILENAME:LINE' lines. `--add-location' Generate `#: FILENAME:LINE' lines (default). `--strict' Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions. `-p' `--properties-output' Write out a Java ResourceBundle in Java `.properties' syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages. `--stringtable-output' Write out a NeXTstep/GNUstep localized resource file in `.strings' syntax. Note that this file format doesn't support plural forms. `-w NUMBER' `--width=NUMBER' Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER. `--no-wrap' Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split. `-s' `--sort-output' Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context. `-F' `--sort-by-file' Sort output by file location. 9.9.5 Informative output ------------------------ `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit.  File: gettext.info, Node: msgexec Invocation, Next: Colorizing, Prev: msgen Invocation, Up: Manipulating 9.10 Invoking the `msgexec' Program =================================== msgexec [OPTION] COMMAND [COMMAND-OPTION] The `msgexec' program applies a command to all translations of a translation catalog. The COMMAND can be any program that reads a translation from standard input. It is invoked once for each translation. Its output becomes msgexec's output. `msgexec''s return code is the maximum return code across all invocations. A special builtin command called `0' outputs the translation, followed by a null byte. The output of `msgexec 0' is suitable as input for `xargs -0'. During each COMMAND invocation, the environment variable `MSGEXEC_MSGID' is bound to the message's msgid, and the environment variable `MSGEXEC_LOCATION' is bound to the location in the PO file of the message. If the message has a context, the environment variable `MSGEXEC_MSGCTXT' is bound to the message's msgctxt, otherwise it is unbound. Note: It is your responsibility to ensure that the COMMAND can cope with input encoded in the translation catalog's encoding. If the COMMAND wants input in a particular encoding, you can in a first step convert the translation catalog to that encoding using the `msgconv' program, before invoking `msgexec'. If the COMMAND wants input in the locale's encoding, but you want to avoid the locale's encoding, then you can first convert the translation catalog to UTF-8 using the `msgconv' program and then make `msgexec' work in an UTF-8 locale, by using the `LC_ALL' environment variable. 9.10.1 Input file location -------------------------- `-i INPUTFILE' `--input=INPUTFILE' Input PO file. `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting `.po' file will be written relative to the current directory, though. If no INPUTFILE is given or if it is `-', standard input is read. 9.10.2 Input file syntax ------------------------ `-P' `--properties-input' Assume the input file is a Java ResourceBundle in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input file is a NeXTstep/GNUstep localized resource file in `.strings' syntax, not in PO file syntax. 9.10.3 Informative output ------------------------- `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit.  File: gettext.info, Node: Colorizing, Next: libgettextpo, Prev: msgexec Invocation, Up: Manipulating 9.11 Highlighting parts of PO files =================================== Translators are usually only interested in seeing the untranslated and fuzzy messages of a PO file. Also, when a message is set fuzzy because the msgid changed, they want to see the differences between the previous msgid and the current one (especially if the msgid is long and only few words in it have changed). Finally, it's always welcome to highlight the different sections of a message in a PO file (comments, msgid, msgstr, etc.). Such highlighting is possible through the `msgcat' options `--color' and `--style'. * Menu: * The --color option:: Triggering colorized output * The TERM variable:: The environment variable `TERM' * The --style option:: The `--style' option * Style rules:: Style rules for PO files * Customizing less:: Customizing `less' for viewing PO files  File: gettext.info, Node: The --color option, Next: The TERM variable, Up: Colorizing 9.11.1 The `--color' option --------------------------- The `--color=WHEN' option specifies under which conditions colorized output should be generated. The WHEN part can be one of the following: `always' `yes' The output will be colorized. `never' `no' The output will not be colorized. `auto' `tty' The output will be colorized if the output device is a tty, i.e. when the output goes directly to a text screen or terminal emulator window. `html' The output will be colorized and be in HTML format. `--color' is equivalent to `--color=yes'. The default is `--color=auto'. Thus, a command like `msgcat vi.po' will produce colorized output when called by itself in a command window. Whereas in a pipe, such as `msgcat vi.po | less -R', it will not produce colorized output. To get colorized output in this situation nevertheless, use the command `msgcat --color vi.po | less -R'. The `--color=html' option will produce output that can be viewed in a browser. This can be useful, for example, for Indic languages, because the renderic of Indic scripts in browser is usually better than in terminal emulators. Note that the output produced with the `--color' option is _not_ a valid PO file in itself. It contains additional terminal-specific escape sequences or HTML tags. A PO file reader will give a syntax error when confronted with such content. Except for the `--color=html' case, you therefore normally don't need to save output produced with the `--color' option in a file.  File: gettext.info, Node: The TERM variable, Next: The --style option, Prev: The --color option, Up: Colorizing 9.11.2 The environment variable `TERM' -------------------------------------- The environment variable `TERM' contains a identifier for the text window's capabilities. You can get a detailed list of these cababilities by using the `infocmp' command, using `man 5 terminfo' as a reference. When producing text with embedded color directives, `msgcat' looks at the `TERM' variable. Text windows today typically support at least 8 colors. Often, however, the text window supports 16 or more colors, even though the `TERM' variable is set to a identifier denoting only 8 supported colors. It can be worth setting the `TERM' variable to a different value in these cases: `xterm' `xterm' is in most cases built with support for 16 colors. It can also be built with support for 88 or 256 colors (but not both). You can try to set `TERM' to either `xterm-16color', `xterm-88color', or `xterm-256color'. `rxvt' `rxvt' is often built with support for 16 colors. You can try to set `TERM' to `rxvt-16color'. `konsole' `konsole' too is often built with support for 16 colors. You can try to set `TERM' to `konsole-16color' or `xterm-16color'. After setting `TERM', you can verify it by invoking `msgcat --color=test' and seeing whether the output looks like a reasonable color map.  File: gettext.info, Node: The --style option, Next: Style rules, Prev: The TERM variable, Up: Colorizing 9.11.3 The `--style' option --------------------------- The `--style=STYLE_FILE' option specifies the style file to use when colorizing. It has an effect only when the `--color' option is effective. If the `--style' option is not specified, the environment variable `PO_STYLE' is considered. It is meant to point to the user's preferred style for PO files. The default style file is `$prefix/share/gettext/styles/po-default.css', where `$prefix' is the installation location. A few style files are predefined: `po-vim.css' This style imitates the look used by vim 7. `po-emacs-x.css' This style imitates the look used by GNU Emacs 21 and 22 in an X11 window. `po-emacs-xterm.css' `po-emacs-xterm16.css' `po-emacs-xterm256.css' This style imitates the look used by GNU Emacs 22 in a terminal of type `xterm' (8 colors) or `xterm-16color' (16 colors) or `xterm-256color' (256 colors), respectively. You can use these styles without specifying a directory. They are actually located in `$prefix/share/gettext/styles/', where `$prefix' is the installation location. You can also design your own styles. This is described in the next section.  File: gettext.info, Node: Style rules, Next: Customizing less, Prev: The --style option, Up: Colorizing 9.11.4 Style rules for PO files ------------------------------- The same style file can be used for styling of a PO file, for terminal output and for HTML output. It is written in CSS (Cascading Style Sheet) syntax. See `http://www.w3.org/TR/css2/cover.html' for a formal definition of CSS. Many HTML authoring tutorials also contain explanations of CSS. In the case of HTML output, the style file is embedded in the HTML output. In the case of text output, the style file is interpreted by the `msgcat' program. This means, in particular, that when `@import' is used with relative file names, the file names are - relative to the resulting HTML file, in the case of HTML output, - relative to the style sheet containing the `@import', in the case of text output. (Actually, `@import's are not yet supported in this case, due to a limitation in `libcroco'.) CSS rules are built up from selectors and declarations. The declarations specify graphical properties; the selectors specify specify when they apply. In PO files, the following simple selectors (based on "CSS classes", see the CSS2 spec, section 5.8.3) are supported. * Selectors that apply to entire messages: `.header' This matches the header entry of a PO file. `.translated' This matches a translated message. `.untranslated' This matches an untranslated message (i.e. a message with empty translation). `.fuzzy' This matches a fuzzy message (i.e. a message which has a translation that needs review by the translator). `.obsolete' This matches an obsolete message (i.e. a message that was translated but is not needed by the current POT file any more). * Selectors that apply to parts of a message in PO syntax. Recall the general structure of a message in PO syntax: WHITE-SPACE # TRANSLATOR-COMMENTS #. EXTRACTED-COMMENTS #: REFERENCE... #, FLAG... #| msgid PREVIOUS-UNTRANSLATED-STRING msgid UNTRANSLATED-STRING msgstr TRANSLATED-STRING `.comment' This matches all comments (translator comments, extracted comments, source file reference comments, flag comments, previous message comments, as well as the entire obsolete messages). `.translator-comment' This matches the translator comments. `.extracted-comment' This matches the extracted comments, i.e. the comments placed by the programmer at the attention of the translator. `.reference-comment' This matches the source file reference comments (entire lines). `.reference' This matches the individual source file references inside the source file reference comment lines. `.flag-comment' This matches the flag comment lines (entire lines). `.flag' This matches the individual flags inside flag comment lines. `.fuzzy-flag' This matches the `fuzzy' flag inside flag comment lines. `.previous-comment' This matches the comments containing the previous untranslated string (entire lines). `.previous' This matches the previous untranslated string including the string delimiters, the associated keywords (`msgid' etc.) and the spaces between them. `.msgid' This matches the untranslated string including the string delimiters, the associated keywords (`msgid' etc.) and the spaces between them. `.msgstr' This matches the translated string including the string delimiters, the associated keywords (`msgstr' etc.) and the spaces between them. `.keyword' This matches the keywords (`msgid', `msgstr', etc.). `.string' This matches strings, including the string delimiters (double quotes). * Selectors that apply to parts of strings: `.text' This matches the entire contents of a string (excluding the string delimiters, i.e. the double quotes). `.escape-sequence' This matches an escape sequence (starting with a backslash). `.format-directive' This matches a format string directive (starting with a `%' sign in the case of most programming languages, with a `{' in the case of `java-format' and `csharp-format', with a `~' in the case of `lisp-format' and `scheme-format', or with `$' in the case of `sh-format'). `.invalid-format-directive' This matches an invalid format string directive. `.added' In an untranslated string, this matches a part of the string that was not present in the previous untranslated string. (Not yet implemented in this release.) `.changed' In an untranslated string or in a previous untranslated string, this matches a part of the string that is changed or replaced. (Not yet implemented in this release.) `.removed' In a previous untranslated string, this matches a part of the string that is not present in the current untranslated string. (Not yet implemented in this release.) These selectors can be combined to hierarchical selectors. For example, .msgstr .invalid-format-directive { color: red; } will highlight the invalid format directives in the translated strings. In text mode, pseudo-classes (CSS2 spec, section 5.11) and pseudo-elements (CSS2 spec, section 5.12) are not supported. The declarations in HTML mode are not limited; any graphical attribute supported by the browsers can be used. The declarations in text mode are limited to the following properties. Other properties will be silently ignored. `color' (CSS2 spec, section 14.1) `background-color' (CSS2 spec, section 14.2.1) These properties is supported. Colors will be adjusted to match the terminal's capabilities. Note that many terminals support only 8 colors. `font-weight' (CSS2 spec, section 15.2.3) This property is supported, but most terminals can only render two different weights: `normal' and `bold'. Values >= 600 are rendered as `bold'. `font-style' (CSS2 spec, section 15.2.3) This property is supported. The values `italic' and `oblique' are rendered the same way. `text-decoration' (CSS2 spec, section 16.3.1) This property is supported, limited to the values `none' and `underline'.  File: gettext.info, Node: Customizing less, Prev: Style rules, Up: Colorizing 9.11.5 Customizing `less' for viewing PO files ---------------------------------------------- The `less' program is a popular text file browser for use in a text screen or terminal emulator. It also supports text with embedded escape sequences for colors and text decorations. You can use `less' to view a PO file like this (assuming an UTF-8 environment): msgcat --to-code=UTF-8 --color xyz.po | less -R You can simplify this to this simple command: less xyz.po after these three preparations: 1. Add the options `-R' and `-f' to the `LESS' environment variable. In sh shells: $ LESS="$LESS -R -f" $ export LESS 2. If your system does not already have the `lessopen.sh' and `lessclose.sh' scripts, create them and set the `LESSOPEN' and `LESSCLOSE' environment variables, as indicated in the manual page (`man less'). 3. Add to `lessopen.sh' a piece of script that recognizes PO files through their file extension and invokes `msgcat' on them, producing a temporary file. Like this: case "$1" in *.po) tmpfile=`mktemp "${TMPDIR-/tmp}/less.XXXXXX"` msgcat --to-code=UTF-8 --color "$1" > "$tmpfile" echo "$tmpfile" exit 0 ;; esac  File: gettext.info, Node: libgettextpo, Prev: Colorizing, Up: Manipulating 9.12 Writing your own programs that process PO files ==================================================== For the tasks for which a combination of `msgattrib', `msgcat' etc. is not sufficient, a set of C functions is provided in a library, to make it possible to process PO files in your own programs. When you use this library, you don't need to write routines to parse the PO file; instead, you retrieve a pointer in memory to each of messages contained in the PO file. Functions for writing PO files are not provided at this time. The functions are declared in the header file `<gettext-po.h>', and are defined in a library called `libgettextpo'. -- Data Type: po_file_t This is a pointer type that refers to the contents of a PO file, after it has been read into memory. -- Data Type: po_message_iterator_t This is a pointer type that refers to an iterator that produces a sequence of messages. -- Data Type: po_message_t This is a pointer type that refers to a message of a PO file, including its translation. -- Function: po_file_t po_file_read (const char *FILENAME) The `po_file_read' function reads a PO file into memory. The file name is given as argument. The return value is a handle to the PO file's contents, valid until `po_file_free' is called on it. In case of error, the return value is `NULL', and `errno' is set. -- Function: void po_file_free (po_file_t FILE) The `po_file_free' function frees a PO file's contents from memory, including all messages that are only implicitly accessible through iterators. -- Function: const char * const * po_file_domains (po_file_t FILE) The `po_file_domains' function returns the domains for which the given PO file has messages. The return value is a `NULL' terminated array which is valid as long as the FILE handle is valid. For PO files which contain no `domain' directive, the return value contains only one domain, namely the default domain `"messages"'. -- Function: po_message_iterator_t po_message_iterator (po_file_t FILE, const char *DOMAIN) The `po_message_iterator' returns an iterator that will produce the messages of FILE that belong to the given DOMAIN. If DOMAIN is `NULL', the default domain is used instead. To list the messages, use the function `po_next_message' repeatedly. -- Function: void po_message_iterator_free (po_message_iterator_t ITERATOR) The `po_message_iterator_free' function frees an iterator previously allocated through the `po_message_iterator' function. -- Function: po_message_t po_next_message (po_message_iterator_t ITERATOR) The `po_next_message' function returns the next message from ITERATOR and advances the iterator. It returns `NULL' when the iterator has reached the end of its message list. The following functions returns details of a `po_message_t'. Recall that the results are valid as long as the FILE handle is valid. -- Function: const char * po_message_msgid (po_message_t MESSAGE) The `po_message_msgid' function returns the `msgid' (untranslated English string) of a message. This is guaranteed to be non-`NULL'. -- Function: const char * po_message_msgid_plural (po_message_t MESSAGE) The `po_message_msgid_plural' function returns the `msgid_plural' (untranslated English plural string) of a message with plurals, or `NULL' for a message without plural. -- Function: const char * po_message_msgstr (po_message_t MESSAGE) The `po_message_msgstr' function returns the `msgstr' (translation) of a message. For an untranslated message, the return value is an empty string. -- Function: const char * po_message_msgstr_plural (po_message_t MESSAGE, int INDEX) The `po_message_msgstr_plural' function returns the `msgstr[INDEX]' of a message with plurals, or `NULL' when the INDEX is out of range or for a message without plural. Here is an example code how these functions can be used. const char *filename = ...; po_file_t file = po_file_read (filename); if (file == NULL) error (EXIT_FAILURE, errno, "couldn't open the PO file %s", filename); { const char * const *domains = po_file_domains (file); const char * const *domainp; for (domainp = domains; *domainp; domainp++) { const char *domain = *domainp; po_message_iterator_t iterator = po_message_iterator (file, domain); for (;;) { po_message_t *message = po_next_message (iterator); if (message == NULL) break; { const char *msgid = po_message_msgid (message); const char *msgstr = po_message_msgstr (message); ... } } po_message_iterator_free (iterator); } } po_file_free (file);  File: gettext.info, Node: Binaries, Next: Programmers, Prev: Manipulating, Up: Top 10 Producing Binary MO Files **************************** * Menu: * msgfmt Invocation:: Invoking the `msgfmt' Program * msgunfmt Invocation:: Invoking the `msgunfmt' Program * MO Files:: The Format of GNU MO Files  File: gettext.info, Node: msgfmt Invocation, Next: msgunfmt Invocation, Prev: Binaries, Up: Binaries 10.1 Invoking the `msgfmt' Program ================================== msgfmt [OPTION] FILENAME.po ... The `msgfmt' programs generates a binary message catalog from a textual translation description. 10.1.1 Input file location -------------------------- `FILENAME.po ...' `-D DIRECTORY' `--directory=DIRECTORY' Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting `.po' file will be written relative to the current directory, though. If an input file is `-', standard input is read. 10.1.2 Operation mode --------------------- `-j' `--java' Java mode: generate a Java `ResourceBundle' class. `--java2' Like -java, and assume Java2 (JDK 1.2 or higher). `--csharp' C# mode: generate a .NET .dll file containing a subclass of `GettextResourceSet'. `--csharp-resources' C# resources mode: generate a .NET `.resources' file. `--tcl' Tcl mode: generate a tcl/msgcat `.msg' file. `--qt' Qt mode: generate a Qt `.qm' file. 10.1.3 Output file location --------------------------- `-o FILE' `--output-file=FILE' Write output to specified file. `--strict' Direct the program to work strictly following the Uniforum/Sun implementation. Currently this only affects the naming of the output file. If this option is not given the name of the output file is the same as the domain name. If the strict Uniforum mode is enabled the suffix `.mo' is added to the file name if it is not already present. We find this behaviour of Sun's implementation rather silly and so by default this mode is _not_ selected. If the output FILE is `-', output is written to standard output. 10.1.4 Output file location in Java mode ---------------------------------------- `-r RESOURCE' `--resource=RESOURCE' Specify the resource name. `-l LOCALE' `--locale=LOCALE' Specify the locale name, either a language specification of the form LL or a combined language and country specification of the form LL_CC. `-d DIRECTORY' Specify the base directory of classes directory hierarchy. The class name is determined by appending the locale name to the resource name, separated with an underscore. The `-d' option is mandatory. The class is written under the specified directory. 10.1.5 Output file location in C# mode -------------------------------------- `-r RESOURCE' `--resource=RESOURCE' Specify the resource name. `-l LOCALE' `--locale=LOCALE' Specify the locale name, either a language specification of the form LL or a combined language and country specification of the form LL_CC. `-d DIRECTORY' Specify the base directory for locale dependent `.dll' files. The `-l' and `-d' options are mandatory. The `.dll' file is written in a subdirectory of the specified directory whose name depends on the locale. 10.1.6 Output file location in Tcl mode --------------------------------------- `-l LOCALE' `--locale=LOCALE' Specify the locale name, either a language specification of the form LL or a combined language and country specification of the form LL_CC. `-d DIRECTORY' Specify the base directory of `.msg' message catalogs. The `-l' and `-d' options are mandatory. The `.msg' file is written in the specified directory. 10.1.7 Input file syntax ------------------------ `-P' `--properties-input' Assume the input files are Java ResourceBundles in Java `.properties' syntax, not in PO file syntax. `--stringtable-input' Assume the input files are NeXTstep/GNUstep localized resource files in `.strings' syntax, not in PO file syntax. 10.1.8 Input file interpretation -------------------------------- `-c' `--check' Perform all the checks implied by `--check-format', `--check-header', `--check-domain'. `--check-format' Check language dependent format strings. If the string represents a format string used in a `printf'-like function both strings should have the same number of `%' format specifiers, with matching types. If the flag `c-format' or `possible-c-format' appears in the special comment <#,> for this entry a check is performed. For example, the check will diagnose using `%.*s' against `%s', or `%d' against `%s', or `%d' against `%x'. It can even handle positional parameters. Normally the `xgettext' program automatically decides whether a string is a format string or not. This algorithm is not perfect, though. It might regard a string as a format string though it is not used in a `printf'-like function and so `msgfmt' might report errors where there are none. To solve this problem the programmer can dictate the decision to the `xgettext' program (*note c-format::). The translator should not consider removing the flag from the <#,> line. This "fix" would be reversed again as soon as `msgmerge' is called the next time. `--check-header' Verify presence and contents of the header entry. *Note Header Entry::, for a description of the various fields in the header entry. `--check-domain' Check for conflicts between domain directives and the `--output-file' option `-C' `--check-compatibility' Check that GNU msgfmt behaves like X/Open msgfmt. This will give an error when attempting to use the GNU extensions. `--check-accelerators[=CHAR]' Check presence of keyboard accelerators for menu items. This is based on the convention used in some GUIs that a keyboard accelerator in a menu item string is designated by an immediately preceding `&' character. Sometimes a keyboard accelerator is also called "keyboard mnemonic". This check verifies that if the untranslated string has exactly one `&' character, the translated string has exactly one `&' as well. If this option is given with a CHAR argument, this CHAR should be a non-alphanumeric character and is used as keyboard accelerator mark instead of `&'. `-f' `--use-fuzzy' Use fuzzy entries in output. Note that using this option is usually wrong, because fuzzy messages are exactly those which have not been validated by a human translator. 10.1.9 Output details --------------------- `-a NUMBER' `--alignment=NUMBER' Align strings to NUMBER bytes (default: 1). `--no-hash' Don't include a hash table in the binary file. Lookup will be more expensive at run time (binary search instead of hash table lookup). 10.1.10 Informative output -------------------------- `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit. `--statistics' Print statistics about translations. When the option `--verbose' is used in combination with `--statistics', the input file name is printed in front of the statistics line. `-v' `--verbose' Increase verbosity level.  File: gettext.info, Node: msgunfmt Invocation, Next: MO Files, Prev: msgfmt Invocation, Up: Binaries 10.2 Invoking the `msgunfmt' Program ==================================== msgunfmt [OPTION] [FILE]... The `msgunfmt' program converts a binary message catalog to a Uniforum style .po file. 10.2.1 Operation mode --------------------- `-j' `--java' Java mode: input is a Java `ResourceBundle' class. `--csharp' C# mode: input is a .NET .dll file containing a subclass of `GettextResourceSet'. `--csharp-resources' C# resources mode: input is a .NET `.resources' file. `--tcl' Tcl mode: input is a tcl/msgcat `.msg' file. 10.2.2 Input file location -------------------------- `FILE ...' Input .mo files. If no input FILE is given or if it is `-', standard input is read. 10.2.3 Input file location in Java mode --------------------------------------- `-r RESOURCE' `--resource=RESOURCE' Specify the resource name. `-l LOCALE' `--locale=LOCALE' Specify the locale name, either a language specification of the form LL or a combined language and country specification of the form LL_CC. The class name is determined by appending the locale name to the resource name, separated with an underscore. The class is located using the `CLASSPATH'. 10.2.4 Input file location in C# mode ------------------------------------- `-r RESOURCE' `--resource=RESOURCE' Specify the resource name. `-l LOCALE' `--locale=LOCALE' Specify the locale name, either a language specification of the form LL or a combined language and country specification of the form LL_CC. `-d DIRECTORY' Specify the base directory for locale dependent `.dll' files. The `-l' and `-d' options are mandatory. The `.msg' file is located in a subdirectory of the specified directory whose name depends on the locale. 10.2.5 Input file location in Tcl mode -------------------------------------- `-l LOCALE' `--locale=LOCALE' Specify the locale name, either a language specification of the form LL or a combined language and country specification of the form LL_CC. `-d DIRECTORY' Specify the base directory of `.msg' message catalogs. The `-l' and `-d' options are mandatory. The `.msg' file is located in the specified directory. 10.2.6 Output file location --------------------------- `-o FILE' `--output-file=FILE' Write output to specified file. The results are written to standard output if no output file is specified or if it is `-'. 10.2.7 Output details --------------------- `--color' `--color=WHEN' Specify whether or when to use colors and other text attributes. See *note The --color option:: for details. `--style=STYLE_FILE' Specify the CSS style rule file to use for `--color'. See *note The --style option:: for details. `--force-po' Always write an output file even if it contains no message. `-i' `--indent' Write the .po file using indented style. `--strict' Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions. `-p' `--properties-output' Write out a Java ResourceBundle in Java `.properties' syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages. `--stringtable-output' Write out a NeXTstep/GNUstep localized resource file in `.strings' syntax. Note that this file format doesn't support plural forms. `-w NUMBER' `--width=NUMBER' Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER. `--no-wrap' Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split. `-s' `--sort-output' Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context. 10.2.8 Informative output ------------------------- `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit. `-v' `--verbose' Increase verbosity level.  File: gettext.info, Node: MO Files, Prev: msgunfmt Invocation, Up: Binaries 10.3 The Format of GNU MO Files =============================== The format of the generated MO files is best described by a picture, which appears below. The first two words serve the identification of the file. The magic number will always signal GNU MO files. The number is stored in the byte order of the generating machine, so the magic number really is two numbers: `0x950412de' and `0xde120495'. The second word describes the current revision of the file format, composed of a major and a minor revision number. The revision numbers ensure that the readers of MO files can distinguish new formats from old ones and handle their contents, as far as possible. For now the major revision is 0 or 1, and the minor revision is also 0 or 1. More revisions might be added in the future. A program seeing an unexpected major revision number should stop reading the MO file entirely; whereas an unexpected minor revision number means that the file can be read but will not reveal its full contents, when parsed by a program that supports only smaller minor revision numbers. The version is kept separate from the magic number, instead of using different magic numbers for different formats, mainly because `/etc/magic' is not updated often. Follow a number of pointers to later tables in the file, allowing for the extension of the prefix part of MO files without having to recompile programs reading them. This might become useful for later inserting a few flag bits, indication about the charset used, new tables, or other things. Then, at offset O and offset T in the picture, two tables of string descriptors can be found. In both tables, each string descriptor uses two 32 bits integers, one for the string length, another for the offset of the string in the MO file, counting in bytes from the start of the file. The first table contains descriptors for the original strings, and is sorted so the original strings are in increasing lexicographical order. The second table contains descriptors for the translated strings, and is parallel to the first table: to find the corresponding translation one has to access the array slot in the second array with the same index. Having the original strings sorted enables the use of simple binary search, for when the MO file does not contain an hashing table, or for when it is not practical to use the hashing table provided in the MO file. This also has another advantage, as the empty string in a PO file GNU `gettext' is usually _translated_ into some system information attached to that particular MO file, and the empty string necessarily becomes the first in both the original and translated tables, making the system information very easy to find. The size S of the hash table can be zero. In this case, the hash table itself is not contained in the MO file. Some people might prefer this because a precomputed hashing table takes disk space, and does not win _that_ much speed. The hash table contains indices to the sorted array of strings in the MO file. Conflict resolution is done by double hashing. The precise hashing algorithm used is fairly dependent on GNU `gettext' code, and is not documented here. As for the strings themselves, they follow the hash file, and each is terminated with a <NUL>, and this <NUL> is not counted in the length which appears in the string descriptor. The `msgfmt' program has an option selecting the alignment for MO file strings. With this option, each string is separately aligned so it starts at an offset which is a multiple of the alignment value. On some RISC machines, a correct alignment will speed things up. Contexts are stored by storing the concatenation of the context, a <EOT> byte, and the original string, instead of the original string. Plural forms are stored by letting the plural of the original string follow the singular of the original string, separated through a <NUL> byte. The length which appears in the string descriptor includes both. However, only the singular of the original string takes part in the hash table lookup. The plural variants of the translation are all stored consecutively, separated through a <NUL> byte. Here also, the length in the string descriptor includes all of them. Nothing prevents a MO file from having embedded <NUL>s in strings. However, the program interface currently used already presumes that strings are <NUL> terminated, so embedded <NUL>s are somewhat useless. But the MO file format is general enough so other interfaces would be later possible, if for example, we ever want to implement wide characters right in MO files, where <NUL> bytes may accidentally appear. (No, we don't want to have wide characters in MO files. They would make the file unnecessarily large, and the `wchar_t' type being platform dependent, MO files would be platform dependent as well.) This particular issue has been strongly debated in the GNU `gettext' development forum, and it is expectable that MO file format will evolve or change over time. It is even possible that many formats may later be supported concurrently. But surely, we have to start somewhere, and the MO file format described here is a good start. Nothing is cast in concrete, and the format may later evolve fairly easily, so we should feel comfortable with the current approach. byte +------------------------------------------+ 0 | magic number = 0x950412de | | | 4 | file format revision = 0 | | | 8 | number of strings | == N | | 12 | offset of table with original strings | == O | | 16 | offset of table with translation strings | == T | | 20 | size of hashing table | == S | | 24 | offset of hashing table | == H | | . . . (possibly more entries later) . . . | | O | length & offset 0th string ----------------. O + 8 | length & offset 1st string ------------------. ... ... | | O + ((N-1)*8)| length & offset (N-1)th string | | | | | | | T | length & offset 0th translation ---------------. T + 8 | length & offset 1st translation -----------------. ... ... | | | | T + ((N-1)*8)| length & offset (N-1)th translation | | | | | | | | | | | H | start hash table | | | | | ... ... | | | | H + S * 4 | end hash table | | | | | | | | | | | | NUL terminated 0th string <----------------' | | | | | | | | | NUL terminated 1st string <------------------' | | | | | | ... ... | | | | | | | NUL terminated 0th translation <---------------' | | | | | NUL terminated 1st translation <-----------------' | | ... ... | | +------------------------------------------+  File: gettext.info, Node: Programmers, Next: Translators, Prev: Binaries, Up: Top 11 The Programmer's View ************************ One aim of the current message catalog implementation provided by GNU `gettext' was to use the system's message catalog handling, if the installer wishes to do so. So we perhaps should first take a look at the solutions we know about. The people in the POSIX committee did not manage to agree on one of the semi-official standards which we'll describe below. In fact they couldn't agree on anything, so they decided only to include an example of an interface. The major Unix vendors are split in the usage of the two most important specifications: X/Open's catgets vs. Uniforum's gettext interface. We'll describe them both and later explain our solution of this dilemma. * Menu: * catgets:: About `catgets' * gettext:: About `gettext' * Comparison:: Comparing the two interfaces * Using libintl.a:: Using libintl.a in own programs * gettext grok:: Being a `gettext' grok * Temp Programmers:: Temporary Notes for the Programmers Chapter  File: gettext.info, Node: catgets, Next: gettext, Prev: Programmers, Up: Programmers 11.1 About `catgets' ==================== The `catgets' implementation is defined in the X/Open Portability Guide, Volume 3, XSI Supplementary Definitions, Chapter 5. But the process of creating this standard seemed to be too slow for some of the Unix vendors so they created their implementations on preliminary versions of the standard. Of course this leads again to problems while writing platform independent programs: even the usage of `catgets' does not guarantee a unique interface. Another, personal comment on this that only a bunch of committee members could have made this interface. They never really tried to program using this interface. It is a fast, memory-saving implementation, an user can happily live with it. But programmers hate it (at least I and some others do...) But we must not forget one point: after all the trouble with transferring the rights on Unix(tm) they at last came to X/Open, the very same who published this specification. This leads me to making the prediction that this interface will be in future Unix standards (e.g. Spec1170) and therefore part of all Unix implementation (implementations, which are _allowed_ to wear this name). * Menu: * Interface to catgets:: The interface * Problems with catgets:: Problems with the `catgets' interface?!  File: gettext.info, Node: Interface to catgets, Next: Problems with catgets, Prev: catgets, Up: catgets 11.1.1 The Interface -------------------- The interface to the `catgets' implementation consists of three functions which correspond to those used in file access: `catopen' to open the catalog for using, `catgets' for accessing the message tables, and `catclose' for closing after work is done. Prototypes for the functions and the needed definitions are in the `<nl_types.h>' header file. `catopen' is used like in this: nl_catd catd = catopen ("catalog_name", 0); The function takes as the argument the name of the catalog. This usual refers to the name of the program or the package. The second parameter is not further specified in the standard. I don't even know whether it is implemented consistently among various systems. So the common advice is to use `0' as the value. The return value is a handle to the message catalog, equivalent to handles to file returned by `open'. This handle is of course used in the `catgets' function which can be used like this: char *translation = catgets (catd, set_no, msg_id, "original string"); The first parameter is this catalog descriptor. The second parameter specifies the set of messages in this catalog, in which the message described by `msg_id' is obtained. `catgets' therefore uses a three-stage addressing: catalog name => set number => message ID => translation The fourth argument is not used to address the translation. It is given as a default value in case when one of the addressing stages fail. One important thing to remember is that although the return type of catgets is `char *' the resulting string _must not_ be changed. It should better be `const char *', but the standard is published in 1988, one year before ANSI C. The last of these functions is used and behaves as expected: catclose (catd); After this no `catgets' call using the descriptor is legal anymore.  File: gettext.info, Node: Problems with catgets, Prev: Interface to catgets, Up: catgets 11.1.2 Problems with the `catgets' Interface?! ---------------------------------------------- Now that this description seemed to be really easy -- where are the problems we speak of? In fact the interface could be used in a reasonable way, but constructing the message catalogs is a pain. The reason for this lies in the third argument of `catgets': the unique message ID. This has to be a numeric value for all messages in a single set. Perhaps you could imagine the problems keeping such a list while changing the source code. Add a new message here, remove one there. Of course there have been developed a lot of tools helping to organize this chaos but one as the other fails in one aspect or the other. We don't want to say that the other approach has no problems but they are far more easy to manage.  File: gettext.info, Node: gettext, Next: Comparison, Prev: catgets, Up: Programmers 11.2 About `gettext' ==================== The definition of the `gettext' interface comes from a Uniforum proposal. It was submitted there by Sun, who had implemented the `gettext' function in SunOS 4, around 1990. Nowadays, the `gettext' interface is specified by the OpenI18N standard. The main point about this solution is that it does not follow the method of normal file handling (open-use-close) and that it does not burden the programmer with so many tasks, especially the unique key handling. Of course here also a unique key is needed, but this key is the message itself (how long or short it is). See *note Comparison:: for a more detailed comparison of the two methods. The following section contains a rather detailed description of the interface. We make it that detailed because this is the interface we chose for the GNU `gettext' Library. Programmers interested in using this library will be interested in this description. * Menu: * Interface to gettext:: The interface * Ambiguities:: Solving ambiguities * Locating Catalogs:: Locating message catalog files * Charset conversion:: How to request conversion to Unicode * Contexts:: Solving ambiguities in GUI programs * Plural forms:: Additional functions for handling plurals * Optimized gettext:: Optimization of the *gettext functions  File: gettext.info, Node: Interface to gettext, Next: Ambiguities, Prev: gettext, Up: gettext 11.2.1 The Interface -------------------- The minimal functionality an interface must have is a) to select a domain the strings are coming from (a single domain for all programs is not reasonable because its construction and maintenance is difficult, perhaps impossible) and b) to access a string in a selected domain. This is principally the description of the `gettext' interface. It has a global domain which unqualified usages reference. Of course this domain is selectable by the user. char *textdomain (const char *domain_name); This provides the possibility to change or query the current status of the current global domain of the `LC_MESSAGE' category. The argument is a null-terminated string, whose characters must be legal in the use in filenames. If the DOMAIN_NAME argument is `NULL', the function returns the current value. If no value has been set before, the name of the default domain is returned: _messages_. Please note that although the return value of `textdomain' is of type `char *' no changing is allowed. It is also important to know that no checks of the availability are made. If the name is not available you will see this by the fact that no translations are provided. To use a domain set by `textdomain' the function char *gettext (const char *msgid); is to be used. This is the simplest reasonable form one can imagine. The translation of the string MSGID is returned if it is available in the current domain. If it is not available, the argument itself is returned. If the argument is `NULL' the result is undefined. One thing which should come into mind is that no explicit dependency to the used domain is given. The current value of the domain is used. If this changes between two executions of the same `gettext' call in the program, both calls reference a different message catalog. For the easiest case, which is normally used in internationalized packages, once at the beginning of execution a call to `textdomain' is issued, setting the domain to a unique name, normally the package name. In the following code all strings which have to be translated are filtered through the gettext function. That's all, the package speaks your language.  File: gettext.info, Node: Ambiguities, Next: Locating Catalogs, Prev: Interface to gettext, Up: gettext 11.2.2 Solving Ambiguities -------------------------- While this single name domain works well for most applications there might be the need to get translations from more than one domain. Of course one could switch between different domains with calls to `textdomain', but this is really not convenient nor is it fast. A possible situation could be one case subject to discussion during this writing: all error messages of functions in the set of common used functions should go into a separate domain `error'. By this mean we would only need to translate them once. Another case are messages from a library, as these _have_ to be independent of the current domain set by the application. For this reasons there are two more functions to retrieve strings: char *dgettext (const char *domain_name, const char *msgid); char *dcgettext (const char *domain_name, const char *msgid, int category); Both take an additional argument at the first place, which corresponds to the argument of `textdomain'. The third argument of `dcgettext' allows to use another locale category but `LC_MESSAGES'. But I really don't know where this can be useful. If the DOMAIN_NAME is `NULL' or CATEGORY has an value beside the known ones, the result is undefined. It should also be noted that this function is not part of the second known implementation of this function family, the one found in Solaris. A second ambiguity can arise by the fact, that perhaps more than one domain has the same name. This can be solved by specifying where the needed message catalog files can be found. char *bindtextdomain (const char *domain_name, const char *dir_name); Calling this function binds the given domain to a file in the specified directory (how this file is determined follows below). Especially a file in the systems default place is not favored against the specified file anymore (as it would be by solely using `textdomain'). A `NULL' pointer for the DIR_NAME parameter returns the binding associated with DOMAIN_NAME. If DOMAIN_NAME itself is `NULL' nothing happens and a `NULL' pointer is returned. Here again as for all the other functions is true that none of the return value must be changed! It is important to remember that relative path names for the DIR_NAME parameter can be trouble. Since the path is always computed relative to the current directory different results will be achieved when the program executes a `chdir' command. Relative paths should always be avoided to avoid dependencies and unreliabilities.  File: gettext.info, Node: Locating Catalogs, Next: Charset conversion, Prev: Ambiguities, Up: gettext 11.2.3 Locating Message Catalog Files ------------------------------------- Because many different languages for many different packages have to be stored we need some way to add these information to file message catalog files. The way usually used in Unix environments is have this encoding in the file name. This is also done here. The directory name given in `bindtextdomain's second argument (or the default directory), followed by the name of the locale, the locale category, and the domain name are concatenated: DIR_NAME/LOCALE/LC_CATEGORY/DOMAIN_NAME.mo The default value for DIR_NAME is system specific. For the GNU library, and for packages adhering to its conventions, it's: /usr/local/share/locale LOCALE is the name of the locale category which is designated by `LC_CATEGORY'. For `gettext' and `dgettext' this `LC_CATEGORY' is always `LC_MESSAGES'.(1) The name of the locale category is determined through `setlocale (LC_CATEGORY, NULL)'. (2) When using the function `dcgettext', you can specify the locale category through the third argument. ---------- Footnotes ---------- (1) Some system, e.g. mingw, don't have `LC_MESSAGES'. Here we use a more or less arbitrary value for it, namely 1729, the smallest positive integer which can be represented in two different ways as the sum of two cubes. (2) When the system does not support `setlocale' its behavior in setting the locale values is simulated by looking at the environment variables.  File: gettext.info, Node: Charset conversion, Next: Contexts, Prev: Locating Catalogs, Up: gettext 11.2.4 How to specify the output character set `gettext' uses ------------------------------------------------------------- `gettext' not only looks up a translation in a message catalog. It also converts the translation on the fly to the desired output character set. This is useful if the user is working in a different character set than the translator who created the message catalog, because it avoids distributing variants of message catalogs which differ only in the character set. The output character set is, by default, the value of `nl_langinfo (CODESET)', which depends on the `LC_CTYPE' part of the current locale. But programs which store strings in a locale independent way (e.g. UTF-8) can request that `gettext' and related functions return the translations in that encoding, by use of the `bind_textdomain_codeset' function. Note that the MSGID argument to `gettext' is not subject to character set conversion. Also, when `gettext' does not find a translation for MSGID, it returns MSGID unchanged - independently of the current output character set. It is therefore recommended that all MSGIDs be US-ASCII strings. -- Function: char * bind_textdomain_codeset (const char *DOMAINNAME, const char *CODESET) The `bind_textdomain_codeset' function can be used to specify the output character set for message catalogs for domain DOMAINNAME. The CODESET argument must be a valid codeset name which can be used for the `iconv_open' function, or a null pointer. If the CODESET parameter is the null pointer, `bind_textdomain_codeset' returns the currently selected codeset for the domain with the name DOMAINNAME. It returns `NULL' if no codeset has yet been selected. The `bind_textdomain_codeset' function can be used several times. If used multiple times with the same DOMAINNAME argument, the later call overrides the settings made by the earlier one. The `bind_textdomain_codeset' function returns a pointer to a string containing the name of the selected codeset. The string is allocated internally in the function and must not be changed by the user. If the system went out of core during the execution of `bind_textdomain_codeset', the return value is `NULL' and the global variable ERRNO is set accordingly.  File: gettext.info, Node: Contexts, Next: Plural forms, Prev: Charset conversion, Up: gettext 11.2.5 Using contexts for solving ambiguities --------------------------------------------- One place where the `gettext' functions, if used normally, have big problems is within programs with graphical user interfaces (GUIs). The problem is that many of the strings which have to be translated are very short. They have to appear in pull-down menus which restricts the length. But strings which are not containing entire sentences or at least large fragments of a sentence may appear in more than one situation in the program but might have different translations. This is especially true for the one-word strings which are frequently used in GUI programs. As a consequence many people say that the `gettext' approach is wrong and instead `catgets' should be used which indeed does not have this problem. But there is a very simple and powerful method to handle this kind of problems with the `gettext' functions. Contexts can be added to strings to be translated. A context dependent translation lookup is when a translation for a given string is searched, that is limited to a given context. The translation for the same string in a different context can be different. The different translations of the same string in different contexts can be stored in the in the same MO file, and can be edited by the translator in the same PO file. The `gettext.h' include file contains the lookup macros for strings with contexts. They are implemented as thin macros and inline functions over the functions from `<libintl.h>'. const char *pgettext (const char *msgctxt, const char *msgid); In a call of this macro, MSGCTXT and MSGID must be string literals. The macro returns the translation of MSGID, restricted to the context given by MSGCTXT. The MSGCTXT string is visible in the PO file to the translator. You should try to make it somehow canonical and never changing. Because every time you change an MSGCTXT, the translator will have to review the translation of MSGID. Finding a canonical MSGCTXT string that doesn't change over time can be hard. But you shouldn't use the file name or class name containing the `pgettext' call - because it is a common development task to rename a file or a class, and it shouldn't cause translator work. Also you shouldn't use a comment in the form of a complete English sentence as MSGCTXT - because orthography or grammar changes are often applied to such sentences, and again, it shouldn't force the translator to do a review. The `p' in `pgettext' stands for "particular": `pgettext' fetches a particular translation of the MSGID. const char *dpgettext (const char *domain_name, const char *msgctxt, const char *msgid); const char *dcpgettext (const char *domain_name, const char *msgctxt, const char *msgid, int category); These are generalizations of `pgettext'. They behave similarly to `dgettext' and `dcgettext', respectively. The DOMAIN_NAME argument defines the translation domain. The CATEGORY argument allows to use another locale category than `LC_MESSAGES'. As as example consider the following fictional situation. A GUI program has a menu bar with the following entries: +------------+------------+--------------------------------------+ | File | Printer | | +------------+------------+--------------------------------------+ | Open | | Select | | New | | Open | +----------+ | Connect | +----------+ To have the strings `File', `Printer', `Open', `New', `Select', and `Connect' translated there has to be at some point in the code a call to a function of the `gettext' family. But in two places the string passed into the function would be `Open'. The translations might not be the same and therefore we are in the dilemma described above. What distinguishes the two places is the menu path from the menu root to the particular menu entries: Menu|File Menu|Printer Menu|File|Open Menu|File|New Menu|Printer|Select Menu|Printer|Open Menu|Printer|Connect The context is thus the menu path without its last part. So, the calls look like this: pgettext ("Menu|", "File") pgettext ("Menu|", "Printer") pgettext ("Menu|File|", "Open") pgettext ("Menu|File|", "New") pgettext ("Menu|Printer|", "Select") pgettext ("Menu|Printer|", "Open") pgettext ("Menu|Printer|", "Connect") Whether or not to use the `|' character at the end of the context is a matter of style. For more complex cases, where the MSGCTXT or MSGID are not string literals, more general macros are available: const char *pgettext_expr (const char *msgctxt, const char *msgid); const char *dpgettext_expr (const char *domain_name, const char *msgctxt, const char *msgid); const char *dcpgettext_expr (const char *domain_name, const char *msgctxt, const char *msgid, int category); Here MSGCTXT and MSGID can be arbitrary string-valued expressions. These macros are more general. But in the case that both argument expressions are string literals, the macros without the `_expr' suffix are more efficient.  File: gettext.info, Node: Plural forms, Next: Optimized gettext, Prev: Contexts, Up: gettext 11.2.6 Additional functions for plural forms -------------------------------------------- The functions of the `gettext' family described so far (and all the `catgets' functions as well) have one problem in the real world which have been neglected completely in all existing approaches. What is meant here is the handling of plural forms. Looking through Unix source code before the time anybody thought about internationalization (and, sadly, even afterwards) one can often find code similar to the following: printf ("%d file%s deleted", n, n == 1 ? "" : "s"); After the first complaints from people internationalizing the code people either completely avoided formulations like this or used strings like `"file(s)"'. Both look unnatural and should be avoided. First tries to solve the problem correctly looked like this: if (n == 1) printf ("%d file deleted", n); else printf ("%d files deleted", n); But this does not solve the problem. It helps languages where the plural form of a noun is not simply constructed by adding an `s' but that is all. Once again people fell into the trap of believing the rules their language is using are universal. But the handling of plural forms differs widely between the language families. For example, Rafal Maszkowski `<rzm@mat.uni.torun.pl>' reports: In Polish we use e.g. plik (file) this way: 1 plik 2,3,4 pliki 5-21 pliko'w 22-24 pliki 25-31 pliko'w and so on (o' means 8859-2 oacute which should be rather okreska, similar to aogonek). There are two things which can differ between languages (and even inside language families); * The form how plural forms are built differs. This is a problem with languages which have many irregularities. German, for instance, is a drastic case. Though English and German are part of the same language family (Germanic), the almost regular forming of plural noun forms (appending an `s') is hardly found in German. * The number of plural forms differ. This is somewhat surprising for those who only have experiences with Romanic and Germanic languages since here the number is the same (there are two). But other language families have only one form or many forms. More information on this in an extra section. The consequence of this is that application writers should not try to solve the problem in their code. This would be localization since it is only usable for certain, hardcoded language environments. Instead the extended `gettext' interface should be used. These extra functions are taking instead of the one key string two strings and a numerical argument. The idea behind this is that using the numerical argument and the first string as a key, the implementation can select using rules specified by the translator the right plural form. The two string arguments then will be used to provide a return value in case no message catalog is found (similar to the normal `gettext' behavior). In this case the rules for Germanic language is used and it is assumed that the first string argument is the singular form, the second the plural form. This has the consequence that programs without language catalogs can display the correct strings only if the program itself is written using a Germanic language. This is a limitation but since the GNU C library (as well as the GNU `gettext' package) are written as part of the GNU package and the coding standards for the GNU project require program being written in English, this solution nevertheless fulfills its purpose. -- Function: char * ngettext (const char *MSGID1, const char *MSGID2, unsigned long int N) The `ngettext' function is similar to the `gettext' function as it finds the message catalogs in the same way. But it takes two extra arguments. The MSGID1 parameter must contain the singular form of the string to be converted. It is also used as the key for the search in the catalog. The MSGID2 parameter is the plural form. The parameter N is used to determine the plural form. If no message catalog is found MSGID1 is returned if `n == 1', otherwise `msgid2'. An example for the use of this function is: printf (ngettext ("%d file removed", "%d files removed", n), n); Please note that the numeric value N has to be passed to the `printf' function as well. It is not sufficient to pass it only to `ngettext'. In the English singular case, the number - always 1 - can be replaced with "one": printf (ngettext ("One file removed", "%d files removed", n), n); This works because the `printf' function discards excess arguments that are not consumed by the format string. If this function is meant to yield a format string that takes two or more arguments, you can not use it like this: printf (ngettext ("%d file removed from directory %s", "%d files removed from directory %s", n, dir), n); because in many languages the translators want to replace the `%d' with an explicit word in the singular case, just like "one" in English, and C format strings cannot consume the second argument but skip the first argument. Instead, you have to reorder the arguments so that `n' comes last: printf (ngettext ("%$2d file removed from directory %$1s", "%$2d files removed from directory %$1s", dir, n), n); See *note c-format:: for details about this argument reordering syntax. When you know that the value of `n' is within a given range, you can specify it as a comment directed to the `xgettext' tool. This information may help translators to use more adequate translations. Like this: if (days > 7 && days < 14) /* xgettext: range: 1..6 */ printf (ngettext ("one week and one day", "one week and %d days", days - 7), days - 7); It is also possible to use this function when the strings don't contain a cardinal number: puts (ngettext ("Delete the selected file?", "Delete the selected files?", n)); In this case the number N is only used to choose the plural form. -- Function: char * dngettext (const char *DOMAIN, const char *MSGID1, const char *MSGID2, unsigned long int N) The `dngettext' is similar to the `dgettext' function in the way the message catalog is selected. The difference is that it takes two extra parameter to provide the correct plural form. These two parameters are handled in the same way `ngettext' handles them. -- Function: char * dcngettext (const char *DOMAIN, const char *MSGID1, const char *MSGID2, unsigned long int N, int CATEGORY) The `dcngettext' is similar to the `dcgettext' function in the way the message catalog is selected. The difference is that it takes two extra parameter to provide the correct plural form. These two parameters are handled in the same way `ngettext' handles them. Now, how do these functions solve the problem of the plural forms? Without the input of linguists (which was not available) it was not possible to determine whether there are only a few different forms in which plural forms are formed or whether the number can increase with every new supported language. Therefore the solution implemented is to allow the translator to specify the rules of how to select the plural form. Since the formula varies with every language this is the only viable solution except for hardcoding the information in the code (which still would require the possibility of extensions to not prevent the use of new languages). The information about the plural form selection has to be stored in the header entry of the PO file (the one with the empty `msgid' string). The plural form information looks like this: Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1; The `nplurals' value must be a decimal number which specifies how many different plural forms exist for this language. The string following `plural' is an expression which is using the C language syntax. Exceptions are that no negative numbers are allowed, numbers must be decimal, and the only variable allowed is `n'. Spaces are allowed in the expression, but backslash-newlines are not; in the examples below the backslash-newlines are present for formatting purposes only. This expression will be evaluated whenever one of the functions `ngettext', `dngettext', or `dcngettext' is called. The numeric value passed to these functions is then substituted for all uses of the variable `n' in the expression. The resulting value then must be greater or equal to zero and smaller than the value given as the value of `nplurals'. The following rules are known at this point. The language with families are listed. But this does not necessarily mean the information can be generalized for the whole family (as can be easily seen in the table below).(1) Only one form: Some languages only require one single form. There is no distinction between the singular and plural form. An appropriate header entry would look like this: Plural-Forms: nplurals=1; plural=0; Languages with this property include: Asian family Japanese, Vietnamese, Korean Two forms, singular used for one only This is the form used in most existing programs since it is what English is using. A header entry would look like this: Plural-Forms: nplurals=2; plural=n != 1; (Note: this uses the feature of C expressions that boolean expressions have to value zero or one.) Languages with this property include: Germanic family English, German, Dutch, Swedish, Danish, Norwegian, Faroese Romanic family Spanish, Portuguese, Italian, Bulgarian Latin/Greek family Greek Finno-Ugric family Finnish, Estonian Semitic family Hebrew Artificial Esperanto Other languages using the same header entry are: Finno-Ugric family Hungarian Turkic/Altaic family Turkish Hungarian does not appear to have a plural if you look at sentences involving cardinal numbers. For example, "1 apple" is "1 alma", and "123 apples" is "123 alma". But when the number is not explicit, the distinction between singular and plural exists: "the apple" is "az alma", and "the apples" is "az almák". Since `ngettext' has to support both types of sentences, it is classified here, under "two forms". The same holds for Turkish: "1 apple" is "1 elma", and "123 apples" is "123 elma". But when the number is omitted, the distinction between singular and plural exists: "the apple" is "elma", and "the apples" is "elmalar". Two forms, singular used for zero and one Exceptional case in the language family. The header entry would be: Plural-Forms: nplurals=2; plural=n>1; Languages with this property include: Romanic family Brazilian Portuguese, French Three forms, special case for zero The header entry would be: Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2; Languages with this property include: Baltic family Latvian Three forms, special cases for one and two The header entry would be: Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2; Languages with this property include: Celtic Gaeilge (Irish) Three forms, special case for numbers ending in 00 or [2-9][0-9] The header entry would be: Plural-Forms: nplurals=3; \ plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2; Languages with this property include: Romanic family Romanian Three forms, special case for numbers ending in 1[2-9] The header entry would look like this: Plural-Forms: nplurals=3; \ plural=n%10==1 && n%100!=11 ? 0 : \ n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2; Languages with this property include: Baltic family Lithuanian Three forms, special cases for numbers ending in 1 and 2, 3, 4, except those ending in 1[1-4] The header entry would look like this: Plural-Forms: nplurals=3; \ plural=n%10==1 && n%100!=11 ? 0 : \ n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2; Languages with this property include: Slavic family Russian, Ukrainian, Serbian, Croatian Three forms, special cases for 1 and 2, 3, 4 The header entry would look like this: Plural-Forms: nplurals=3; \ plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2; Languages with this property include: Slavic family Czech, Slovak Three forms, special case for one and some numbers ending in 2, 3, or 4 The header entry would look like this: Plural-Forms: nplurals=3; \ plural=n==1 ? 0 : \ n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2; Languages with this property include: Slavic family Polish Four forms, special case for one and all numbers ending in 02, 03, or 04 The header entry would look like this: Plural-Forms: nplurals=4; \ plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3; Languages with this property include: Slavic family Slovenian You might now ask, `ngettext' handles only numbers N of type `unsigned long'. What about larger integer types? What about negative numbers? What about floating-point numbers? About larger integer types, such as `uintmax_t' or `unsigned long long': they can be handled by reducing the value to a range that fits in an `unsigned long'. Simply casting the value to `unsigned long' would not do the right thing, since it would treat `ULONG_MAX + 1' like zero, `ULONG_MAX + 2' like singular, and the like. Here you can exploit the fact that all mentioned plural form formulas eventually become periodic, with a period that is a divisor of 100 (or 1000 or 1000000). So, when you reduce a large value to another one in the range [1000000, 1999999] that ends in the same 6 decimal digits, you can assume that it will lead to the same plural form selection. This code does this: #include <inttypes.h> uintmax_t nbytes = ...; printf (ngettext ("The file has %"PRIuMAX" byte.", "The file has %"PRIuMAX" bytes.", (nbytes > ULONG_MAX ? (nbytes % 1000000) + 1000000 : nbytes)), nbytes); Negative and floating-point values usually represent physical entities for which singular and plural don't clearly apply. In such cases, there is no need to use `ngettext'; a simple `gettext' call with a form suitable for all values will do. For example: printf (gettext ("Time elapsed: %.3f seconds"), num_milliseconds * 0.001); Even if NUM_MILLISECONDS happens to be a multiple of 1000, the output Time elapsed: 1.000 seconds is acceptable in English, and similarly for other languages. The translators' perspective regarding plural forms is explained in *note Translating plural forms::. ---------- Footnotes ---------- (1) Additions are welcome. Send appropriate information to <bug-gnu-gettext@gnu.org> and <bug-glibc-manual@gnu.org>.  File: gettext.info, Node: Optimized gettext, Prev: Plural forms, Up: gettext 11.2.7 Optimization of the *gettext functions --------------------------------------------- At this point of the discussion we should talk about an advantage of the GNU `gettext' implementation. Some readers might have pointed out that an internationalized program might have a poor performance if some string has to be translated in an inner loop. While this is unavoidable when the string varies from one run of the loop to the other it is simply a waste of time when the string is always the same. Take the following example: { while (...) { puts (gettext ("Hello world")); } } When the locale selection does not change between two runs the resulting string is always the same. One way to use this is: { str = gettext ("Hello world"); while (...) { puts (str); } } But this solution is not usable in all situation (e.g. when the locale selection changes) nor does it lead to legible code. For this reason, GNU `gettext' caches previous translation results. When the same translation is requested twice, with no new message catalogs being loaded in between, `gettext' will, the second time, find the result through a single cache lookup.  File: gettext.info, Node: Comparison, Next: Using libintl.a, Prev: gettext, Up: Programmers 11.3 Comparing the Two Interfaces ================================= The following discussion is perhaps a little bit colored. As said above we implemented GNU `gettext' following the Uniforum proposal and this surely has its reasons. But it should show how we came to this decision. First we take a look at the developing process. When we write an application using NLS provided by `gettext' we proceed as always. Only when we come to a string which might be seen by the users and thus has to be translated we use `gettext("...")' instead of `"..."'. At the beginning of each source file (or in a central header file) we define #define gettext(String) (String) Even this definition can be avoided when the system supports the `gettext' function in its C library. When we compile this code the result is the same as if no NLS code is used. When you take a look at the GNU `gettext' code you will see that we use `_("...")' instead of `gettext("...")'. This reduces the number of additional characters per translatable string to _3_ (in words: three). When now a production version of the program is needed we simply replace the definition #define _(String) (String) by #include <libintl.h> #define _(String) gettext (String) Additionally we run the program `xgettext' on all source code file which contain translatable strings and that's it: we have a running program which does not depend on translations to be available, but which can use any that becomes available. The same procedure can be done for the `gettext_noop' invocations (*note Special cases::). One usually defines `gettext_noop' as a no-op macro. So you should consider the following code for your project: #define gettext_noop(String) String #define N_(String) gettext_noop (String) `N_' is a short form similar to `_'. The `Makefile' in the `po/' directory of GNU `gettext' knows by default both of the mentioned short forms so you are invited to follow this proposal for your own ease. Now to `catgets'. The main problem is the work for the programmer. Every time he comes to a translatable string he has to define a number (or a symbolic constant) which has also be defined in the message catalog file. He also has to take care for duplicate entries, duplicate message IDs etc. If he wants to have the same quality in the message catalog as the GNU `gettext' program provides he also has to put the descriptive comments for the strings and the location in all source code files in the message catalog. This is nearly a Mission: Impossible. But there are also some points people might call advantages speaking for `catgets'. If you have a single word in a string and this string is used in different contexts it is likely that in one or the other language the word has different translations. Example: printf ("%s: %d", gettext ("number"), number_of_errors) printf ("you should see %d %s", number_count, number_count == 1 ? gettext ("number") : gettext ("numbers")) Here we have to translate two times the string `"number"'. Even if you do not speak a language beside English it might be possible to recognize that the two words have a different meaning. In German the first appearance has to be translated to `"Anzahl"' and the second to `"Zahl"'. Now you can say that this example is really esoteric. And you are right! This is exactly how we felt about this problem and decide that it does not weight that much. The solution for the above problem could be very easy: printf ("%s %d", gettext ("number:"), number_of_errors) printf (number_count == 1 ? gettext ("you should see %d number") : gettext ("you should see %d numbers"), number_count) We believe that we can solve all conflicts with this method. If it is difficult one can also consider changing one of the conflicting string a little bit. But it is not impossible to overcome. `catgets' allows same original entry to have different translations, but `gettext' has another, scalable approach for solving ambiguities of this kind: *Note Ambiguities::.  File: gettext.info, Node: Using libintl.a, Next: gettext grok, Prev: Comparison, Up: Programmers 11.4 Using libintl.a in own programs ==================================== Starting with version 0.9.4 the library `libintl.h' should be self-contained. I.e., you can use it in your own programs without providing additional functions. The `Makefile' will put the header and the library in directories selected using the `$(prefix)'.  File: gettext.info, Node: gettext grok, Next: Temp Programmers, Prev: Using libintl.a, Up: Programmers 11.5 Being a `gettext' grok =========================== * NOTE: * This documentation section is outdated and needs to be revised. To fully exploit the functionality of the GNU `gettext' library it is surely helpful to read the source code. But for those who don't want to spend that much time in reading the (sometimes complicated) code here is a list comments: * Changing the language at runtime For interactive programs it might be useful to offer a selection of the used language at runtime. To understand how to do this one need to know how the used language is determined while executing the `gettext' function. The method which is presented here only works correctly with the GNU implementation of the `gettext' functions. In the function `dcgettext' at every call the current setting of the highest priority environment variable is determined and used. Highest priority means here the following list with decreasing priority: 1. `LANGUAGE' 2. `LC_ALL' 3. `LC_xxx', according to selected locale category 4. `LANG' Afterwards the path is constructed using the found value and the translation file is loaded if available. What happens now when the value for, say, `LANGUAGE' changes? According to the process explained above the new value of this variable is found as soon as the `dcgettext' function is called. But this also means the (perhaps) different message catalog file is loaded. In other words: the used language is changed. But there is one little hook. The code for gcc-2.7.0 and up provides some optimization. This optimization normally prevents the calling of the `dcgettext' function as long as no new catalog is loaded. But if `dcgettext' is not called the program also cannot find the `LANGUAGE' variable be changed (*note Optimized gettext::). A solution for this is very easy. Include the following code in the language switching function. /* Change language. */ setenv ("LANGUAGE", "fr", 1); /* Make change known. */ { extern int _nl_msg_cat_cntr; ++_nl_msg_cat_cntr; } The variable `_nl_msg_cat_cntr' is defined in `loadmsgcat.c'. You don't need to know what this is for. But it can be used to detect whether a `gettext' implementation is GNU gettext and not non-GNU system's native gettext implementation.  File: gettext.info, Node: Temp Programmers, Prev: gettext grok, Up: Programmers 11.6 Temporary Notes for the Programmers Chapter ================================================ * NOTE: * This documentation section is outdated and needs to be revised. * Menu: * Temp Implementations:: Temporary - Two Possible Implementations * Temp catgets:: Temporary - About `catgets' * Temp WSI:: Temporary - Why a single implementation * Temp Notes:: Temporary - Notes  File: gettext.info, Node: Temp Implementations, Next: Temp catgets, Prev: Temp Programmers, Up: Temp Programmers 11.6.1 Temporary - Two Possible Implementations ----------------------------------------------- There are two competing methods for language independent messages: the X/Open `catgets' method, and the Uniforum `gettext' method. The `catgets' method indexes messages by integers; the `gettext' method indexes them by their English translations. The `catgets' method has been around longer and is supported by more vendors. The `gettext' method is supported by Sun, and it has been heard that the COSE multi-vendor initiative is supporting it. Neither method is a POSIX standard; the POSIX.1 committee had a lot of disagreement in this area. Neither one is in the POSIX standard. There was much disagreement in the POSIX.1 committee about using the `gettext' routines vs. `catgets' (XPG). In the end the committee couldn't agree on anything, so no messaging system was included as part of the standard. I believe the informative annex of the standard includes the XPG3 messaging interfaces, "...as an example of a messaging system that has been implemented..." They were very careful not to say anywhere that you should use one set of interfaces over the other. For more on this topic please see the Programming for Internationalization FAQ.  File: gettext.info, Node: Temp catgets, Next: Temp WSI, Prev: Temp Implementations, Up: Temp Programmers 11.6.2 Temporary - About `catgets' ---------------------------------- There have been a few discussions of late on the use of `catgets' as a base. I think it important to present both sides of the argument and hence am opting to play devil's advocate for a little bit. I'll not deny the fact that `catgets' could have been designed a lot better. It currently has quite a number of limitations and these have already been pointed out. However there is a great deal to be said for consistency and standardization. A common recurring problem when writing Unix software is the myriad portability problems across Unix platforms. It seems as if every Unix vendor had a look at the operating system and found parts they could improve upon. Undoubtedly, these modifications are probably innovative and solve real problems. However, software developers have a hard time keeping up with all these changes across so many platforms. And this has prompted the Unix vendors to begin to standardize their systems. Hence the impetus for Spec1170. Every major Unix vendor has committed to supporting this standard and every Unix software developer waits with glee the day they can write software to this standard and simply recompile (without having to use autoconf) across different platforms. As I understand it, Spec1170 is roughly based upon version 4 of the X/Open Portability Guidelines (XPG4). Because `catgets' and friends are defined in XPG4, I'm led to believe that `catgets' is a part of Spec1170 and hence will become a standardized component of all Unix systems.  File: gettext.info, Node: Temp WSI, Next: Temp Notes, Prev: Temp catgets, Up: Temp Programmers 11.6.3 Temporary - Why a single implementation ---------------------------------------------- Now it seems kind of wasteful to me to have two different systems installed for accessing message catalogs. If we do want to remedy `catgets' deficiencies why don't we try to expand `catgets' (in a compatible manner) rather than implement an entirely new system. Otherwise, we'll end up with two message catalog access systems installed with an operating system - one set of routines for packages using GNU `gettext' for their internationalization, and another set of routines (catgets) for all other software. Bloated? Supposing another catalog access system is implemented. Which do we recommend? At least for Linux, we need to attract as many software developers as possible. Hence we need to make it as easy for them to port their software as possible. Which means supporting `catgets'. We will be implementing the `libintl' code within our `libc', but does this mean we also have to incorporate another message catalog access scheme within our `libc' as well? And what about people who are going to be using the `libintl' + non-`catgets' routines. When they port their software to other platforms, they're now going to have to include the front-end (`libintl') code plus the back-end code (the non-`catgets' access routines) with their software instead of just including the `libintl' code with their software. Message catalog support is however only the tip of the iceberg. What about the data for the other locale categories? They also have a number of deficiencies. Are we going to abandon them as well and develop another duplicate set of routines (should `libintl' expand beyond message catalog support)? Like many parts of Unix that can be improved upon, we're stuck with balancing compatibility with the past with useful improvements and innovations for the future.  File: gettext.info, Node: Temp Notes, Prev: Temp WSI, Up: Temp Programmers 11.6.4 Temporary - Notes ------------------------ X/Open agreed very late on the standard form so that many implementations differ from the final form. Both of my system (old Linux catgets and Ultrix-4) have a strange variation. OK. After incorporating the last changes I have to spend some time on making the GNU/Linux `libc' `gettext' functions. So in future Solaris is not the only system having `gettext'.  File: gettext.info, Node: Translators, Next: Maintainers, Prev: Programmers, Up: Top 12 The Translator's View ************************ * Menu: * Trans Intro 0:: Introduction 0 * Trans Intro 1:: Introduction 1 * Discussions:: Discussions * Organization:: Organization * Information Flow:: Information Flow * Translating plural forms:: How to fill in `msgstr[0]', `msgstr[1]' * Prioritizing messages:: How to find which messages to translate first  File: gettext.info, Node: Trans Intro 0, Next: Trans Intro 1, Prev: Translators, Up: Translators 12.1 Introduction 0 =================== * NOTE: * This documentation section is outdated and needs to be revised. Free software is going international! The Translation Project is a way to get maintainers, translators and users all together, so free software will gradually become able to speak many native languages. The GNU `gettext' tool set contains _everything_ maintainers need for internationalizing their packages for messages. It also contains quite useful tools for helping translators at localizing messages to their native language, once a package has already been internationalized. To achieve the Translation Project, we need many interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. If you'd like to volunteer to _work_ at translating messages, please send mail to your translating team. Each team has its own mailing list, courtesy of Linux International. You may reach your translating team at the address `LL@li.org', replacing LL by the two-letter ISO 639 code for your language. Language codes are _not_ the same as country codes given in ISO 3166. The following translating teams exist: Chinese `zh', Czech `cs', Danish `da', Dutch `nl', Esperanto `eo', Finnish `fi', French `fr', Irish `ga', German `de', Greek `el', Italian `it', Japanese `ja', Indonesian `in', Norwegian `no', Polish `pl', Portuguese `pt', Russian `ru', Spanish `es', Swedish `sv' and Turkish `tr'. For example, you may reach the Chinese translating team by writing to `zh@li.org'. When you become a member of the translating team for your own language, you may subscribe to its list. For example, Swedish people can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members should be interested in _working_ at translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, please write to `coordinator@translationproject.org'; you will then reach the coordinator for all translator teams. A handful of GNU packages have already been adapted and provided with message translations for several languages. Translation teams have begun to organize, using these packages as a starting point. But there are many more packages and many languages for which we have no volunteer translators. If you would like to volunteer to work at translating messages, please send mail to `coordinator@translationproject.org' indicating what language(s) you can work on.  File: gettext.info, Node: Trans Intro 1, Next: Discussions, Prev: Trans Intro 0, Up: Translators 12.2 Introduction 1 =================== * NOTE: * This documentation section is outdated and needs to be revised. This is now official, GNU is going international! Here is the announcement submitted for the January 1995 GNU Bulletin: A handful of GNU packages have already been adapted and provided with message translations for several languages. Translation teams have begun to organize, using these packages as a starting point. But there are many more packages and many languages for which we have no volunteer translators. If you'd like to volunteer to work at translating messages, please send mail to `coordinator@translationproject.org' indicating what language(s) you can work on. This document should answer many questions for those who are curious about the process or would like to contribute. Please at least skim over it, hoping to cut down a little of the high volume of e-mail generated by this collective effort towards internationalization of free software. Most free programming which is widely shared is done in English, and currently, English is used as the main communicating language between national communities collaborating to free software. This very document is written in English. This will not change in the foreseeable future. However, there is a strong appetite from national communities for having more software able to write using national language and habits, and there is an on-going effort to modify free software in such a way that it becomes able to do so. The experiments driven so far raised an enthusiastic response from pretesters, so we believe that internationalization of free software is dedicated to succeed. For suggestion clarifications, additions or corrections to this document, please e-mail to `coordinator@translationproject.org'.  File: gettext.info, Node: Discussions, Next: Organization, Prev: Trans Intro 1, Up: Translators 12.3 Discussions ================ * NOTE: * This documentation section is outdated and needs to be revised. Facing this internationalization effort, a few users expressed their concerns. Some of these doubts are presented and discussed, here. * Smaller groups Some languages are not spoken by a very large number of people, so people speaking them sometimes consider that there may not be all that much demand such versions of free software packages. Moreover, many people being _into computers_, in some countries, generally seem to prefer English versions of their software. On the other end, people might enjoy their own language a lot, and be very motivated at providing to themselves the pleasure of having their beloved free software speaking their mother tongue. They do themselves a personal favor, and do not pay that much attention to the number of people benefiting of their work. * Misinterpretation Other users are shy to push forward their own language, seeing in this some kind of misplaced propaganda. Someone thought there must be some users of the language over the networks pestering other people with it. But any spoken language is worth localization, because there are people behind the language for whom the language is important and dear to their hearts. * Odd translations The biggest problem is to find the right translations so that everybody can understand the messages. Translations are usually a little odd. Some people get used to English, to the extent they may find translations into their own language "rather pushy, obnoxious and sometimes even hilarious." As a French speaking man, I have the experience of those instruction manuals for goods, so poorly translated in French in Korea or Taiwan... The fact is that we sometimes have to create a kind of national computer culture, and this is not easy without the collaboration of many people liking their mother tongue. This is why translations are better achieved by people knowing and loving their own language, and ready to work together at improving the results they obtain. * Dependencies over the GPL or LGPL Some people wonder if using GNU `gettext' necessarily brings their package under the protective wing of the GNU General Public License or the GNU Library General Public License, when they do not want to make their program free, or want other kinds of freedom. The simplest answer is "normally not". The `gettext-runtime' part of GNU `gettext', i.e. the contents of `libintl', is covered by the GNU Library General Public License. The `gettext-tools' part of GNU `gettext', i.e. the rest of the GNU `gettext' package, is covered by the GNU General Public License. The mere marking of localizable strings in a package, or conditional inclusion of a few lines for initialization, is not really including GPL'ed or LGPL'ed code. However, since the localization routines in `libintl' are under the LGPL, the LGPL needs to be considered. It gives the right to distribute the complete unmodified source of `libintl' even with non-free programs. It also gives the right to use `libintl' as a shared library, even for non-free programs. But it gives the right to use `libintl' as a static library or to incorporate `libintl' into another library only to free software.  File: gettext.info, Node: Organization, Next: Information Flow, Prev: Discussions, Up: Translators 12.4 Organization ================= * NOTE: * This documentation section is outdated and needs to be revised. On a larger scale, the true solution would be to organize some kind of fairly precise set up in which volunteers could participate. I gave some thought to this idea lately, and realize there will be some touchy points. I thought of writing to Richard Stallman to launch such a project, but feel it might be good to shake out the ideas between ourselves first. Most probably that Linux International has some experience in the field already, or would like to orchestrate the volunteer work, maybe. Food for thought, in any case! I guess we have to setup something early, somehow, that will help many possible contributors of the same language to interlock and avoid work duplication, and further be put in contact for solving together problems particular to their tongue (in most languages, there are many difficulties peculiar to translating technical English). My Swedish contributor acknowledged these difficulties, and I'm well aware of them for French. This is surely not a technical issue, but we should manage so the effort of locale contributors be maximally useful, despite the national team layer interface between contributors and maintainers. The Translation Project needs some setup for coordinating language coordinators. Localizing evolving programs will surely become a permanent and continuous activity in the free software community, once well started. The setup should be minimally completed and tested before GNU `gettext' becomes an official reality. The e-mail address `coordinator@translationproject.org' has been set up for receiving offers from volunteers and general e-mail on these topics. This address reaches the Translation Project coordinator. * Menu: * Central Coordination:: Central Coordination * National Teams:: National Teams * Mailing Lists:: Mailing Lists  File: gettext.info, Node: Central Coordination, Next: National Teams, Prev: Organization, Up: Organization 12.4.1 Central Coordination --------------------------- I also think GNU will need sooner than it thinks, that someone set up a way to organize and coordinate these groups. Some kind of group of groups. My opinion is that it would be good that GNU delegates this task to a small group of collaborating volunteers, shortly. Perhaps in `gnu.announce' a list of this national committee's can be published. My role as coordinator would simply be to refer to Ulrich any German speaking volunteer interested to localization of free software packages, and maybe helping national groups to initially organize, while maintaining national registries for until national groups are ready to take over. In fact, the coordinator should ease volunteers to get in contact with one another for creating national teams, which should then select one coordinator per language, or country (regionalized language). If well done, the coordination should be useful without being an overwhelming task, the time to put delegations in place.  File: gettext.info, Node: National Teams, Next: Mailing Lists, Prev: Central Coordination, Up: Organization 12.4.2 National Teams --------------------- I suggest we look for volunteer coordinators/editors for individual languages. These people will scan contributions of translation files for various programs, for their own languages, and will ensure high and uniform standards of diction. From my current experience with other people in these days, those who provide localizations are very enthusiastic about the process, and are more interested in the localization process than in the program they localize, and want to do many programs, not just one. This seems to confirm that having a coordinator/editor for each language is a good idea. We need to choose someone who is good at writing clear and concise prose in the language in question. That is hard--we can't check it ourselves. So we need to ask a few people to judge each others' writing and select the one who is best. I announce my prerelease to a few dozen people, and you would not believe all the discussions it generated already. I shudder to think what will happen when this will be launched, for true, officially, world wide. Who am I to arbitrate between two Czekolsovak users contradicting each other, for example? I assume that your German is not much better than my French so that I would not be able to judge about these formulations. What I would suggest is that for each language there is a group for people who maintain the PO files and judge about changes. I suspect there will be cultural differences between how such groups of people will behave. Some will have relaxed ways, reach consensus easily, and have anyone of the group relate to the maintainers, while others will fight to death, organize heavy administrations up to national standards, and use strict channels. The German team is putting out a good example. Right now, they are maybe half a dozen people revising translations of each other and discussing the linguistic issues. I do not even have all the names. Ulrich Drepper is taking care of coordinating the German team. He subscribed to all my pretest lists, so I do not even have to warn him specifically of incoming releases. I'm sure, that is a good idea to get teams for each language working on translations. That will make the translations better and more consistent. * Menu: * Sub-Cultures:: Sub-Cultures * Organizational Ideas:: Organizational Ideas  File: gettext.info, Node: Sub-Cultures, Next: Organizational Ideas, Prev: National Teams, Up: National Teams 12.4.2.1 Sub-Cultures ..................... Taking French for example, there are a few sub-cultures around computers which developed diverging vocabularies. Picking volunteers here and there without addressing this problem in an organized way, soon in the project, might produce a distasteful mix of internationalized programs, and possibly trigger endless quarrels among those who really care. Keeping some kind of unity in the way French localization of internationalized programs is achieved is a difficult (and delicate) job. Knowing the latin character of French people (:-), if we take this the wrong way, we could end up nowhere, or spoil a lot of energies. Maybe we should begin to address this problem seriously _before_ GNU `gettext' become officially published. And I suspect that this means soon!  File: gettext.info, Node: Organizational Ideas, Prev: Sub-Cultures, Up: National Teams 12.4.2.2 Organizational Ideas ............................. I expect the next big changes after the official release. Please note that I use the German translation of the short GPL message. We need to set a few good examples before the localization goes out for true in the free software community. Here are a few points to discuss: * Each group should have one FTP server (at least one master). * The files on the server should reflect the latest version (of course!) and it should also contain a RCS directory with the corresponding archives (I don't have this now). * There should also be a ChangeLog file (this is more useful than the RCS archive but can be generated automatically from the later by Emacs). * A "core group" should judge about questionable changes (for now this group consists solely by me but I ask some others occasionally; this also seems to work).  File: gettext.info, Node: Mailing Lists, Prev: National Teams, Up: Organization 12.4.3 Mailing Lists -------------------- If we get any inquiries about GNU `gettext', send them on to: `coordinator@translationproject.org' The `*-pretest' lists are quite useful to me, maybe the idea could be generalized to many GNU, and non-GNU packages. But each maintainer his/her way! François, we have a mechanism in place here at `gnu.ai.mit.edu' to track teams, support mailing lists for them and log members. We have a slight preference that you use it. If this is OK with you, I can get you clued in. Things are changing! A few years ago, when Daniel Fekete and I asked for a mailing list for GNU localization, nested at the FSF, we were politely invited to organize it anywhere else, and so did we. For communicating with my pretesters, I later made a handful of mailing lists located at iro.umontreal.ca and administrated by `majordomo'. These lists have been _very_ dependable so far... I suspect that the German team will organize itself a mailing list located in Germany, and so forth for other countries. But before they organize for true, it could surely be useful to offer mailing lists located at the FSF to each national team. So yes, please explain me how I should proceed to create and handle them. We should create temporary mailing lists, one per country, to help people organize. Temporary, because once regrouped and structured, it would be fair the volunteers from country bring back _their_ list in there and manage it as they want. My feeling is that, in the long run, each team should run its own list, from within their country. There also should be some central list to which all teams could subscribe as they see fit, as long as each team is represented in it.  File: gettext.info, Node: Information Flow, Next: Translating plural forms, Prev: Organization, Up: Translators 12.5 Information Flow ===================== * NOTE: * This documentation section is outdated and needs to be revised. There will surely be some discussion about this messages after the packages are finally released. If people now send you some proposals for better messages, how do you proceed? Jim, please note that right now, as I put forward nearly a dozen of localizable programs, I receive both the translations and the coordination concerns about them. If I put one of my things to pretest, Ulrich receives the announcement and passes it on to the German team, who make last minute revisions. Then he submits the translation files to me _as the maintainer_. For free packages I do not maintain, I would not even hear about it. This scheme could be made to work for the whole Translation Project, I think. For security reasons, maybe Ulrich (national coordinators, in fact) should update central registry kept at the Translation Project (Jim, me, or Len's recruits) once in a while. In December/January, I was aggressively ready to internationalize all of GNU, giving myself the duty of one small GNU package per week or so, taking many weeks or months for bigger packages. But it does not work this way. I first did all the things I'm responsible for. I've nothing against some missionary work on other maintainers, but I'm also loosing a lot of energy over it--same debates over again. And when the first localized packages are released we'll get a lot of responses about ugly translations :-). Surely, and we need to have beforehand a fairly good idea about how to handle the information flow between the national teams and the package maintainers. Please start saving somewhere a quick history of each PO file. I know for sure that the file format will change, allowing for comments. It would be nice that each file has a kind of log, and references for those who want to submit comments or gripes, or otherwise contribute. I sent a proposal for a fast and flexible format, but it is not receiving acceptance yet by the GNU deciders. I'll tell you when I have more information about this.  File: gettext.info, Node: Translating plural forms, Next: Prioritizing messages, Prev: Information Flow, Up: Translators 12.6 Translating plural forms ============================= Suppose you are translating a PO file, and it contains an entry like this: #, c-format msgid "One file removed" msgid_plural "%d files removed" msgstr[0] "" msgstr[1] "" What does this mean? How do you fill it in? Such an entry denotes a message with plural forms, that is, a message where the text depends on a cardinal number. The general form of the message, in English, is the `msgid_plural' line. The `msgid' line is the English singular form, that is, the form for when the number is equal to 1. More details about plural forms are explained in *note Plural forms::. The first thing you need to look at is the `Plural-Forms' line in the header entry of the PO file. It contains the number of plural forms and a formula. If the PO file does not yet have such a line, you have to add it. It only depends on the language into which you are translating. You can get this info by using the `msginit' command (see *note Creating::) - it contains a database of known plural formulas - or by asking other members of your translation team. Suppose the line looks as follows: "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" It's logically one line; recall that the PO file formatting is allowed to break long lines so that each physical line fits in 80 monospaced columns. The value of `nplurals' here tells you that there are three plural forms. The first thing you need to do is to ensure that the entry contains an `msgstr' line for each of the forms: #, c-format msgid "One file removed" msgid_plural "%d files removed" msgstr[0] "" msgstr[1] "" msgstr[2] "" Then translate the `msgid_plural' line and fill it in into each `msgstr' line: #, c-format msgid "One file removed" msgid_plural "%d files removed" msgstr[0] "%d slika uklonjenih" msgstr[1] "%d slika uklonjenih" msgstr[2] "%d slika uklonjenih" Now you can refine the translation so that it matches the plural form. According to the formula above, `msgstr[0]' is used when the number ends in 1 but does not end in 11; `msgstr[1]' is used when the number ends in 2, 3, 4, but not in 12, 13, 14; and `msgstr[2]' is used in all other cases. With this knowledge, you can refine the translations: #, c-format msgid "One file removed" msgid_plural "%d files removed" msgstr[0] "%d slika je uklonjena" msgstr[1] "%d datoteke uklonjenih" msgstr[2] "%d slika uklonjenih" You noticed that in the English singular form (`msgid') the number placeholder could be omitted and replaced by the numeral word "one". Can you do this in your translation as well? msgstr[0] "jednom datotekom je uklonjen" Well, it depends on whether `msgstr[0]' applies only to the number 1, or to other numbers as well. If, according to the plural formula, `msgstr[0]' applies only to `n == 1', then you can use the specialized translation without the number placeholder. In our case, however, `msgstr[0]' also applies to the numbers 21, 31, 41, etc., and therefore you cannot omit the placeholder.  File: gettext.info, Node: Prioritizing messages, Prev: Translating plural forms, Up: Translators 12.7 Prioritizing messages: How to determine which messages to translate first ============================================================================== A translator sometimes has only a limited amount of time per week to spend on a package, and some packages have quite large message catalogs (over 1000 messages). Therefore she wishes to translate the messages first that are the most visible to the user, or that occur most frequently. This section describes how to determine these "most urgent" messages. It also applies to determine the "next most urgent" messages after the message catalog has already been partially translated. In a first step, she uses the programs like a user would do. While she does this, the GNU `gettext' library logs into a file the not yet translated messages for which a translation was requested from the program. In a second step, she uses the PO mode to translate precisely this set of messages. Here a more details. The GNU `libintl' library (but not the corresponding functions in GNU `libc') supports an environment variable `GETTEXT_LOG_UNTRANSLATED'. The GNU `libintl' library will log into this file the messages for which `gettext()' and related functions couldn't find the translation. If the file doesn't exist, it will be created as needed. On systems with GNU `libc' a shared library `preloadable_libintl.so' is provided that can be used with the ELF `LD_PRELOAD' mechanism. So, in the first step, the translator uses these commands on systems with GNU `libc': $ LD_PRELOAD=/usr/local/lib/preloadable_libintl.so $ export LD_PRELOAD $ GETTEXT_LOG_UNTRANSLATED=$HOME/gettextlogused $ export GETTEXT_LOG_UNTRANSLATED and these commands on other systems: $ GETTEXT_LOG_UNTRANSLATED=$HOME/gettextlogused $ export GETTEXT_LOG_UNTRANSLATED Then she uses and peruses the programs. (It is a good and recommended practice to use the programs for which you provide translations: it gives you the needed context.) When done, she removes the environment variables: $ unset LD_PRELOAD $ unset GETTEXT_LOG_UNTRANSLATED The second step starts with removing duplicates: $ msguniq $HOME/gettextlogused > missing.po The result is a PO file, but needs some preprocessing before a PO file editor can be used with it. First, it is a multi-domain PO file, containing messages from many translation domains. Second, it lacks all translator comments and source references. Here is how to get a list of the affected translation domains: $ sed -n -e 's,^domain "\(.*\)"$,\1,p' < missing.po | sort | uniq Then the translator can handle the domains one by one. For simplicity, let's use environment variables to denote the language, domain and source package. $ lang=nl # your language $ domain=coreutils # the name of the domain to be handled $ package=/usr/src/gnu/coreutils-4.5.4 # the package where it comes from She takes the latest copy of `$lang.po' from the Translation Project, or from the package (in most cases, `$package/po/$lang.po'), or creates a fresh one if she's the first translator (see *note Creating::). She then uses the following commands to mark the not urgent messages as "obsolete". (This doesn't mean that these messages - translated and untranslated ones - will go away. It simply means that the PO file editor will ignore them in the following editing session.) $ msggrep --domain=$domain missing.po | grep -v '^domain' \ > $domain-missing.po $ msgattrib --set-obsolete --ignore-file $domain-missing.po $domain.$lang.po \ > $domain.$lang-urgent.po The she translates `$domain.$lang-urgent.po' by use of a PO file editor (*note Editing::). (FIXME: I don't know whether `KBabel' and `gtranslator' also preserve obsolete messages, as they should.) Finally she restores the not urgent messages (with their earlier translations, for those which were already translated) through this command: $ msgmerge --no-fuzzy-matching $domain.$lang-urgent.po $package/po/$domain.pot \ > $domain.$lang.po Then she can submit `$domain.$lang.po' and proceed to the next domain.  File: gettext.info, Node: Maintainers, Next: Installers, Prev: Translators, Up: Top 13 The Maintainer's View ************************ The maintainer of a package has many responsibilities. One of them is ensuring that the package will install easily on many platforms, and that the magic we described earlier (*note Users::) will work for installers and end users. Of course, there are many possible ways by which GNU `gettext' might be integrated in a distribution, and this chapter does not cover them in all generality. Instead, it details one possible approach which is especially adequate for many free software distributions following GNU standards, or even better, Gnits standards, because GNU `gettext' is purposely for helping the internationalization of the whole GNU project, and as many other good free packages as possible. So, the maintainer's view presented here presumes that the package already has a `configure.ac' file and uses GNU Autoconf. Nevertheless, GNU `gettext' may surely be useful for free packages not following GNU standards and conventions, but the maintainers of such packages might have to show imagination and initiative in organizing their distributions so `gettext' work for them in all situations. There are surely many, out there. Even if `gettext' methods are now stabilizing, slight adjustments might be needed between successive `gettext' versions, so you should ideally revise this chapter in subsequent releases, looking for changes. * Menu: * Flat and Non-Flat:: Flat or Non-Flat Directory Structures * Prerequisites:: Prerequisite Works * gettextize Invocation:: Invoking the `gettextize' Program * Adjusting Files:: Files You Must Create or Alter * autoconf macros:: Autoconf macros for use in `configure.ac' * CVS Issues:: Integrating with CVS * Release Management:: Creating a Distribution Tarball  File: gettext.info, Node: Flat and Non-Flat, Next: Prerequisites, Prev: Maintainers, Up: Maintainers 13.1 Flat or Non-Flat Directory Structures ========================================== Some free software packages are distributed as `tar' files which unpack in a single directory, these are said to be "flat" distributions. Other free software packages have a one level hierarchy of subdirectories, using for example a subdirectory named `doc/' for the Texinfo manual and man pages, another called `lib/' for holding functions meant to replace or complement C libraries, and a subdirectory `src/' for holding the proper sources for the package. These other distributions are said to be "non-flat". We cannot say much about flat distributions. A flat directory structure has the disadvantage of increasing the difficulty of updating to a new version of GNU `gettext'. Also, if you have many PO files, this could somewhat pollute your single directory. Also, GNU `gettext''s libintl sources consist of C sources, shell scripts, `sed' scripts and complicated Makefile rules, which don't fit well into an existing flat structure. For these reasons, we recommend to use non-flat approach in this case as well. Maybe because GNU `gettext' itself has a non-flat structure, we have more experience with this approach, and this is what will be described in the remaining of this chapter. Some maintainers might use this as an opportunity to unflatten their package structure.  File: gettext.info, Node: Prerequisites, Next: gettextize Invocation, Prev: Flat and Non-Flat, Up: Maintainers 13.2 Prerequisite Works ======================= There are some works which are required for using GNU `gettext' in one of your package. These works have some kind of generality that escape the point by point descriptions used in the remainder of this chapter. So, we describe them here. * Before attempting to use `gettextize' you should install some other packages first. Ensure that recent versions of GNU `m4', GNU Autoconf and GNU `gettext' are already installed at your site, and if not, proceed to do this first. If you get to install these things, beware that GNU `m4' must be fully installed before GNU Autoconf is even _configured_. To further ease the task of a package maintainer the `automake' package was designed and implemented. GNU `gettext' now uses this tool and the `Makefile's in the `intl/' and `po/' therefore know about all the goals necessary for using `automake' and `libintl' in one project. Those four packages are only needed by you, as a maintainer; the installers of your own package and end users do not really need any of GNU `m4', GNU Autoconf, GNU `gettext', or GNU `automake' for successfully installing and running your package, with messages properly translated. But this is not completely true if you provide internationalized shell scripts within your own package: GNU `gettext' shall then be installed at the user site if the end users want to see the translation of shell script messages. * Your package should use Autoconf and have a `configure.ac' or `configure.in' file. If it does not, you have to learn how. The Autoconf documentation is quite well written, it is a good idea that you print it and get familiar with it. * Your C sources should have already been modified according to instructions given earlier in this manual. *Note Sources::. * Your `po/' directory should receive all PO files submitted to you by the translator teams, each having `LL.po' as a name. This is not usually easy to get translation work done before your package gets internationalized and available! Since the cycle has to start somewhere, the easiest for the maintainer is to start with absolutely no PO files, and wait until various translator teams get interested in your package, and submit PO files. It is worth adding here a few words about how the maintainer should ideally behave with PO files submissions. As a maintainer, your role is to authenticate the origin of the submission as being the representative of the appropriate translating teams of the Translation Project (forward the submission to `coordinator@translationproject.org' in case of doubt), to ensure that the PO file format is not severely broken and does not prevent successful installation, and for the rest, to merely put these PO files in `po/' for distribution. As a maintainer, you do not have to take on your shoulders the responsibility of checking if the translations are adequate or complete, and should avoid diving into linguistic matters. Translation teams drive themselves and are fully responsible of their linguistic choices for the Translation Project. Keep in mind that translator teams are _not_ driven by maintainers. You can help by carefully redirecting all communications and reports from users about linguistic matters to the appropriate translation team, or explain users how to reach or join their team. The simplest might be to send them the `ABOUT-NLS' file. Maintainers should _never ever_ apply PO file bug reports themselves, short-cutting translation teams. If some translator has difficulty to get some of her points through her team, it should not be an option for her to directly negotiate translations with maintainers. Teams ought to settle their problems themselves, if any. If you, as a maintainer, ever think there is a real problem with a team, please never try to _solve_ a team's problem on your own.  File: gettext.info, Node: gettextize Invocation, Next: Adjusting Files, Prev: Prerequisites, Up: Maintainers 13.3 Invoking the `gettextize' Program ====================================== The `gettextize' program is an interactive tool that helps the maintainer of a package internationalized through GNU `gettext'. It is used for two purposes: * As a wizard, when a package is modified to use GNU `gettext' for the first time. * As a migration tool, for upgrading the GNU `gettext' support in a package from a previous to a newer version of GNU `gettext'. This program performs the following tasks: * It copies into the package some files that are consistently and identically needed in every package internationalized through GNU `gettext'. * It performs as many of the tasks mentioned in the next section *note Adjusting Files:: as can be performed automatically. * It removes obsolete files and idioms used for previous GNU `gettext' versions to the form recommended for the current GNU `gettext' version. * It prints a summary of the tasks that ought to be done manually and could not be done automatically by `gettextize'. It can be invoked as follows: gettextize [ OPTION... ] [ DIRECTORY ] and accepts the following options: `-f' `--force' Force replacement of files which already exist. `--intl' Install the libintl sources in a subdirectory named `intl/'. This libintl will be used to provide internationalization on systems that don't have GNU libintl installed. If this option is omitted, the call to `AM_GNU_GETTEXT' in `configure.ac' should read: `AM_GNU_GETTEXT([external])', and internationalization will not be enabled on systems lacking GNU gettext. `--po-dir=DIR' Specify a directory containing PO files. Such a directory contains the translations into various languages of a particular POT file. This option can be specified multiple times, once for each translation domain. If it is not specified, the directory named `po/' is updated. `--no-changelog' Don't update or create ChangeLog files. By default, `gettextize' logs all changes (file additions, modifications and removals) in a file called `ChangeLog' in each affected directory. `--symlink' Make symbolic links instead of copying the needed files. This can be useful to save a few kilobytes of disk space, but it requires extra effort to create self-contained tarballs, it may disturb some mechanism the maintainer applies to the sources, and it is likely to introduce bugs when a newer version of `gettext' is installed on the system. `-n' `--dry-run' Print modifications but don't perform them. All actions that `gettextize' would normally execute are inhibited and instead only listed on standard output. `--help' Display this help and exit. `--version' Output version information and exit. If DIRECTORY is given, this is the top level directory of a package to prepare for using GNU `gettext'. If not given, it is assumed that the current directory is the top level directory of such a package. The program `gettextize' provides the following files. However, no existing file will be replaced unless the option `--force' (`-f') is specified. 1. The `ABOUT-NLS' file is copied in the main directory of your package, the one being at the top level. This file gives the main indications about how to install and use the Native Language Support features of your program. You might elect to use a more recent copy of this `ABOUT-NLS' file than the one provided through `gettextize', if you have one handy. You may also fetch a more recent copy of file `ABOUT-NLS' from Translation Project sites, and from most GNU archive sites. 2. A `po/' directory is created for eventually holding all translation files, but initially only containing the file `po/Makefile.in.in' from the GNU `gettext' distribution (beware the double `.in' in the file name) and a few auxiliary files. If the `po/' directory already exists, it will be preserved along with the files it contains, and only `Makefile.in.in' and the auxiliary files will be overwritten. If `--po-dir' has been specified, this holds for every directory specified through `--po-dir', instead of `po/'. 3. Only if `--intl' has been specified: A `intl/' directory is created and filled with most of the files originally in the `intl/' directory of the GNU `gettext' distribution. Also, if option `--force' (`-f') is given, the `intl/' directory is emptied first. 4. The file `config.rpath' is copied into the directory containing configuration support files. It is needed by the `AM_GNU_GETTEXT' autoconf macro. 5. Only if the project is using GNU `automake': A set of `autoconf' macro files is copied into the package's `autoconf' macro repository, usually in a directory called `m4/'. If your site support symbolic links, `gettextize' will not actually copy the files into your package, but establish symbolic links instead. This avoids duplicating the disk space needed in all packages. Merely using the `-h' option while creating the `tar' archive of your distribution will resolve each link by an actual copy in the distribution archive. So, to insist, you really should use `-h' option with `tar' within your `dist' goal of your main `Makefile.in'. Furthermore, `gettextize' will update all `Makefile.am' files in each affected directory, as well as the top level `configure.ac' or `configure.in' file. It is interesting to understand that most new files for supporting GNU `gettext' facilities in one package go in `intl/', `po/' and `m4/' subdirectories. One distinction between `intl/' and the two other directories is that `intl/' is meant to be completely identical in all packages using GNU `gettext', while the other directories will mostly contain package dependent files. The `gettextize' program makes backup files for all files it replaces or changes, and also write ChangeLog entries about these changes. This way, the careful maintainer can check after running `gettextize' whether its changes are acceptable to him, and possibly adjust them. An exception to this rule is the `intl/' directory, which is added or replaced or removed as a whole. It is important to understand that `gettextize' can not do the entire job of adapting a package for using GNU `gettext'. The amount of remaining work depends on whether the package uses GNU `automake' or not. But in any case, the maintainer should still read the section *note Adjusting Files:: after invoking `gettextize'. In particular, if after using `gettexize', you get an error `AC_COMPILE_IFELSE was called before AC_GNU_SOURCE' or `AC_RUN_IFELSE was called before AC_GNU_SOURCE', you can fix it by modifying `configure.ac', as described in *note configure.ac::. It is also important to understand that `gettextize' is not part of the GNU build system, in the sense that it should not be invoked automatically, and not be invoked by someone who doesn't assume the responsibilities of a package maintainer. For the latter purpose, a separate tool is provided, see *note autopoint Invocation::.  File: gettext.info, Node: Adjusting Files, Next: autoconf macros, Prev: gettextize Invocation, Up: Maintainers 13.4 Files You Must Create or Alter =================================== Besides files which are automatically added through `gettextize', there are many files needing revision for properly interacting with GNU `gettext'. If you are closely following GNU standards for Makefile engineering and auto-configuration, the adaptations should be easier to achieve. Here is a point by point description of the changes needed in each. So, here comes a list of files, each one followed by a description of all alterations it needs. Many examples are taken out from the GNU `gettext' 0.18.1 distribution itself, or from the GNU `hello' distribution (`http://www.franken.de/users/gnu/ke/hello' or `http://www.gnu.franken.de/ke/hello/') You may indeed refer to the source code of the GNU `gettext' and GNU `hello' packages, as they are intended to be good examples for using GNU gettext functionality. * Menu: * po/POTFILES.in:: `POTFILES.in' in `po/' * po/LINGUAS:: `LINGUAS' in `po/' * po/Makevars:: `Makevars' in `po/' * po/Rules-*:: Extending `Makefile' in `po/' * configure.ac:: `configure.ac' at top level * config.guess:: `config.guess', `config.sub' at top level * mkinstalldirs:: `mkinstalldirs' at top level * aclocal:: `aclocal.m4' at top level * acconfig:: `acconfig.h' at top level * config.h.in:: `config.h.in' at top level * Makefile:: `Makefile.in' at top level * src/Makefile:: `Makefile.in' in `src/' * lib/gettext.h:: `gettext.h' in `lib/'  File: gettext.info, Node: po/POTFILES.in, Next: po/LINGUAS, Prev: Adjusting Files, Up: Adjusting Files 13.4.1 `POTFILES.in' in `po/' ----------------------------- The `po/' directory should receive a file named `POTFILES.in'. This file tells which files, among all program sources, have marked strings needing translation. Here is an example of such a file: # List of source files containing translatable strings. # Copyright (C) 1995 Free Software Foundation, Inc. # Common library files lib/error.c lib/getopt.c lib/xmalloc.c # Package source files src/gettext.c src/msgfmt.c src/xgettext.c Hash-marked comments and white lines are ignored. All other lines list those source files containing strings marked for translation (*note Mark Keywords::), in a notation relative to the top level of your whole distribution, rather than the location of the `POTFILES.in' file itself. When a C file is automatically generated by a tool, like `flex' or `bison', that doesn't introduce translatable strings by itself, it is recommended to list in `po/POTFILES.in' the real source file (ending in `.l' in the case of `flex', or in `.y' in the case of `bison'), not the generated C file.  File: gettext.info, Node: po/LINGUAS, Next: po/Makevars, Prev: po/POTFILES.in, Up: Adjusting Files 13.4.2 `LINGUAS' in `po/' ------------------------- The `po/' directory should also receive a file named `LINGUAS'. This file contains the list of available translations. It is a whitespace separated list. Hash-marked comments and white lines are ignored. Here is an example file: # Set of available languages. de fr This example means that German and French PO files are available, so that these languages are currently supported by your package. If you want to further restrict, at installation time, the set of installed languages, this should not be done by modifying the `LINGUAS' file, but rather by using the `LINGUAS' environment variable (*note Installers::). It is recommended that you add the "languages" `en@quot' and `en@boldquot' to the `LINGUAS' file. `en@quot' is a variant of English message catalogs (`en') which uses real quotation marks instead of the ugly looking asymmetric ASCII substitutes ``' and `''. `en@boldquot' is a variant of `en@quot' that additionally outputs quoted pieces of text in a bold font, when used in a terminal emulator which supports the VT100 escape sequences (such as `xterm' or the Linux console, but not Emacs in `M-x shell' mode). These extra message catalogs `en@quot' and `en@boldquot' are constructed automatically, not by translators; to support them, you need the files `Rules-quot', `quot.sed', `boldquot.sed', `en@quot.header', `en@boldquot.header', `insert-header.sin' in the `po/' directory. You can copy them from GNU gettext's `po/' directory; they are also installed by running `gettextize'.  File: gettext.info, Node: po/Makevars, Next: po/Rules-*, Prev: po/LINGUAS, Up: Adjusting Files 13.4.3 `Makevars' in `po/' -------------------------- The `po/' directory also has a file named `Makevars'. It contains variables that are specific to your project. `po/Makevars' gets inserted into the `po/Makefile' when the latter is created. The variables thus take effect when the POT file is created or updated, and when the message catalogs get installed. The first three variables can be left unmodified if your package has a single message domain and, accordingly, a single `po/' directory. Only packages which have multiple `po/' directories at different locations need to adjust the three first variables defined in `Makevars'. As an alternative to the `XGETTEXT_OPTIONS' variables, it is also possible to specify `xgettext' options through the `AM_XGETTEXT_OPTION' autoconf macro. See *note AM_XGETTEXT_OPTION::.  File: gettext.info, Node: po/Rules-*, Next: configure.ac, Prev: po/Makevars, Up: Adjusting Files 13.4.4 Extending `Makefile' in `po/' ------------------------------------ All files called `Rules-*' in the `po/' directory get appended to the `po/Makefile' when it is created. They present an opportunity to add rules for special PO files to the Makefile, without needing to mess with `po/Makefile.in.in'. GNU gettext comes with a `Rules-quot' file, containing rules for building catalogs `en@quot.po' and `en@boldquot.po'. The effect of `en@quot.po' is that people who set their `LANGUAGE' environment variable to `en@quot' will get messages with proper looking symmetric Unicode quotation marks instead of abusing the ASCII grave accent and the ASCII apostrophe for indicating quotations. To enable this catalog, simply add `en@quot' to the `po/LINGUAS' file. The effect of `en@boldquot.po' is that people who set `LANGUAGE' to `en@boldquot' will get not only proper quotation marks, but also the quoted text will be shown in a bold font on terminals and consoles. This catalog is useful only for command-line programs, not GUI programs. To enable it, similarly add `en@boldquot' to the `po/LINGUAS' file. Similarly, you can create rules for building message catalogs for the `sr@latin' locale - Serbian written with the Latin alphabet - from those for the `sr' locale - Serbian written with Cyrillic letters. See *note msgfilter Invocation::.  File: gettext.info, Node: configure.ac, Next: config.guess, Prev: po/Rules-*, Up: Adjusting Files 13.4.5 `configure.ac' at top level ---------------------------------- `configure.ac' or `configure.in' - this is the source from which `autoconf' generates the `configure' script. 1. Declare the package and version. This is done by a set of lines like these: PACKAGE=gettext VERSION=0.18.1 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION") AC_SUBST(PACKAGE) AC_SUBST(VERSION) or, if you are using GNU `automake', by a line like this: AM_INIT_AUTOMAKE(gettext, 0.18.1) Of course, you replace `gettext' with the name of your package, and `0.18.1' by its version numbers, exactly as they should appear in the packaged `tar' file name of your distribution (`gettext-0.18.1.tar.gz', here). 2. Check for internationalization support. Here is the main `m4' macro for triggering internationalization support. Just add this line to `configure.ac': AM_GNU_GETTEXT This call is purposely simple, even if it generates a lot of configure time checking and actions. If you have suppressed the `intl/' subdirectory by calling `gettextize' without `--intl' option, this call should read AM_GNU_GETTEXT([external]) 3. Have output files created. The `AC_OUTPUT' directive, at the end of your `configure.ac' file, needs to be modified in two ways: AC_OUTPUT([EXISTING CONFIGURATION FILES intl/Makefile po/Makefile.in], [EXISTING ADDITIONAL ACTIONS]) The modification to the first argument to `AC_OUTPUT' asks for substitution in the `intl/' and `po/' directories. Note the `.in' suffix used for `po/' only. This is because the distributed file is really `po/Makefile.in.in'. If you have suppressed the `intl/' subdirectory by calling `gettextize' without `--intl' option, then you don't need to add `intl/Makefile' to the `AC_OUTPUT' line. If, after doing the recommended modifications, a command like `aclocal -I m4' or `autoconf' or `autoreconf' fails with a trace similar to this: configure.ac:44: warning: AC_COMPILE_IFELSE was called before AC_GNU_SOURCE ../../lib/autoconf/specific.m4:335: AC_GNU_SOURCE is expanded from... m4/lock.m4:224: gl_LOCK is expanded from... m4/gettext.m4:571: gt_INTL_SUBDIR_CORE is expanded from... m4/gettext.m4:472: AM_INTL_SUBDIR is expanded from... m4/gettext.m4:347: AM_GNU_GETTEXT is expanded from... configure.ac:44: the top level configure.ac:44: warning: AC_RUN_IFELSE was called before AC_GNU_SOURCE you need to add an explicit invocation of `AC_GNU_SOURCE' in the `configure.ac' file - after `AC_PROG_CC' but before `AM_GNU_GETTEXT', most likely very close to the `AC_PROG_CC' invocation. This is necessary because of ordering restrictions imposed by GNU autoconf.  File: gettext.info, Node: config.guess, Next: mkinstalldirs, Prev: configure.ac, Up: Adjusting Files 13.4.6 `config.guess', `config.sub' at top level ------------------------------------------------ If you haven't suppressed the `intl/' subdirectory, you need to add the GNU `config.guess' and `config.sub' files to your distribution. They are needed because the `intl/' directory has platform dependent support for determining the locale's character encoding and therefore needs to identify the platform. You can obtain the newest version of `config.guess' and `config.sub' from the CVS of the `config' project at `http://savannah.gnu.org/'. The commands to fetch them are $ wget 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess' $ wget 'http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub' Less recent versions are also contained in the GNU `automake' and GNU `libtool' packages. Normally, `config.guess' and `config.sub' are put at the top level of a distribution. But it is also possible to put them in a subdirectory, altogether with other configuration support files like `install-sh', `ltconfig', `ltmain.sh' or `missing'. All you need to do, other than moving the files, is to add the following line to your `configure.ac'. AC_CONFIG_AUX_DIR([SUBDIR])  File: gettext.info, Node: mkinstalldirs, Next: aclocal, Prev: config.guess, Up: Adjusting Files 13.4.7 `mkinstalldirs' at top level ----------------------------------- With earlier versions of GNU gettext, you needed to add the GNU `mkinstalldirs' script to your distribution. This is not needed any more. You can remove it if you not also using an automake version older than automake 1.9.  File: gettext.info, Node: aclocal, Next: acconfig, Prev: mkinstalldirs, Up: Adjusting Files 13.4.8 `aclocal.m4' at top level -------------------------------- If you do not have an `aclocal.m4' file in your distribution, the simplest is to concatenate the files `codeset.m4', `fcntl-o.m4', `gettext.m4', `glibc2.m4', `glibc21.m4', `iconv.m4', `intdiv0.m4', `intl.m4', `intldir.m4', `intlmacosx.m4', `intmax.m4', `inttypes_h.m4', `inttypes-pri.m4', `lcmessage.m4', `lib-ld.m4', `lib-link.m4', `lib-prefix.m4', `lock.m4', `longlong.m4', `nls.m4', `po.m4', `printf-posix.m4', `progtest.m4', `size_max.m4', `stdint_h.m4', `threadlib.m4', `uintmax_t.m4', `visibility.m4', `wchar_t.m4', `wint_t.m4', `xsize.m4' from GNU `gettext''s `m4/' directory into a single file. If you have suppressed the `intl/' directory, only `gettext.m4', `iconv.m4', `lib-ld.m4', `lib-link.m4', `lib-prefix.m4', `nls.m4', `po.m4', `progtest.m4' need to be concatenated. If you are not using GNU `automake' 1.8 or newer, you will need to add a file `mkdirp.m4' from a newer automake distribution to the list of files above. If you already have an `aclocal.m4' file, then you will have to merge the said macro files into your `aclocal.m4'. Note that if you are upgrading from a previous release of GNU `gettext', you should most probably _replace_ the macros (`AM_GNU_GETTEXT', etc.), as they usually change a little from one release of GNU `gettext' to the next. Their contents may vary as we get more experience with strange systems out there. If you are using GNU `automake' 1.5 or newer, it is enough to put these macro files into a subdirectory named `m4/' and add the line ACLOCAL_AMFLAGS = -I m4 to your top level `Makefile.am'. These macros check for the internationalization support functions and related informations. Hopefully, once stabilized, these macros might be integrated in the standard Autoconf set, because this piece of `m4' code will be the same for all projects using GNU `gettext'.  File: gettext.info, Node: acconfig, Next: config.h.in, Prev: aclocal, Up: Adjusting Files 13.4.9 `acconfig.h' at top level -------------------------------- Earlier GNU `gettext' releases required to put definitions for `ENABLE_NLS', `HAVE_GETTEXT' and `HAVE_LC_MESSAGES', `HAVE_STPCPY', `PACKAGE' and `VERSION' into an `acconfig.h' file. This is not needed any more; you can remove them from your `acconfig.h' file unless your package uses them independently from the `intl/' directory.  File: gettext.info, Node: config.h.in, Next: Makefile, Prev: acconfig, Up: Adjusting Files 13.4.10 `config.h.in' at top level ---------------------------------- The include file template that holds the C macros to be defined by `configure' is usually called `config.h.in' and may be maintained either manually or automatically. If `gettextize' has created an `intl/' directory, this file must be called `config.h.in' and must be at the top level. If, however, you have suppressed the `intl/' directory by calling `gettextize' without `--intl' option, then you can choose the name of this file and its location freely. If it is maintained automatically, by use of the `autoheader' program, you need to do nothing about it. This is the case in particular if you are using GNU `automake'. If it is maintained manually, and if `gettextize' has created an `intl/' directory, you should switch to using `autoheader'. The list of C macros to be added for the sake of the `intl/' directory is just too long to be maintained manually; it also changes between different versions of GNU `gettext'. If it is maintained manually, and if on the other hand you have suppressed the `intl/' directory by calling `gettextize' without `--intl' option, then you can get away by adding the following lines to `config.h.in': /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS  File: gettext.info, Node: Makefile, Next: src/Makefile, Prev: config.h.in, Up: Adjusting Files 13.4.11 `Makefile.in' at top level ---------------------------------- Here are a few modifications you need to make to your main, top-level `Makefile.in' file. 1. Add the following lines near the beginning of your `Makefile.in', so the `dist:' goal will work properly (as explained further down): PACKAGE = @PACKAGE@ VERSION = @VERSION@ 2. Add file `ABOUT-NLS' to the `DISTFILES' definition, so the file gets distributed. 3. Wherever you process subdirectories in your `Makefile.in', be sure you also process the subdirectories `intl' and `po'. Special rules in the `Makefiles' take care for the case where no internationalization is wanted. If you are using Makefiles, either generated by automake, or hand-written so they carefully follow the GNU coding standards, the effected goals for which the new subdirectories must be handled include `installdirs', `install', `uninstall', `clean', `distclean'. Here is an example of a canonical order of processing. In this example, we also define `SUBDIRS' in `Makefile.in' for it to be further used in the `dist:' goal. SUBDIRS = doc intl lib src po Note that you must arrange for `make' to descend into the `intl' directory before descending into other directories containing code which make use of the `libintl.h' header file. For this reason, here we mention `intl' before `lib' and `src'. 4. A delicate point is the `dist:' goal, as both `intl/Makefile' and `po/Makefile' will later assume that the proper directory has been set up from the main `Makefile'. Here is an example at what the `dist:' goal might look like: distdir = $(PACKAGE)-$(VERSION) dist: Makefile rm -fr $(distdir) mkdir $(distdir) chmod 777 $(distdir) for file in $(DISTFILES); do \ ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \ done for subdir in $(SUBDIRS); do \ mkdir $(distdir)/$$subdir || exit 1; \ chmod 777 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done tar chozf $(distdir).tar.gz $(distdir) rm -fr $(distdir) Note that if you are using GNU `automake', `Makefile.in' is automatically generated from `Makefile.am', and all needed changes to `Makefile.am' are already made by running `gettextize'.  File: gettext.info, Node: src/Makefile, Next: lib/gettext.h, Prev: Makefile, Up: Adjusting Files 13.4.12 `Makefile.in' in `src/' ------------------------------- Some of the modifications made in the main `Makefile.in' will also be needed in the `Makefile.in' from your package sources, which we assume here to be in the `src/' subdirectory. Here are all the modifications needed in `src/Makefile.in': 1. In view of the `dist:' goal, you should have these lines near the beginning of `src/Makefile.in': PACKAGE = @PACKAGE@ VERSION = @VERSION@ 2. If not done already, you should guarantee that `top_srcdir' gets defined. This will serve for `cpp' include files. Just add the line: top_srcdir = @top_srcdir@ 3. You might also want to define `subdir' as `src', later allowing for almost uniform `dist:' goals in all your `Makefile.in'. At list, the `dist:' goal below assume that you used: subdir = src 4. The `main' function of your program will normally call `bindtextdomain' (see *note Triggering::), like this: bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); To make LOCALEDIR known to the program, add the following lines to `Makefile.in' if you are using Autoconf version 2.60 or newer: datadir = @datadir@ datarootdir= @datarootdir@ localedir = @localedir@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ or these lines if your version of Autoconf is older than 2.60: datadir = @datadir@ localedir = $(datadir)/locale DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ Note that `@datadir@' defaults to `$(prefix)/share', thus `$(localedir)' defaults to `$(prefix)/share/locale'. 5. You should ensure that the final linking will use `@LIBINTL@' or `@LTLIBINTL@' as a library. `@LIBINTL@' is for use without `libtool', `@LTLIBINTL@' is for use with `libtool'. An easy way to achieve this is to manage that it gets into `LIBS', like this: LIBS = @LIBINTL@ @LIBS@ In most packages internationalized with GNU `gettext', one will find a directory `lib/' in which a library containing some helper functions will be build. (You need at least the few functions which the GNU `gettext' Library itself needs.) However some of the functions in the `lib/' also give messages to the user which of course should be translated, too. Taking care of this, the support library (say `libsupport.a') should be placed before `@LIBINTL@' and `@LIBS@' in the above example. So one has to write this: LIBS = ../lib/libsupport.a @LIBINTL@ @LIBS@ 6. You should also ensure that directory `intl/' will be searched for C preprocessor include files in all circumstances. So, you have to manage so both `-I../intl' and `-I$(top_srcdir)/intl' will be given to the C compiler. 7. Your `dist:' goal has to conform with others. Here is a reasonable definition for it: distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist: Makefile $(DISTFILES) for file in $(DISTFILES); do \ ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir) || exit 1; \ done Note that if you are using GNU `automake', `Makefile.in' is automatically generated from `Makefile.am', and the first three changes and the last change are not necessary. The remaining needed `Makefile.am' modifications are the following: 1. To make LOCALEDIR known to the program, add the following to `Makefile.am': <module>_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" for each specific module or compilation unit, or AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" for all modules and compilation units together. Furthermore, if you are using an Autoconf version older then 2.60, add this line to define `localedir': localedir = $(datadir)/locale 2. To ensure that the final linking will use `@LIBINTL@' or `@LTLIBINTL@' as a library, add the following to `Makefile.am': <program>_LDADD = @LIBINTL@ for each specific program, or LDADD = @LIBINTL@ for all programs together. Remember that when you use `libtool' to link a program, you need to use @LTLIBINTL@ instead of @LIBINTL@ for that program. 3. If you have an `intl/' directory, whose contents is created by `gettextize', then to ensure that it will be searched for C preprocessor include files in all circumstances, add something like this to `Makefile.am': AM_CPPFLAGS = -I../intl -I$(top_srcdir)/intl  File: gettext.info, Node: lib/gettext.h, Prev: src/Makefile, Up: Adjusting Files 13.4.13 `gettext.h' in `lib/' ----------------------------- Internationalization of packages, as provided by GNU `gettext', is optional. It can be turned off in two situations: * When the installer has specified `./configure --disable-nls'. This can be useful when small binaries are more important than features, for example when building utilities for boot diskettes. It can also be useful in order to get some specific C compiler warnings about code quality with some older versions of GCC (older than 3.0). * When the package does not include the `intl/' subdirectory, and the libintl.h header (with its associated libintl library, if any) is not already installed on the system, it is preferable that the package builds without internationalization support, rather than to give a compilation error. A C preprocessor macro can be used to detect these two cases. Usually, when `libintl.h' was found and not explicitly disabled, the `ENABLE_NLS' macro will be defined to 1 in the autoconf generated configuration file (usually called `config.h'). In the two negative situations, however, this macro will not be defined, thus it will evaluate to 0 in C preprocessor expressions. `gettext.h' is a convenience header file for conditional use of `<libintl.h>', depending on the `ENABLE_NLS' macro. If `ENABLE_NLS' is set, it includes `<libintl.h>'; otherwise it defines no-op substitutes for the libintl.h functions. We recommend the use of `"gettext.h"' over direct use of `<libintl.h>', so that portability to older systems is guaranteed and installers can turn off internationalization if they want to. In the C code, you will then write #include "gettext.h" instead of #include <libintl.h> The location of `gettext.h' is usually in a directory containing auxiliary include files. In many GNU packages, there is a directory `lib/' containing helper functions; `gettext.h' fits there. In other packages, it can go into the `src' directory. Do not install the `gettext.h' file in public locations. Every package that needs it should contain a copy of it on its own.  File: gettext.info, Node: autoconf macros, Next: CVS Issues, Prev: Adjusting Files, Up: Maintainers 13.5 Autoconf macros for use in `configure.ac' ============================================== GNU `gettext' installs macros for use in a package's `configure.ac' or `configure.in'. *Note Introduction: (autoconf)Top. The primary macro is, of course, `AM_GNU_GETTEXT'. * Menu: * AM_GNU_GETTEXT:: AM_GNU_GETTEXT in `gettext.m4' * AM_GNU_GETTEXT_VERSION:: AM_GNU_GETTEXT_VERSION in `gettext.m4' * AM_GNU_GETTEXT_NEED:: AM_GNU_GETTEXT_NEED in `gettext.m4' * AM_GNU_GETTEXT_INTL_SUBDIR:: AM_GNU_GETTEXT_INTL_SUBDIR in `intldir.m4' * AM_PO_SUBDIRS:: AM_PO_SUBDIRS in `po.m4' * AM_XGETTEXT_OPTION:: AM_XGETTEXT_OPTION in `po.m4' * AM_ICONV:: AM_ICONV in `iconv.m4'  File: gettext.info, Node: AM_GNU_GETTEXT, Next: AM_GNU_GETTEXT_VERSION, Prev: autoconf macros, Up: autoconf macros 13.5.1 AM_GNU_GETTEXT in `gettext.m4' ------------------------------------- The `AM_GNU_GETTEXT' macro tests for the presence of the GNU gettext function family in either the C library or a separate `libintl' library (shared or static libraries are both supported) or in the package's `intl/' directory. It also invokes `AM_PO_SUBDIRS', thus preparing the `po/' directories of the package for building. `AM_GNU_GETTEXT' accepts up to three optional arguments. The general syntax is AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]) INTLSYMBOL can be `external' or `no-libtool'. The default (if it is not specified or empty) is `no-libtool'. INTLSYMBOL should be `external' for packages with no `intl/' directory. For packages with an `intl/' directory, you can either use an INTLSYMBOL equal to `no-libtool', or you can use `external' and override by using the macro `AM_GNU_GETTEXT_INTL_SUBDIR' elsewhere. The two ways to specify the existence of an `intl/' directory are equivalent. At build time, a static library `$(top_builddir)/intl/libintl.a' will then be created. If NEEDSYMBOL is specified and is `need-ngettext', then GNU gettext implementations (in libc or libintl) without the `ngettext()' function will be ignored. If NEEDSYMBOL is specified and is `need-formatstring-macros', then GNU gettext implementations that don't support the ISO C 99 `<inttypes.h>' formatstring macros will be ignored. Only one NEEDSYMBOL can be specified. These requirements can also be specified by using the macro `AM_GNU_GETTEXT_NEED' elsewhere. To specify more than one requirement, just specify the strongest one among them, or invoke the `AM_GNU_GETTEXT_NEED' macro several times. The hierarchy among the various alternatives is as follows: `need-formatstring-macros' implies `need-ngettext'. INTLDIR is used to find the intl libraries. If empty, the value `$(top_builddir)/intl/' is used. The `AM_GNU_GETTEXT' macro determines whether GNU gettext is available and should be used. If so, it sets the `USE_NLS' variable to `yes'; it defines `ENABLE_NLS' to 1 in the autoconf generated configuration file (usually called `config.h'); it sets the variables `LIBINTL' and `LTLIBINTL' to the linker options for use in a Makefile (`LIBINTL' for use without libtool, `LTLIBINTL' for use with libtool); it adds an `-I' option to `CPPFLAGS' if necessary. In the negative case, it sets `USE_NLS' to `no'; it sets `LIBINTL' and `LTLIBINTL' to empty and doesn't change `CPPFLAGS'. The complexities that `AM_GNU_GETTEXT' deals with are the following: * Some operating systems have `gettext' in the C library, for example glibc. Some have it in a separate library `libintl'. GNU `libintl' might have been installed as part of the GNU `gettext' package. * GNU `libintl', if installed, is not necessarily already in the search path (`CPPFLAGS' for the include file search path, `LDFLAGS' for the library search path). * Except for glibc, the operating system's native `gettext' cannot exploit the GNU mo files, doesn't have the necessary locale dependency features, and cannot convert messages from the catalog's text encoding to the user's locale encoding. * GNU `libintl', if installed, is not necessarily already in the run time library search path. To avoid the need for setting an environment variable like `LD_LIBRARY_PATH', the macro adds the appropriate run time search path options to the `LIBINTL' and `LTLIBINTL' variables. This works on most systems, but not on some operating systems with limited shared library support, like SCO. * GNU `libintl' relies on POSIX/XSI `iconv'. The macro checks for linker options needed to use iconv and appends them to the `LIBINTL' and `LTLIBINTL' variables.  File: gettext.info, Node: AM_GNU_GETTEXT_VERSION, Next: AM_GNU_GETTEXT_NEED, Prev: AM_GNU_GETTEXT, Up: autoconf macros 13.5.2 AM_GNU_GETTEXT_VERSION in `gettext.m4' --------------------------------------------- The `AM_GNU_GETTEXT_VERSION' macro declares the version number of the GNU gettext infrastructure that is used by the package. The use of this macro is optional; only the `autopoint' program makes use of it (*note CVS Issues::).  File: gettext.info, Node: AM_GNU_GETTEXT_NEED, Next: AM_GNU_GETTEXT_INTL_SUBDIR, Prev: AM_GNU_GETTEXT_VERSION, Up: autoconf macros 13.5.3 AM_GNU_GETTEXT_NEED in `gettext.m4' ------------------------------------------ The `AM_GNU_GETTEXT_NEED' macro declares a constraint regarding the GNU gettext implementation. The syntax is AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) If NEEDSYMBOL is `need-ngettext', then GNU gettext implementations (in libc or libintl) without the `ngettext()' function will be ignored. If NEEDSYMBOL is `need-formatstring-macros', then GNU gettext implementations that don't support the ISO C 99 `<inttypes.h>' formatstring macros will be ignored. The optional second argument of `AM_GNU_GETTEXT' is also taken into account. The `AM_GNU_GETTEXT_NEED' invocations can occur before or after the `AM_GNU_GETTEXT' invocation; the order doesn't matter.  File: gettext.info, Node: AM_GNU_GETTEXT_INTL_SUBDIR, Next: AM_PO_SUBDIRS, Prev: AM_GNU_GETTEXT_NEED, Up: autoconf macros 13.5.4 AM_GNU_GETTEXT_INTL_SUBDIR in `intldir.m4' ------------------------------------------------- The `AM_GNU_GETTEXT_INTL_SUBDIR' macro specifies that the `AM_GNU_GETTEXT' macro, although invoked with the first argument `external', should also prepare for building the `intl/' subdirectory. The `AM_GNU_GETTEXT_INTL_SUBDIR' invocation can occur before or after the `AM_GNU_GETTEXT' invocation; the order doesn't matter. The use of this macro requires GNU automake 1.10 or newer and GNU autoconf 2.61 or newer.  File: gettext.info, Node: AM_PO_SUBDIRS, Next: AM_XGETTEXT_OPTION, Prev: AM_GNU_GETTEXT_INTL_SUBDIR, Up: autoconf macros 13.5.5 AM_PO_SUBDIRS in `po.m4' ------------------------------- The `AM_PO_SUBDIRS' macro prepares the `po/' directories of the package for building. This macro should be used in internationalized programs written in other programming languages than C, C++, Objective C, for example `sh', `Python', `Lisp'. See *note Programming Languages:: for a list of programming languages that support localization through PO files. The `AM_PO_SUBDIRS' macro determines whether internationalization should be used. If so, it sets the `USE_NLS' variable to `yes', otherwise to `no'. It also determines the right values for Makefile variables in each `po/' directory.  File: gettext.info, Node: AM_XGETTEXT_OPTION, Next: AM_ICONV, Prev: AM_PO_SUBDIRS, Up: autoconf macros 13.5.6 AM_XGETTEXT_OPTION in `po.m4' ------------------------------------ The `AM_XGETTEXT_OPTION' macro registers a command-line option to be used in the invocations of `xgettext' in the `po/' directories of the package. For example, if you have a source file that defines a function `error_at_line' whose fifth argument is a format string, you can use AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format]) to instruct `xgettext' to mark all translatable strings in `gettext' invocations that occur as fifth argument to this function as `c-format'. See *note xgettext Invocation:: for the list of options that `xgettext' accepts. The use of this macro is an alternative to the use of the `XGETTEXT_OPTIONS' variable in `po/Makevars'.  File: gettext.info, Node: AM_ICONV, Prev: AM_XGETTEXT_OPTION, Up: autoconf macros 13.5.7 AM_ICONV in `iconv.m4' ----------------------------- The `AM_ICONV' macro tests for the presence of the POSIX/XSI `iconv' function family in either the C library or a separate `libiconv' library. If found, it sets the `am_cv_func_iconv' variable to `yes'; it defines `HAVE_ICONV' to 1 in the autoconf generated configuration file (usually called `config.h'); it defines `ICONV_CONST' to `const' or to empty, depending on whether the second argument of `iconv()' is of type `const char **' or `char **'; it sets the variables `LIBICONV' and `LTLIBICONV' to the linker options for use in a Makefile (`LIBICONV' for use without libtool, `LTLIBICONV' for use with libtool); it adds an `-I' option to `CPPFLAGS' if necessary. If not found, it sets `LIBICONV' and `LTLIBICONV' to empty and doesn't change `CPPFLAGS'. The complexities that `AM_ICONV' deals with are the following: * Some operating systems have `iconv' in the C library, for example glibc. Some have it in a separate library `libiconv', for example OSF/1 or FreeBSD. Regardless of the operating system, GNU `libiconv' might have been installed. In that case, it should be used instead of the operating system's native `iconv'. * GNU `libiconv', if installed, is not necessarily already in the search path (`CPPFLAGS' for the include file search path, `LDFLAGS' for the library search path). * GNU `libiconv' is binary incompatible with some operating system's native `iconv', for example on FreeBSD. Use of an `iconv.h' and `libiconv.so' that don't fit together would produce program crashes. * GNU `libiconv', if installed, is not necessarily already in the run time library search path. To avoid the need for setting an environment variable like `LD_LIBRARY_PATH', the macro adds the appropriate run time search path options to the `LIBICONV' variable. This works on most systems, but not on some operating systems with limited shared library support, like SCO. `iconv.m4' is distributed with the GNU gettext package because `gettext.m4' relies on it.  File: gettext.info, Node: CVS Issues, Next: Release Management, Prev: autoconf macros, Up: Maintainers 13.6 Integrating with CVS ========================= Many projects use CVS for distributed development, version control and source backup. This section gives some advice how to manage the uses of `cvs', `gettextize', `autopoint' and `autoconf'. * Menu: * Distributed CVS:: Avoiding version mismatch in distributed development * Files under CVS:: Files to put under CVS version control * autopoint Invocation:: Invoking the `autopoint' Program  File: gettext.info, Node: Distributed CVS, Next: Files under CVS, Prev: CVS Issues, Up: CVS Issues 13.6.1 Avoiding version mismatch in distributed development ----------------------------------------------------------- In a project development with multiple developers, using CVS, there should be a single developer who occasionally - when there is desire to upgrade to a new `gettext' version - runs `gettextize' and performs the changes listed in *note Adjusting Files::, and then commits his changes to the CVS. It is highly recommended that all developers on a project use the same version of GNU `gettext' in the package. In other words, if a developer runs `gettextize', he should go the whole way, make the necessary remaining changes and commit his changes to the CVS. Otherwise the following damages will likely occur: * Apparent version mismatch between developers. Since some `gettext' specific portions in `configure.ac', `configure.in' and `Makefile.am', `Makefile.in' files depend on the `gettext' version, the use of infrastructure files belonging to different `gettext' versions can easily lead to build errors. * Hidden version mismatch. Such version mismatch can also lead to malfunctioning of the package, that may be undiscovered by the developers. The worst case of hidden version mismatch is that internationalization of the package doesn't work at all. * Release risks. All developers implicitly perform constant testing on a package. This is important in the days and weeks before a release. If the guy who makes the release tar files uses a different version of GNU `gettext' than the other developers, the distribution will be less well tested than if all had been using the same `gettext' version. For example, it is possible that a platform specific bug goes undiscovered due to this constellation.  File: gettext.info, Node: Files under CVS, Next: autopoint Invocation, Prev: Distributed CVS, Up: CVS Issues 13.6.2 Files to put under CVS version control --------------------------------------------- There are basically three ways to deal with generated files in the context of a CVS repository, such as `configure' generated from `configure.ac', `PARSER.c' generated from `PARSER.y', or `po/Makefile.in.in' autoinstalled by `gettextize' or `autopoint'. 1. All generated files are always committed into the repository. 2. All generated files are committed into the repository occasionally, for example each time a release is made. 3. Generated files are never committed into the repository. Each of these three approaches has different advantages and drawbacks. 1. The advantage is that anyone can check out the CVS at any moment and gets a working build. The drawbacks are: 1a. It requires some frequent "cvs commit" actions by the maintainers. 1b. The repository grows in size quite fast. 2. The advantage is that anyone can check out the CVS, and the usual "./configure; make" will work. The drawbacks are: 2a. The one who checks out the repository needs tools like GNU `automake', GNU `autoconf', GNU `m4' installed in his PATH; sometimes he even needs particular versions of them. 2b. When a release is made and a commit is made on the generated files, the other developers get conflicts on the generated files after doing "cvs update". Although these conflicts are easy to resolve, they are annoying. 3. The advantage is less work for the maintainers. The drawback is that anyone who checks out the CVS not only needs tools like GNU `automake', GNU `autoconf', GNU `m4' installed in his PATH, but also that he needs to perform a package specific pre-build step before being able to "./configure; make". For the first and second approach, all files modified or brought in by the occasional `gettextize' invocation and update should be committed into the CVS. For the third approach, the maintainer can omit from the CVS repository all the files that `gettextize' mentions as "copy". Instead, he adds to the `configure.ac' or `configure.in' a line of the form AM_GNU_GETTEXT_VERSION(0.18.1) and adds to the package's pre-build script an invocation of `autopoint'. For everyone who checks out the CVS, this `autopoint' invocation will copy into the right place the `gettext' infrastructure files that have been omitted from the CVS. The version number used as argument to `AM_GNU_GETTEXT_VERSION' is the version of the `gettext' infrastructure that the package wants to use. It is also the minimum version number of the `autopoint' program. So, if you write `AM_GNU_GETTEXT_VERSION(0.11.5)' then the developers can have any version >= 0.11.5 installed; the package will work with the 0.11.5 infrastructure in all developers' builds. When the maintainer then runs gettextize from, say, version 0.12.1 on the package, the occurrence of `AM_GNU_GETTEXT_VERSION(0.11.5)' will be changed into `AM_GNU_GETTEXT_VERSION(0.12.1)', and all other developers that use the CVS will henceforth need to have GNU `gettext' 0.12.1 or newer installed.  File: gettext.info, Node: autopoint Invocation, Prev: Files under CVS, Up: CVS Issues 13.6.3 Invoking the `autopoint' Program --------------------------------------- autopoint [OPTION]... The `autopoint' program copies standard gettext infrastructure files into a source package. It extracts from a macro call of the form `AM_GNU_GETTEXT_VERSION(VERSION)', found in the package's `configure.in' or `configure.ac' file, the gettext version used by the package, and copies the infrastructure files belonging to this version into the package. 13.6.3.1 Options ................ `-f' `--force' Force overwriting of files that already exist. `-n' `--dry-run' Print modifications but don't perform them. All file copying actions that `autopoint' would normally execute are inhibited and instead only listed on standard output. 13.6.3.2 Informative output ........................... `--help' Display this help and exit. `--version' Output version information and exit. `autopoint' supports the GNU `gettext' versions from 0.10.35 to the current one, 0.18.1. In order to apply `autopoint' to a package using a `gettext' version newer than 0.18.1, you need to install this same version of GNU `gettext' at least. In packages using GNU `automake', an invocation of `autopoint' should be followed by invocations of `aclocal' and then `autoconf' and `autoheader'. The reason is that `autopoint' installs some autoconf macro files, which are used by `aclocal' to create `aclocal.m4', and the latter is used by `autoconf' to create the package's `configure' script and by `autoheader' to create the package's `config.h.in' include file template. The name `autopoint' is an abbreviation of `auto-po-intl-m4'; the tool copies or updates mostly files in the `po', `intl', `m4' directories.  File: gettext.info, Node: Release Management, Prev: CVS Issues, Up: Maintainers 13.7 Creating a Distribution Tarball ==================================== In projects that use GNU `automake', the usual commands for creating a distribution tarball, `make dist' or `make distcheck', automatically update the PO files as needed. If GNU `automake' is not used, the maintainer needs to perform this update before making a release: $ ./configure $ (cd po; make update-po) $ make distclean  File: gettext.info, Node: Installers, Next: Programming Languages, Prev: Maintainers, Up: Top 14 The Installer's and Distributor's View ***************************************** By default, packages fully using GNU `gettext', internally, are installed in such a way that they to allow translation of messages. At _configuration_ time, those packages should automatically detect whether the underlying host system already provides the GNU `gettext' functions. If not, the GNU `gettext' library should be automatically prepared and used. Installers may use special options at configuration time for changing this behavior. The command `./configure --with-included-gettext' bypasses system `gettext' to use the included GNU `gettext' instead, while `./configure --disable-nls' produces programs totally unable to translate messages. Internationalized packages have usually many `LL.po' files. Unless translations are disabled, all those available are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed.  File: gettext.info, Node: Programming Languages, Next: Conclusion, Prev: Installers, Up: Top 15 Other Programming Languages ****************************** While the presentation of `gettext' focuses mostly on C and implicitly applies to C++ as well, its scope is far broader than that: Many programming languages, scripting languages and other textual data like GUI resources or package descriptions can make use of the gettext approach. * Menu: * Language Implementors:: The Language Implementor's View * Programmers for other Languages:: The Programmer's View * Translators for other Languages:: The Translator's View * Maintainers for other Languages:: The Maintainer's View * List of Programming Languages:: Individual Programming Languages * List of Data Formats:: Internationalizable Data  File: gettext.info, Node: Language Implementors, Next: Programmers for other Languages, Prev: Programming Languages, Up: Programming Languages 15.1 The Language Implementor's View ==================================== All programming and scripting languages that have the notion of strings are eligible to supporting `gettext'. Supporting `gettext' means the following: 1. You should add to the language a syntax for translatable strings. In principle, a function call of `gettext' would do, but a shorthand syntax helps keeping the legibility of internationalized programs. For example, in C we use the syntax `_("string")', and in GNU awk we use the shorthand `_"string"'. 2. You should arrange that evaluation of such a translatable string at runtime calls the `gettext' function, or performs equivalent processing. 3. Similarly, you should make the functions `ngettext', `dcgettext', `dcngettext' available from within the language. These functions are less often used, but are nevertheless necessary for particular purposes: `ngettext' for correct plural handling, and `dcgettext' and `dcngettext' for obeying other locale-related environment variables than `LC_MESSAGES', such as `LC_TIME' or `LC_MONETARY'. For these latter functions, you need to make the `LC_*' constants, available in the C header `<locale.h>', referenceable from within the language, usually either as enumeration values or as strings. 4. You should allow the programmer to designate a message domain, either by making the `textdomain' function available from within the language, or by introducing a magic variable called `TEXTDOMAIN'. Similarly, you should allow the programmer to designate where to search for message catalogs, by providing access to the `bindtextdomain' function. 5. You should either perform a `setlocale (LC_ALL, "")' call during the startup of your language runtime, or allow the programmer to do so. Remember that gettext will act as a no-op if the `LC_MESSAGES' and `LC_CTYPE' locale categories are not both set. 6. A programmer should have a way to extract translatable strings from a program into a PO file. The GNU `xgettext' program is being extended to support very different programming languages. Please contact the GNU `gettext' maintainers to help them doing this. If the string extractor is best integrated into your language's parser, GNU `xgettext' can function as a front end to your string extractor. 7. The language's library should have a string formatting facility where the arguments of a format string are denoted by a positional number or a name. This is needed because for some languages and some messages with more than one substitutable argument, the translation will need to output the substituted arguments in different order. *Note c-format Flag::. 8. If the language has more than one implementation, and not all of the implementations use `gettext', but the programs should be portable across implementations, you should provide a no-i18n emulation, that makes the other implementations accept programs written for yours, without actually translating the strings. 9. To help the programmer in the task of marking translatable strings, which is sometimes performed using the Emacs PO mode (*note Marking::), you are welcome to contact the GNU `gettext' maintainers, so they can add support for your language to `po-mode.el'. On the implementation side, three approaches are possible, with different effects on portability and copyright: * You may integrate the GNU `gettext''s `intl/' directory in your package, as described in *note Maintainers::. This allows you to have internationalization on all kinds of platforms. Note that when you then distribute your package, it legally falls under the GNU General Public License, and the GNU project will be glad about your contribution to the Free Software pool. * You may link against GNU `gettext' functions if they are found in the C library. For example, an autoconf test for `gettext()' and `ngettext()' will detect this situation. For the moment, this test will succeed on GNU systems and not on other platforms. No severe copyright restrictions apply. * You may emulate or reimplement the GNU `gettext' functionality. This has the advantage of full portability and no copyright restrictions, but also the drawback that you have to reimplement the GNU `gettext' features (such as the `LANGUAGE' environment variable, the locale aliases database, the automatic charset conversion, and plural handling).  File: gettext.info, Node: Programmers for other Languages, Next: Translators for other Languages, Prev: Language Implementors, Up: Programming Languages 15.2 The Programmer's View ========================== For the programmer, the general procedure is the same as for the C language. The Emacs PO mode marking supports other languages, and the GNU `xgettext' string extractor recognizes other languages based on the file extension or a command-line option. In some languages, `setlocale' is not needed because it is already performed by the underlying language runtime.  File: gettext.info, Node: Translators for other Languages, Next: Maintainers for other Languages, Prev: Programmers for other Languages, Up: Programming Languages 15.3 The Translator's View ========================== The translator works exactly as in the C language case. The only difference is that when translating format strings, she has to be aware of the language's particular syntax for positional arguments in format strings. * Menu: * c-format:: C Format Strings * objc-format:: Objective C Format Strings * sh-format:: Shell Format Strings * python-format:: Python Format Strings * lisp-format:: Lisp Format Strings * elisp-format:: Emacs Lisp Format Strings * librep-format:: librep Format Strings * scheme-format:: Scheme Format Strings * smalltalk-format:: Smalltalk Format Strings * java-format:: Java Format Strings * csharp-format:: C# Format Strings * awk-format:: awk Format Strings * object-pascal-format:: Object Pascal Format Strings * ycp-format:: YCP Format Strings * tcl-format:: Tcl Format Strings * perl-format:: Perl Format Strings * php-format:: PHP Format Strings * gcc-internal-format:: GCC internal Format Strings * gfc-internal-format:: GFC internal Format Strings * qt-format:: Qt Format Strings * qt-plural-format:: Qt Plural Format Strings * kde-format:: KDE Format Strings * boost-format:: Boost Format Strings  File: gettext.info, Node: c-format, Next: objc-format, Prev: Translators for other Languages, Up: Translators for other Languages 15.3.1 C Format Strings ----------------------- C format strings are described in POSIX (IEEE P1003.1 2001), section XSH 3 fprintf(), `http://www.opengroup.org/onlinepubs/007904975/functions/fprintf.html'. See also the fprintf() manual page, `http://www.linuxvalley.it/encyclopedia/ldp/manpage/man3/printf.3.php', `http://informatik.fh-wuerzburg.de/student/i510/man/printf.html'. Although format strings with positions that reorder arguments, such as "Only %2$d bytes free on '%1$s'." which is semantically equivalent to "'%s' has only %d bytes free." are a POSIX/XSI feature and not specified by ISO C 99, translators can rely on this reordering ability: On the few platforms where `printf()', `fprintf()' etc. don't support this feature natively, `libintl.a' or `libintl.so' provides replacement functions, and GNU `<libintl.h>' activates these replacement functions automatically. As a special feature for Farsi (Persian) and maybe Arabic, translators can insert an `I' flag into numeric format directives. For example, the translation of `"%d"' can be `"%Id"'. The effect of this flag, on systems with GNU `libc', is that in the output, the ASCII digits are replaced with the `outdigits' defined in the `LC_CTYPE' locale category. On other systems, the `gettext' function removes this flag, so that it has no effect. Note that the programmer should _not_ put this flag into the untranslated string. (Putting the `I' format directive flag into an MSGID string would lead to undefined behaviour on platforms without glibc when NLS is disabled.)  File: gettext.info, Node: objc-format, Next: sh-format, Prev: c-format, Up: Translators for other Languages 15.3.2 Objective C Format Strings --------------------------------- Objective C format strings are like C format strings. They support an additional format directive: "%@", which when executed consumes an argument of type `Object *'.  File: gettext.info, Node: sh-format, Next: python-format, Prev: objc-format, Up: Translators for other Languages 15.3.3 Shell Format Strings --------------------------- Shell format strings, as supported by GNU gettext and the `envsubst' program, are strings with references to shell variables in the form `$VARIABLE' or `${VARIABLE}'. References of the form `${VARIABLE-DEFAULT}', `${VARIABLE:-DEFAULT}', `${VARIABLE=DEFAULT}', `${VARIABLE:=DEFAULT}', `${VARIABLE+REPLACEMENT}', `${VARIABLE:+REPLACEMENT}', `${VARIABLE?IGNORED}', `${VARIABLE:?IGNORED}', that would be valid inside shell scripts, are not supported. The VARIABLE names must consist solely of alphanumeric or underscore ASCII characters, not start with a digit and be nonempty; otherwise such a variable reference is ignored.  File: gettext.info, Node: python-format, Next: lisp-format, Prev: sh-format, Up: Translators for other Languages 15.3.4 Python Format Strings ---------------------------- Python format strings are described in Python Library reference / 2. Built-in Types, Exceptions and Functions / 2.2. Built-in Types / 2.2.6. Sequence Types / 2.2.6.2. String Formatting Operations. `http://www.python.org/doc/2.2.1/lib/typesseq-strings.html'.  File: gettext.info, Node: lisp-format, Next: elisp-format, Prev: python-format, Up: Translators for other Languages 15.3.5 Lisp Format Strings -------------------------- Lisp format strings are described in the Common Lisp HyperSpec, chapter 22.3 Formatted Output, `http://www.lisp.org/HyperSpec/Body/sec_22-3.html'.  File: gettext.info, Node: elisp-format, Next: librep-format, Prev: lisp-format, Up: Translators for other Languages 15.3.6 Emacs Lisp Format Strings -------------------------------- Emacs Lisp format strings are documented in the Emacs Lisp reference, section Formatting Strings, `http://www.gnu.org/manual/elisp-manual-21-2.8/html_chapter/elisp_4.html#SEC75'. Note that as of version 21, XEmacs supports numbered argument specifications in format strings while FSF Emacs doesn't.  File: gettext.info, Node: librep-format, Next: scheme-format, Prev: elisp-format, Up: Translators for other Languages 15.3.7 librep Format Strings ---------------------------- librep format strings are documented in the librep manual, section Formatted Output, `http://librep.sourceforge.net/librep-manual.html#Formatted%20Output', `http://www.gwinnup.org/research/docs/librep.html#SEC122'.  File: gettext.info, Node: scheme-format, Next: smalltalk-format, Prev: librep-format, Up: Translators for other Languages 15.3.8 Scheme Format Strings ---------------------------- Scheme format strings are documented in the SLIB manual, section Format Specification.  File: gettext.info, Node: smalltalk-format, Next: java-format, Prev: scheme-format, Up: Translators for other Languages 15.3.9 Smalltalk Format Strings ------------------------------- Smalltalk format strings are described in the GNU Smalltalk documentation, class `CharArray', methods `bindWith:' and `bindWithArguments:'. `http://www.gnu.org/software/smalltalk/gst-manual/gst_68.html#SEC238'. In summary, a directive starts with `%' and is followed by `%' or a nonzero digit (`1' to `9').  File: gettext.info, Node: java-format, Next: csharp-format, Prev: smalltalk-format, Up: Translators for other Languages 15.3.10 Java Format Strings --------------------------- Java format strings are described in the JDK documentation for class `java.text.MessageFormat', `http://java.sun.com/j2se/1.4/docs/api/java/text/MessageFormat.html'. See also the ICU documentation `http://oss.software.ibm.com/icu/apiref/classMessageFormat.html'.  File: gettext.info, Node: csharp-format, Next: awk-format, Prev: java-format, Up: Translators for other Languages 15.3.11 C# Format Strings ------------------------- C# format strings are described in the .NET documentation for class `System.String' and in `http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpConFormattingOverview.asp'.  File: gettext.info, Node: awk-format, Next: object-pascal-format, Prev: csharp-format, Up: Translators for other Languages 15.3.12 awk Format Strings -------------------------- awk format strings are described in the gawk documentation, section Printf, `http://www.gnu.org/manual/gawk/html_node/Printf.html#Printf'.  File: gettext.info, Node: object-pascal-format, Next: ycp-format, Prev: awk-format, Up: Translators for other Languages 15.3.13 Object Pascal Format Strings ------------------------------------ Object Pascal format strings are described in the documentation of the Free Pascal runtime library, section Format, `http://www.freepascal.org/docs-html/rtl/sysutils/format.html'.  File: gettext.info, Node: ycp-format, Next: tcl-format, Prev: object-pascal-format, Up: Translators for other Languages 15.3.14 YCP Format Strings -------------------------- YCP sformat strings are described in the libycp documentation `file:/usr/share/doc/packages/libycp/YCP-builtins.html'. In summary, a directive starts with `%' and is followed by `%' or a nonzero digit (`1' to `9').  File: gettext.info, Node: tcl-format, Next: perl-format, Prev: ycp-format, Up: Translators for other Languages 15.3.15 Tcl Format Strings -------------------------- Tcl format strings are described in the `format.n' manual page, `http://www.scriptics.com/man/tcl8.3/TclCmd/format.htm'.  File: gettext.info, Node: perl-format, Next: php-format, Prev: tcl-format, Up: Translators for other Languages 15.3.16 Perl Format Strings --------------------------- There are two kinds format strings in Perl: those acceptable to the Perl built-in function `printf', labelled as `perl-format', and those acceptable to the `libintl-perl' function `__x', labelled as `perl-brace-format'. Perl `printf' format strings are described in the `sprintf' section of `man perlfunc'. Perl brace format strings are described in the `Locale::TextDomain(3pm)' manual page of the CPAN package libintl-perl. In brief, Perl format uses placeholders put between braces (`{' and `}'). The placeholder must have the syntax of simple identifiers.  File: gettext.info, Node: php-format, Next: gcc-internal-format, Prev: perl-format, Up: Translators for other Languages 15.3.17 PHP Format Strings -------------------------- PHP format strings are described in the documentation of the PHP function `sprintf', in `phpdoc/manual/function.sprintf.html' or `http://www.php.net/manual/en/function.sprintf.php'.  File: gettext.info, Node: gcc-internal-format, Next: gfc-internal-format, Prev: php-format, Up: Translators for other Languages 15.3.18 GCC internal Format Strings ----------------------------------- These format strings are used inside the GCC sources. In such a format string, a directive starts with `%', is optionally followed by a size specifier `l', an optional flag `+', another optional flag `#', and is finished by a specifier: `%' denotes a literal percent sign, `c' denotes a character, `s' denotes a string, `i' and `d' denote an integer, `o', `u', `x' denote an unsigned integer, `.*s' denotes a string preceded by a width specification, `H' denotes a `location_t *' pointer, `D' denotes a general declaration, `F' denotes a function declaration, `T' denotes a type, `A' denotes a function argument, `C' denotes a tree code, `E' denotes an expression, `L' denotes a programming language, `O' denotes a binary operator, `P' denotes a function parameter, `Q' denotes an assignment operator, `V' denotes a const/volatile qualifier.  File: gettext.info, Node: gfc-internal-format, Next: qt-format, Prev: gcc-internal-format, Up: Translators for other Languages 15.3.19 GFC internal Format Strings ----------------------------------- These format strings are used inside the GNU Fortran Compiler sources, that is, the Fortran frontend in the GCC sources. In such a format string, a directive starts with `%' and is finished by a specifier: `%' denotes a literal percent sign, `C' denotes the current source location, `L' denotes a source location, `c' denotes a character, `s' denotes a string, `i' and `d' denote an integer, `u' denotes an unsigned integer. `i', `d', and `u' may be preceded by a size specifier `l'.  File: gettext.info, Node: qt-format, Next: qt-plural-format, Prev: gfc-internal-format, Up: Translators for other Languages 15.3.20 Qt Format Strings ------------------------- Qt format strings are described in the documentation of the QString class `file:/usr/lib/qt-4.3.0/doc/html/qstring.html'. In summary, a directive consists of a `%' followed by a digit. The same directive cannot occur more than once in a format string.  File: gettext.info, Node: qt-plural-format, Next: kde-format, Prev: qt-format, Up: Translators for other Languages 15.3.21 Qt Format Strings ------------------------- Qt format strings are described in the documentation of the QObject::tr method `file:/usr/lib/qt-4.3.0/doc/html/qobject.html'. In summary, the only allowed directive is `%n'.  File: gettext.info, Node: kde-format, Next: boost-format, Prev: qt-plural-format, Up: Translators for other Languages 15.3.22 KDE Format Strings -------------------------- KDE 4 format strings are defined as follows: A directive consists of a `%' followed by a non-zero decimal number. If a `%n' occurs in a format strings, all of `%1', ..., `%(n-1)' must occur as well, except possibly one of them.  File: gettext.info, Node: boost-format, Prev: kde-format, Up: Translators for other Languages 15.3.23 Boost Format Strings ---------------------------- Boost format strings are described in the documentation of the `boost::format' class, at `http://www.boost.org/libs/format/doc/format.html'. In summary, a directive has either the same syntax as in a C format string, such as `%1$+5d', or may be surrounded by vertical bars, such as `%|1$+5d|' or `%|1$+5|', or consists of just an argument number between percent signs, such as `%1%'.  File: gettext.info, Node: Maintainers for other Languages, Next: List of Programming Languages, Prev: Translators for other Languages, Up: Programming Languages 15.4 The Maintainer's View ========================== For the maintainer, the general procedure differs from the C language case in two ways. * For those languages that don't use GNU gettext, the `intl/' directory is not needed and can be omitted. This means that the maintainer calls the `gettextize' program without the `--intl' option, and that he invokes the `AM_GNU_GETTEXT' autoconf macro via `AM_GNU_GETTEXT([external])'. * If only a single programming language is used, the `XGETTEXT_OPTIONS' variable in `po/Makevars' (*note po/Makevars::) should be adjusted to match the `xgettext' options for that particular programming language. If the package uses more than one programming language with `gettext' support, it becomes necessary to change the POT file construction rule in `po/Makefile.in.in'. It is recommended to make one `xgettext' invocation per programming language, each with the options appropriate for that language, and to combine the resulting files using `msgcat'.  File: gettext.info, Node: List of Programming Languages, Next: List of Data Formats, Prev: Maintainers for other Languages, Up: Programming Languages 15.5 Individual Programming Languages ===================================== * Menu: * C:: C, C++, Objective C * sh:: sh - Shell Script * bash:: bash - Bourne-Again Shell Script * Python:: Python * Common Lisp:: GNU clisp - Common Lisp * clisp C:: GNU clisp C sources * Emacs Lisp:: Emacs Lisp * librep:: librep * Scheme:: GNU guile - Scheme * Smalltalk:: GNU Smalltalk * Java:: Java * C#:: C# * gawk:: GNU awk * Pascal:: Pascal - Free Pascal Compiler * wxWidgets:: wxWidgets library * YCP:: YCP - YaST2 scripting language * Tcl:: Tcl - Tk's scripting language * Perl:: Perl * PHP:: PHP Hypertext Preprocessor * Pike:: Pike * GCC-source:: GNU Compiler Collection sources  File: gettext.info, Node: C, Next: sh, Prev: List of Programming Languages, Up: List of Programming Languages 15.5.1 C, C++, Objective C -------------------------- RPMs gcc, gpp, gobjc, glibc, gettext File extension For C: `c', `h'. For C++: `C', `c++', `cc', `cxx', `cpp', `hpp'. For Objective C: `m'. String syntax `"abc"' gettext shorthand `_("abc")' gettext/ngettext functions `gettext', `dgettext', `dcgettext', `ngettext', `dngettext', `dcngettext' textdomain `textdomain' function bindtextdomain `bindtextdomain' function setlocale Programmer must call `setlocale (LC_ALL, "")' Prerequisite `#include <libintl.h>' `#include <locale.h>' `#define _(string) gettext (string)' Use or emulate GNU gettext Use Extractor `xgettext -k_' Formatting with positions `fprintf "%2$d %1$d"' In C++: `autosprintf "%2$d %1$d"' (*note Introduction: (autosprintf)Top.) Portability autoconf (gettext.m4) and #if ENABLE_NLS po-mode marking yes The following examples are available in the `examples' directory: `hello-c', `hello-c-gnome', `hello-c++', `hello-c++-qt', `hello-c++-kde', `hello-c++-gnome', `hello-c++-wxwidgets', `hello-objc', `hello-objc-gnustep', `hello-objc-gnome'.  File: gettext.info, Node: sh, Next: bash, Prev: C, Up: List of Programming Languages 15.5.2 sh - Shell Script ------------------------ RPMs bash, gettext File extension `sh' String syntax `"abc"', `'abc'', `abc' gettext shorthand `"`gettext \"abc\"`"' gettext/ngettext functions `gettext', `ngettext' programs `eval_gettext', `eval_ngettext' shell functions textdomain environment variable `TEXTDOMAIN' bindtextdomain environment variable `TEXTDOMAINDIR' setlocale automatic Prerequisite `. gettext.sh' Use or emulate GNU gettext use Extractor `xgettext' Formatting with positions -- Portability fully portable po-mode marking -- An example is available in the `examples' directory: `hello-sh'. * Menu: * Preparing Shell Scripts:: Preparing Shell Scripts for Internationalization * gettext.sh:: Contents of `gettext.sh' * gettext Invocation:: Invoking the `gettext' program * ngettext Invocation:: Invoking the `ngettext' program * envsubst Invocation:: Invoking the `envsubst' program * eval_gettext Invocation:: Invoking the `eval_gettext' function * eval_ngettext Invocation:: Invoking the `eval_ngettext' function  File: gettext.info, Node: Preparing Shell Scripts, Next: gettext.sh, Prev: sh, Up: sh 15.5.2.1 Preparing Shell Scripts for Internationalization ......................................................... Preparing a shell script for internationalization is conceptually similar to the steps described in *note Sources::. The concrete steps for shell scripts are as follows. 1. Insert the line . gettext.sh near the top of the script. `gettext.sh' is a shell function library that provides the functions `eval_gettext' (see *note eval_gettext Invocation::) and `eval_ngettext' (see *note eval_ngettext Invocation::). You have to ensure that `gettext.sh' can be found in the `PATH'. 2. Set and export the `TEXTDOMAIN' and `TEXTDOMAINDIR' environment variables. Usually `TEXTDOMAIN' is the package or program name, and `TEXTDOMAINDIR' is the absolute pathname corresponding to `$prefix/share/locale', where `$prefix' is the installation location. TEXTDOMAIN=@PACKAGE@ export TEXTDOMAIN TEXTDOMAINDIR=@LOCALEDIR@ export TEXTDOMAINDIR 3. Prepare the strings for translation, as described in *note Preparing Strings::. 4. Simplify translatable strings so that they don't contain command substitution (`"`...`"' or `"$(...)"'), variable access with defaulting (like `${VARIABLE-DEFAULT}'), access to positional arguments (like `$0', `$1', ...) or highly volatile shell variables (like `$?'). This can always be done through simple local code restructuring. For example, echo "Usage: $0 [OPTION] FILE..." becomes program_name=$0 echo "Usage: $program_name [OPTION] FILE..." Similarly, echo "Remaining files: `ls | wc -l`" becomes filecount="`ls | wc -l`" echo "Remaining files: $filecount" 5. For each translatable string, change the output command `echo' or `$echo' to `gettext' (if the string contains no references to shell variables) or to `eval_gettext' (if it refers to shell variables), followed by a no-argument `echo' command (to account for the terminating newline). Similarly, for cases with plural handling, replace a conditional `echo' command with an invocation of `ngettext' or `eval_ngettext', followed by a no-argument `echo' command. When doing this, you also need to add an extra backslash before the dollar sign in references to shell variables, so that the `eval_gettext' function receives the translatable string before the variable values are substituted into it. For example, echo "Remaining files: $filecount" becomes eval_gettext "Remaining files: \$filecount"; echo If the output command is not `echo', you can make it use `echo' nevertheless, through the use of backquotes. However, note that inside backquotes, backslashes must be doubled to be effective (because the backquoting eats one level of backslashes). For example, assuming that `error' is a shell function that signals an error, error "file not found: $filename" is first transformed into error "`echo \"file not found: \$filename\"`" which then becomes error "`eval_gettext \"file not found: \\\$filename\"`"  File: gettext.info, Node: gettext.sh, Next: gettext Invocation, Prev: Preparing Shell Scripts, Up: sh 15.5.2.2 Contents of `gettext.sh' ................................. `gettext.sh', contained in the run-time package of GNU gettext, provides the following: * $echo The variable `echo' is set to a command that outputs its first argument and a newline, without interpreting backslashes in the argument string. * eval_gettext See *note eval_gettext Invocation::. * eval_ngettext See *note eval_ngettext Invocation::.  File: gettext.info, Node: gettext Invocation, Next: ngettext Invocation, Prev: gettext.sh, Up: sh 15.5.2.3 Invoking the `gettext' program ....................................... gettext [OPTION] [[TEXTDOMAIN] MSGID] gettext [OPTION] -s [MSGID]... The `gettext' program displays the native language translation of a textual message. *Arguments* `-d TEXTDOMAIN' `--domain=TEXTDOMAIN' Retrieve translated messages from TEXTDOMAIN. Usually a TEXTDOMAIN corresponds to a package, a program, or a module of a program. `-e' Enable expansion of some escape sequences. This option is for compatibility with the `echo' program or shell built-in. The escape sequences `\a', `\b', `\c', `\f', `\n', `\r', `\t', `\v', `\\', and `\' followed by one to three octal digits, are interpreted like the System V `echo' program did. `-E' This option is only for compatibility with the `echo' program or shell built-in. It has no effect. `-h' `--help' Display this help and exit. `-n' Suppress trailing newline. By default, `gettext' adds a newline to the output. `-V' `--version' Output version information and exit. `[TEXTDOMAIN] MSGID' Retrieve translated message corresponding to MSGID from TEXTDOMAIN. If the TEXTDOMAIN parameter is not given, the domain is determined from the environment variable `TEXTDOMAIN'. If the message catalog is not found in the regular directory, another location can be specified with the environment variable `TEXTDOMAINDIR'. When used with the `-s' option the program behaves like the `echo' command. But it does not simply copy its arguments to stdout. Instead those messages found in the selected catalog are translated. Note: `xgettext' supports only the one-argument form of the `gettext' invocation, where no options are present and the TEXTDOMAIN is implicit, from the environment.  File: gettext.info, Node: ngettext Invocation, Next: envsubst Invocation, Prev: gettext Invocation, Up: sh 15.5.2.4 Invoking the `ngettext' program ........................................ ngettext [OPTION] [TEXTDOMAIN] MSGID MSGID-PLURAL COUNT The `ngettext' program displays the native language translation of a textual message whose grammatical form depends on a number. *Arguments* `-d TEXTDOMAIN' `--domain=TEXTDOMAIN' Retrieve translated messages from TEXTDOMAIN. Usually a TEXTDOMAIN corresponds to a package, a program, or a module of a program. `-e' Enable expansion of some escape sequences. This option is for compatibility with the `gettext' program. The escape sequences `\a', `\b', `\c', `\f', `\n', `\r', `\t', `\v', `\\', and `\' followed by one to three octal digits, are interpreted like the System V `echo' program did. `-E' This option is only for compatibility with the `gettext' program. It has no effect. `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit. `TEXTDOMAIN' Retrieve translated message from TEXTDOMAIN. `MSGID MSGID-PLURAL' Translate MSGID (English singular) / MSGID-PLURAL (English plural). `COUNT' Choose singular/plural form based on this value. If the TEXTDOMAIN parameter is not given, the domain is determined from the environment variable `TEXTDOMAIN'. If the message catalog is not found in the regular directory, another location can be specified with the environment variable `TEXTDOMAINDIR'. Note: `xgettext' supports only the three-arguments form of the `ngettext' invocation, where no options are present and the TEXTDOMAIN is implicit, from the environment.  File: gettext.info, Node: envsubst Invocation, Next: eval_gettext Invocation, Prev: ngettext Invocation, Up: sh 15.5.2.5 Invoking the `envsubst' program ........................................ envsubst [OPTION] [SHELL-FORMAT] The `envsubst' program substitutes the values of environment variables. *Operation mode* `-v' `--variables' Output the variables occurring in SHELL-FORMAT. *Informative output* `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit. In normal operation mode, standard input is copied to standard output, with references to environment variables of the form `$VARIABLE' or `${VARIABLE}' being replaced with the corresponding values. If a SHELL-FORMAT is given, only those environment variables that are referenced in SHELL-FORMAT are substituted; otherwise all environment variables references occurring in standard input are substituted. These substitutions are a subset of the substitutions that a shell performs on unquoted and double-quoted strings. Other kinds of substitutions done by a shell, such as `${VARIABLE-DEFAULT}' or `$(COMMAND-LIST)' or ``COMMAND-LIST`', are not performed by the `envsubst' program, due to security reasons. When `--variables' is used, standard input is ignored, and the output consists of the environment variables that are referenced in SHELL-FORMAT, one per line.  File: gettext.info, Node: eval_gettext Invocation, Next: eval_ngettext Invocation, Prev: envsubst Invocation, Up: sh 15.5.2.6 Invoking the `eval_gettext' function ............................................. eval_gettext MSGID This function outputs the native language translation of a textual message, performing dollar-substitution on the result. Note that only shell variables mentioned in MSGID will be dollar-substituted in the result.  File: gettext.info, Node: eval_ngettext Invocation, Prev: eval_gettext Invocation, Up: sh 15.5.2.7 Invoking the `eval_ngettext' function .............................................. eval_ngettext MSGID MSGID-PLURAL COUNT This function outputs the native language translation of a textual message whose grammatical form depends on a number, performing dollar-substitution on the result. Note that only shell variables mentioned in MSGID or MSGID-PLURAL will be dollar-substituted in the result.  File: gettext.info, Node: bash, Next: Python, Prev: sh, Up: List of Programming Languages 15.5.3 bash - Bourne-Again Shell Script --------------------------------------- GNU `bash' 2.0 or newer has a special shorthand for translating a string and substituting variable values in it: `$"msgid"'. But the use of this construct is *discouraged*, due to the security holes it opens and due to its portability problems. The security holes of `$"..."' come from the fact that after looking up the translation of the string, `bash' processes it like it processes any double-quoted string: dollar and backquote processing, like `eval' does. 1. In a locale whose encoding is one of BIG5, BIG5-HKSCS, GBK, GB18030, SHIFT_JIS, JOHAB, some double-byte characters have a second byte whose value is `0x60'. For example, the byte sequence `\xe0\x60' is a single character in these locales. Many versions of `bash' (all versions up to bash-2.05, and newer versions on platforms without `mbsrtowcs()' function) don't know about character boundaries and see a backquote character where there is only a particular Chinese character. Thus it can start executing part of the translation as a command list. This situation can occur even without the translator being aware of it: if the translator provides translations in the UTF-8 encoding, it is the `gettext()' function which will, during its conversion from the translator's encoding to the user's locale's encoding, produce the dangerous `\x60' bytes. 2. A translator could - voluntarily or inadvertently - use backquotes `"`...`"' or dollar-parentheses `"$(...)"' in her translations. The enclosed strings would be executed as command lists by the shell. The portability problem is that `bash' must be built with internationalization support; this is normally not the case on systems that don't have the `gettext()' function in libc.  File: gettext.info, Node: Python, Next: Common Lisp, Prev: bash, Up: List of Programming Languages 15.5.4 Python ------------- RPMs python File extension `py' String syntax `'abc'', `u'abc'', `r'abc'', `ur'abc'', `"abc"', `u"abc"', `r"abc"', `ur"abc"', `'''abc'''', `u'''abc'''', `r'''abc'''', `ur'''abc'''', `"""abc"""', `u"""abc"""', `r"""abc"""', `ur"""abc"""' gettext shorthand `_('abc')' etc. gettext/ngettext functions `gettext.gettext', `gettext.dgettext', `gettext.ngettext', `gettext.dngettext', also `ugettext', `ungettext' textdomain `gettext.textdomain' function, or `gettext.install(DOMAIN)' function bindtextdomain `gettext.bindtextdomain' function, or `gettext.install(DOMAIN,LOCALEDIR)' function setlocale not used by the gettext emulation Prerequisite `import gettext' Use or emulate GNU gettext emulate Extractor `xgettext' Formatting with positions `'...%(ident)d...' % { 'ident': value }' Portability fully portable po-mode marking -- An example is available in the `examples' directory: `hello-python'. A note about format strings: Python supports format strings with unnamed arguments, such as `'...%d...'', and format strings with named arguments, such as `'...%(ident)d...''. The latter are preferable for internationalized programs, for two reasons: * When a format string takes more than one argument, the translator can provide a translation that uses the arguments in a different order, if the format string uses named arguments. For example, the translator can reformulate "'%(volume)s' has only %(freespace)d bytes free." to "Only %(freespace)d bytes free on '%(volume)s'." Additionally, the identifiers also provide some context to the translator. * In the context of plural forms, the format string used for the singular form does not use the numeric argument in many languages. Even in English, one prefers to write `"one hour"' instead of `"1 hour"'. Omitting individual arguments from format strings like this is only possible with the named argument syntax. (With unnamed arguments, Python - unlike C - verifies that the format string uses all supplied arguments.)  File: gettext.info, Node: Common Lisp, Next: clisp C, Prev: Python, Up: List of Programming Languages 15.5.5 GNU clisp - Common Lisp ------------------------------ RPMs clisp 2.28 or newer File extension `lisp' String syntax `"abc"' gettext shorthand `(_ "abc")', `(ENGLISH "abc")' gettext/ngettext functions `i18n:gettext', `i18n:ngettext' textdomain `i18n:textdomain' bindtextdomain `i18n:textdomaindir' setlocale automatic Prerequisite -- Use or emulate GNU gettext use Extractor `xgettext -k_ -kENGLISH' Formatting with positions `format "~1@*~D ~0@*~D"' Portability On platforms without gettext, no translation. po-mode marking -- An example is available in the `examples' directory: `hello-clisp'.  File: gettext.info, Node: clisp C, Next: Emacs Lisp, Prev: Common Lisp, Up: List of Programming Languages 15.5.6 GNU clisp C sources -------------------------- RPMs clisp File extension `d' String syntax `"abc"' gettext shorthand `ENGLISH ? "abc" : ""' `GETTEXT("abc")' `GETTEXTL("abc")' gettext/ngettext functions `clgettext', `clgettextl' textdomain -- bindtextdomain -- setlocale automatic Prerequisite `#include "lispbibl.c"' Use or emulate GNU gettext use Extractor `clisp-xgettext' Formatting with positions `fprintf "%2$d %1$d"' Portability On platforms without gettext, no translation. po-mode marking --  File: gettext.info, Node: Emacs Lisp, Next: librep, Prev: clisp C, Up: List of Programming Languages 15.5.7 Emacs Lisp ----------------- RPMs emacs, xemacs File extension `el' String syntax `"abc"' gettext shorthand `(_"abc")' gettext/ngettext functions `gettext', `dgettext' (xemacs only) textdomain `domain' special form (xemacs only) bindtextdomain `bind-text-domain' function (xemacs only) setlocale automatic Prerequisite -- Use or emulate GNU gettext use Extractor `xgettext' Formatting with positions `format "%2$d %1$d"' Portability Only XEmacs. Without `I18N3' defined at build time, no translation. po-mode marking --  File: gettext.info, Node: librep, Next: Scheme, Prev: Emacs Lisp, Up: List of Programming Languages 15.5.8 librep ------------- RPMs librep 0.15.3 or newer File extension `jl' String syntax `"abc"' gettext shorthand `(_"abc")' gettext/ngettext functions `gettext' textdomain `textdomain' function bindtextdomain `bindtextdomain' function setlocale -- Prerequisite `(require 'rep.i18n.gettext)' Use or emulate GNU gettext use Extractor `xgettext' Formatting with positions `format "%2$d %1$d"' Portability On platforms without gettext, no translation. po-mode marking -- An example is available in the `examples' directory: `hello-librep'.  File: gettext.info, Node: Scheme, Next: Smalltalk, Prev: librep, Up: List of Programming Languages 15.5.9 GNU guile - Scheme ------------------------- RPMs guile File extension `scm' String syntax `"abc"' gettext shorthand `(_ "abc")' gettext/ngettext functions `gettext', `ngettext' textdomain `textdomain' bindtextdomain `bindtextdomain' setlocale `(catch #t (lambda () (setlocale LC_ALL "")) (lambda args #f))' Prerequisite `(use-modules (ice-9 format))' Use or emulate GNU gettext use Extractor `xgettext -k_' Formatting with positions -- Portability On platforms without gettext, no translation. po-mode marking -- An example is available in the `examples' directory: `hello-guile'.  File: gettext.info, Node: Smalltalk, Next: Java, Prev: Scheme, Up: List of Programming Languages 15.5.10 GNU Smalltalk --------------------- RPMs smalltalk File extension `st' String syntax `'abc'' gettext shorthand `NLS ? 'abc'' gettext/ngettext functions `LcMessagesDomain>>#at:', `LcMessagesDomain>>#at:plural:with:' textdomain `LcMessages>>#domain:localeDirectory:' (returns a `LcMessagesDomain' object). Example: `I18N Locale default messages domain: 'gettext' localeDirectory: /usr/local/share/locale'' bindtextdomain `LcMessages>>#domain:localeDirectory:', see above. setlocale Automatic if you use `I18N Locale default'. Prerequisite `PackageLoader fileInPackage: 'I18N'!' Use or emulate GNU gettext emulate Extractor `xgettext' Formatting with positions `'%1 %2' bindWith: 'Hello' with: 'world'' Portability fully portable po-mode marking -- An example is available in the `examples' directory: `hello-smalltalk'.  File: gettext.info, Node: Java, Next: C#, Prev: Smalltalk, Up: List of Programming Languages 15.5.11 Java ------------ RPMs java, java2 File extension `java' String syntax "abc" gettext shorthand _("abc") gettext/ngettext functions `GettextResource.gettext', `GettextResource.ngettext', `GettextResource.pgettext', `GettextResource.npgettext' textdomain --, use `ResourceBundle.getResource' instead bindtextdomain --, use CLASSPATH instead setlocale automatic Prerequisite -- Use or emulate GNU gettext --, uses a Java specific message catalog format Extractor `xgettext -k_' Formatting with positions `MessageFormat.format "{1,number} {0,number}"' Portability fully portable po-mode marking -- Before marking strings as internationalizable, uses of the string concatenation operator need to be converted to `MessageFormat' applications. For example, `"file "+filename+" not found"' becomes `MessageFormat.format("file {0} not found", new Object[] { filename })'. Only after this is done, can the strings be marked and extracted. GNU gettext uses the native Java internationalization mechanism, namely `ResourceBundle's. There are two formats of `ResourceBundle's: `.properties' files and `.class' files. The `.properties' format is a text file which the translators can directly edit, like PO files, but which doesn't support plural forms. Whereas the `.class' format is compiled from `.java' source code and can support plural forms (provided it is accessed through an appropriate API, see below). To convert a PO file to a `.properties' file, the `msgcat' program can be used with the option `--properties-output'. To convert a `.properties' file back to a PO file, the `msgcat' program can be used with the option `--properties-input'. All the tools that manipulate PO files can work with `.properties' files as well, if given the `--properties-input' and/or `--properties-output' option. To convert a PO file to a ResourceBundle class, the `msgfmt' program can be used with the option `--java' or `--java2'. To convert a ResourceBundle back to a PO file, the `msgunfmt' program can be used with the option `--java'. Two different programmatic APIs can be used to access ResourceBundles. Note that both APIs work with all kinds of ResourceBundles, whether GNU gettext generated classes, or other `.class' or `.properties' files. 1. The `java.util.ResourceBundle' API. In particular, its `getString' function returns a string translation. Note that a missing translation yields a `MissingResourceException'. This has the advantage of being the standard API. And it does not require any additional libraries, only the `msgcat' generated `.properties' files or the `msgfmt' generated `.class' files. But it cannot do plural handling, even if the resource was generated by `msgfmt' from a PO file with plural handling. 2. The `gnu.gettext.GettextResource' API. Reference documentation in Javadoc 1.1 style format is in the javadoc2 directory (javadoc2/index.html). Its `gettext' function returns a string translation. Note that when a translation is missing, the MSGID argument is returned unchanged. This has the advantage of having the `ngettext' function for plural handling and the `pgettext' and `npgettext' for strings constraint to a particular context. To use this API, one needs the `libintl.jar' file which is part of the GNU gettext package and distributed under the LGPL. Four examples, using the second API, are available in the `examples' directory: `hello-java', `hello-java-awt', `hello-java-swing', `hello-java-qtjambi'. Now, to make use of the API and define a shorthand for `getString', there are three idioms that you can choose from: * (This one assumes Java 1.5 or newer.) In a unique class of your project, say `Util', define a static variable holding the `ResourceBundle' instance and the shorthand: private static ResourceBundle myResources = ResourceBundle.getBundle("domain-name"); public static String _(String s) { return myResources.getString(s); } All classes containing internationalized strings then contain import static Util._; and the shorthand is used like this: System.out.println(_("Operation completed.")); * In a unique class of your project, say `Util', define a static variable holding the `ResourceBundle' instance: public static ResourceBundle myResources = ResourceBundle.getBundle("domain-name"); All classes containing internationalized strings then contain private static ResourceBundle res = Util.myResources; private static String _(String s) { return res.getString(s); } and the shorthand is used like this: System.out.println(_("Operation completed.")); * You add a class with a very short name, say `S', containing just the definition of the resource bundle and of the shorthand: public class S { public static ResourceBundle myResources = ResourceBundle.getBundle("domain-name"); public static String _(String s) { return myResources.getString(s); } } and the shorthand is used like this: System.out.println(S._("Operation completed.")); Which of the three idioms you choose, will depend on whether your project requires portability to Java versions prior to Java 1.5 and, if so, whether copying two lines of codes into every class is more acceptable in your project than a class with a single-letter name.  File: gettext.info, Node: C#, Next: gawk, Prev: Java, Up: List of Programming Languages 15.5.12 C# ---------- RPMs pnet, pnetlib 0.6.2 or newer, or mono 0.29 or newer File extension `cs' String syntax `"abc"', `@"abc"' gettext shorthand _("abc") gettext/ngettext functions `GettextResourceManager.GetString', `GettextResourceManager.GetPluralString' `GettextResourceManager.GetParticularString' `GettextResourceManager.GetParticularPluralString' textdomain `new GettextResourceManager(domain)' bindtextdomain --, compiled message catalogs are located in subdirectories of the directory containing the executable setlocale automatic Prerequisite -- Use or emulate GNU gettext --, uses a C# specific message catalog format Extractor `xgettext -k_' Formatting with positions `String.Format "{1} {0}"' Portability fully portable po-mode marking -- Before marking strings as internationalizable, uses of the string concatenation operator need to be converted to `String.Format' invocations. For example, `"file "+filename+" not found"' becomes `String.Format("file {0} not found", filename)'. Only after this is done, can the strings be marked and extracted. GNU gettext uses the native C#/.NET internationalization mechanism, namely the classes `ResourceManager' and `ResourceSet'. Applications use the `ResourceManager' methods to retrieve the native language translation of strings. An instance of `ResourceSet' is the in-memory representation of a message catalog file. The `ResourceManager' loads and accesses `ResourceSet' instances as needed to look up the translations. There are two formats of `ResourceSet's that can be directly loaded by the C# runtime: `.resources' files and `.dll' files. * The `.resources' format is a binary file usually generated through the `resgen' or `monoresgen' utility, but which doesn't support plural forms. `.resources' files can also be embedded in .NET `.exe' files. This only affects whether a file system access is performed to load the message catalog; it doesn't affect the contents of the message catalog. * On the other hand, the `.dll' format is a binary file that is compiled from `.cs' source code and can support plural forms (provided it is accessed through the GNU gettext API, see below). Note that these .NET `.dll' and `.exe' files are not tied to a particular platform; their file format and GNU gettext for C# can be used on any platform. To convert a PO file to a `.resources' file, the `msgfmt' program can be used with the option `--csharp-resources'. To convert a `.resources' file back to a PO file, the `msgunfmt' program can be used with the option `--csharp-resources'. You can also, in some cases, use the `resgen' program (from the `pnet' package) or the `monoresgen' program (from the `mono'/`mcs' package). These programs can also convert a `.resources' file back to a PO file. But beware: as of this writing (January 2004), the `monoresgen' converter is quite buggy and the `resgen' converter ignores the encoding of the PO files. To convert a PO file to a `.dll' file, the `msgfmt' program can be used with the option `--csharp'. The result will be a `.dll' file containing a subclass of `GettextResourceSet', which itself is a subclass of `ResourceSet'. To convert a `.dll' file containing a `GettextResourceSet' subclass back to a PO file, the `msgunfmt' program can be used with the option `--csharp'. The advantages of the `.dll' format over the `.resources' format are: 1. Freedom to localize: Users can add their own translations to an application after it has been built and distributed. Whereas when the programmer uses a `ResourceManager' constructor provided by the system, the set of `.resources' files for an application must be specified when the application is built and cannot be extended afterwards. 2. Plural handling: A message catalog in `.dll' format supports the plural handling function `GetPluralString'. Whereas `.resources' files can only contain data and only support lookups that depend on a single string. 3. Context handling: A message catalog in `.dll' format supports the query-with-context functions `GetParticularString' and `GetParticularPluralString'. Whereas `.resources' files can only contain data and only support lookups that depend on a single string. 4. The `GettextResourceManager' that loads the message catalogs in `.dll' format also provides for inheritance on a per-message basis. For example, in Austrian (`de_AT') locale, translations from the German (`de') message catalog will be used for messages not found in the Austrian message catalog. This has the consequence that the Austrian translators need only translate those few messages for which the translation into Austrian differs from the German one. Whereas when working with `.resources' files, each message catalog must provide the translations of all messages by itself. 5. The `GettextResourceManager' that loads the message catalogs in `.dll' format also provides for a fallback: The English MSGID is returned when no translation can be found. Whereas when working with `.resources' files, a language-neutral `.resources' file must explicitly be provided as a fallback. On the side of the programmatic APIs, the programmer can use either the standard `ResourceManager' API and the GNU `GettextResourceManager' API. The latter is an extension of the former, because `GettextResourceManager' is a subclass of `ResourceManager'. 1. The `System.Resources.ResourceManager' API. This API works with resources in `.resources' format. The creation of the `ResourceManager' is done through new ResourceManager(domainname, Assembly.GetExecutingAssembly()) The `GetString' function returns a string's translation. Note that this function returns null when a translation is missing (i.e. not even found in the fallback resource file). 2. The `GNU.Gettext.GettextResourceManager' API. This API works with resources in `.dll' format. Reference documentation is in the csharpdoc directory (csharpdoc/index.html). The creation of the `ResourceManager' is done through new GettextResourceManager(domainname) The `GetString' function returns a string's translation. Note that when a translation is missing, the MSGID argument is returned unchanged. The `GetPluralString' function returns a string translation with plural handling, like the `ngettext' function in C. The `GetParticularString' function returns a string's translation, specific to a particular context, like the `pgettext' function in C. Note that when a translation is missing, the MSGID argument is returned unchanged. The `GetParticularPluralString' function returns a string translation, specific to a particular context, with plural handling, like the `npgettext' function in C. To use this API, one needs the `GNU.Gettext.dll' file which is part of the GNU gettext package and distributed under the LGPL. You can also mix both approaches: use the `GNU.Gettext.GettextResourceManager' constructor, but otherwise use only the `ResourceManager' type and only the `GetString' method. This is appropriate when you want to profit from the tools for PO files, but don't want to change an existing source code that uses `ResourceManager' and don't (yet) need the `GetPluralString' method. Two examples, using the second API, are available in the `examples' directory: `hello-csharp', `hello-csharp-forms'. Now, to make use of the API and define a shorthand for `GetString', there are two idioms that you can choose from: * In a unique class of your project, say `Util', define a static variable holding the `ResourceManager' instance: public static GettextResourceManager MyResourceManager = new GettextResourceManager("domain-name"); All classes containing internationalized strings then contain private static GettextResourceManager Res = Util.MyResourceManager; private static String _(String s) { return Res.GetString(s); } and the shorthand is used like this: Console.WriteLine(_("Operation completed.")); * You add a class with a very short name, say `S', containing just the definition of the resource manager and of the shorthand: public class S { public static GettextResourceManager MyResourceManager = new GettextResourceManager("domain-name"); public static String _(String s) { return MyResourceManager.GetString(s); } } and the shorthand is used like this: Console.WriteLine(S._("Operation completed.")); Which of the two idioms you choose, will depend on whether copying two lines of codes into every class is more acceptable in your project than a class with a single-letter name.  File: gettext.info, Node: gawk, Next: Pascal, Prev: C#, Up: List of Programming Languages 15.5.13 GNU awk --------------- RPMs gawk 3.1 or newer File extension `awk' String syntax `"abc"' gettext shorthand `_"abc"' gettext/ngettext functions `dcgettext', missing `dcngettext' in gawk-3.1.0 textdomain `TEXTDOMAIN' variable bindtextdomain `bindtextdomain' function setlocale automatic, but missing `setlocale (LC_MESSAGES, "")' in gawk-3.1.0 Prerequisite -- Use or emulate GNU gettext use Extractor `xgettext' Formatting with positions `printf "%2$d %1$d"' (GNU awk only) Portability On platforms without gettext, no translation. On non-GNU awks, you must define `dcgettext', `dcngettext' and `bindtextdomain' yourself. po-mode marking -- An example is available in the `examples' directory: `hello-gawk'.  File: gettext.info, Node: Pascal, Next: wxWidgets, Prev: gawk, Up: List of Programming Languages 15.5.14 Pascal - Free Pascal Compiler ------------------------------------- RPMs fpk File extension `pp', `pas' String syntax `'abc'' gettext shorthand automatic gettext/ngettext functions --, use `ResourceString' data type instead textdomain --, use `TranslateResourceStrings' function instead bindtextdomain --, use `TranslateResourceStrings' function instead setlocale automatic, but uses only LANG, not LC_MESSAGES or LC_ALL Prerequisite `{$mode delphi}' or `{$mode objfpc}' `uses gettext;' Use or emulate GNU gettext emulate partially Extractor `ppc386' followed by `xgettext' or `rstconv' Formatting with positions `uses sysutils;' `format "%1:d %0:d"' Portability ? po-mode marking -- The Pascal compiler has special support for the `ResourceString' data type. It generates a `.rst' file. This is then converted to a `.pot' file by use of `xgettext' or `rstconv'. At runtime, a `.mo' file corresponding to translations of this `.pot' file can be loaded using the `TranslateResourceStrings' function in the `gettext' unit. An example is available in the `examples' directory: `hello-pascal'.  File: gettext.info, Node: wxWidgets, Next: YCP, Prev: Pascal, Up: List of Programming Languages 15.5.15 wxWidgets library ------------------------- RPMs wxGTK, gettext File extension `cpp' String syntax `"abc"' gettext shorthand `_("abc")' gettext/ngettext functions `wxLocale::GetString', `wxGetTranslation' textdomain `wxLocale::AddCatalog' bindtextdomain `wxLocale::AddCatalogLookupPathPrefix' setlocale `wxLocale::Init', `wxSetLocale' Prerequisite `#include <wx/intl.h>' Use or emulate GNU gettext emulate, see `include/wx/intl.h' and `src/common/intl.cpp' Extractor `xgettext' Formatting with positions wxString::Format supports positions if and only if the system has `wprintf()', `vswprintf()' functions and they support positions according to POSIX. Portability fully portable po-mode marking yes  File: gettext.info, Node: YCP, Next: Tcl, Prev: wxWidgets, Up: List of Programming Languages 15.5.16 YCP - YaST2 scripting language -------------------------------------- RPMs libycp, libycp-devel, yast2-core, yast2-core-devel File extension `ycp' String syntax `"abc"' gettext shorthand `_("abc")' gettext/ngettext functions `_()' with 1 or 3 arguments textdomain `textdomain' statement bindtextdomain -- setlocale -- Prerequisite -- Use or emulate GNU gettext use Extractor `xgettext' Formatting with positions `sformat "%2 %1"' Portability fully portable po-mode marking -- An example is available in the `examples' directory: `hello-ycp'.  File: gettext.info, Node: Tcl, Next: Perl, Prev: YCP, Up: List of Programming Languages 15.5.17 Tcl - Tk's scripting language ------------------------------------- RPMs tcl File extension `tcl' String syntax `"abc"' gettext shorthand `[_ "abc"]' gettext/ngettext functions `::msgcat::mc' textdomain -- bindtextdomain --, use `::msgcat::mcload' instead setlocale automatic, uses LANG, but ignores LC_MESSAGES and LC_ALL Prerequisite `package require msgcat' `proc _ {s} {return [::msgcat::mc $s]}' Use or emulate GNU gettext --, uses a Tcl specific message catalog format Extractor `xgettext -k_' Formatting with positions `format "%2\$d %1\$d"' Portability fully portable po-mode marking -- Two examples are available in the `examples' directory: `hello-tcl', `hello-tcl-tk'. Before marking strings as internationalizable, substitutions of variables into the string need to be converted to `format' applications. For example, `"file $filename not found"' becomes `[format "file %s not found" $filename]'. Only after this is done, can the strings be marked and extracted. After marking, this example becomes `[format [_ "file %s not found"] $filename]' or `[msgcat::mc "file %s not found" $filename]'. Note that the `msgcat::mc' function implicitly calls `format' when more than one argument is given.  File: gettext.info, Node: Perl, Next: PHP, Prev: Tcl, Up: List of Programming Languages 15.5.18 Perl ------------ RPMs perl File extension `pl', `PL', `pm', `cgi' String syntax * `"abc"' * `'abc'' * `qq (abc)' * `q (abc)' * `qr /abc/' * `qx (/bin/date)' * `/pattern match/' * `?pattern match?' * `s/substitution/operators/' * `$tied_hash{"message"}' * `$tied_hash_reference->{"message"}' * etc., issue the command `man perlsyn' for details gettext shorthand `__' (double underscore) gettext/ngettext functions `gettext', `dgettext', `dcgettext', `ngettext', `dngettext', `dcngettext' textdomain `textdomain' function bindtextdomain `bindtextdomain' function bind_textdomain_codeset `bind_textdomain_codeset' function setlocale Use `setlocale (LC_ALL, "");' Prerequisite `use POSIX;' `use Locale::TextDomain;' (included in the package libintl-perl which is available on the Comprehensive Perl Archive Network CPAN, http://www.cpan.org/). Use or emulate GNU gettext platform dependent: gettext_pp emulates, gettext_xs uses GNU gettext Extractor `xgettext -k__ -k\$__ -k%__ -k__x -k__n:1,2 -k__nx:1,2 -k__xn:1,2 -kN__ -k' Formatting with positions Both kinds of format strings support formatting with positions. `printf "%2\$d %1\$d", ...' (requires Perl 5.8.0 or newer) `__expand("[new] replaces [old]", old => $oldvalue, new => $newvalue)' Portability The `libintl-perl' package is platform independent but is not part of the Perl core. The programmer is responsible for providing a dummy implementation of the required functions if the package is not installed on the target system. po-mode marking -- Documentation Included in `libintl-perl', available on CPAN (http://www.cpan.org/). An example is available in the `examples' directory: `hello-perl'. The `xgettext' parser backend for Perl differs significantly from the parser backends for other programming languages, just as Perl itself differs significantly from other programming languages. The Perl parser backend offers many more string marking facilities than the other backends but it also has some Perl specific limitations, the worst probably being its imperfectness. * Menu: * General Problems:: General Problems Parsing Perl Code * Default Keywords:: Which Keywords Will xgettext Look For? * Special Keywords:: How to Extract Hash Keys * Quote-like Expressions:: What are Strings And Quote-like Expressions? * Interpolation I:: Invalid String Interpolation * Interpolation II:: Valid String Interpolation * Parentheses:: When To Use Parentheses * Long Lines:: How To Grok with Long Lines * Perl Pitfalls:: Bugs, Pitfalls, and Things That Do Not Work  File: gettext.info, Node: General Problems, Next: Default Keywords, Up: Perl 15.5.18.1 General Problems Parsing Perl Code ............................................ It is often heard that only Perl can parse Perl. This is not true. Perl cannot be _parsed_ at all, it can only be _executed_. Perl has various built-in ambiguities that can only be resolved at runtime. The following example may illustrate one common problem: print gettext "Hello World!"; Although this example looks like a bullet-proof case of a function invocation, it is not: open gettext, ">testfile" or die; print gettext "Hello world!" In this context, the string `gettext' looks more like a file handle. But not necessarily: use Locale::Messages qw (:libintl_h); open gettext ">testfile" or die; print gettext "Hello world!"; Now, the file is probably syntactically incorrect, provided that the module `Locale::Messages' found first in the Perl include path exports a function `gettext'. But what if the module `Locale::Messages' really looks like this? use vars qw (*gettext); 1; In this case, the string `gettext' will be interpreted as a file handle again, and the above example will create a file `testfile' and write the string "Hello world!" into it. Even advanced control flow analysis will not really help: if (0.5 < rand) { eval "use Sane"; } else { eval "use InSane"; } print gettext "Hello world!"; If the module `Sane' exports a function `gettext' that does what we expect, and the module `InSane' opens a file for writing and associates the _handle_ `gettext' with this output stream, we are clueless again about what will happen at runtime. It is completely unpredictable. The truth is that Perl has so many ways to fill its symbol table at runtime that it is impossible to interpret a particular piece of code without executing it. Of course, `xgettext' will not execute your Perl sources while scanning for translatable strings, but rather use heuristics in order to guess what you meant. Another problem is the ambiguity of the slash and the question mark. Their interpretation depends on the context: # A pattern match. print "OK\n" if /foobar/; # A division. print 1 / 2; # Another pattern match. print "OK\n" if ?foobar?; # Conditional. print $x ? "foo" : "bar"; The slash may either act as the division operator or introduce a pattern match, whereas the question mark may act as the ternary conditional operator or as a pattern match, too. Other programming languages like `awk' present similar problems, but the consequences of a misinterpretation are particularly nasty with Perl sources. In `awk' for instance, a statement can never exceed one line and the parser can recover from a parsing error at the next newline and interpret the rest of the input stream correctly. Perl is different, as a pattern match is terminated by the next appearance of the delimiter (the slash or the question mark) in the input stream, regardless of the semantic context. If a slash is really a division sign but mis-interpreted as a pattern match, the rest of the input file is most probably parsed incorrectly. There are certain cases, where the ambiguity cannot be resolved at all: $x = wantarray ? 1 : 0; The Perl built-in function `wantarray' does not accept any arguments. The Perl parser therefore knows that the question mark does not start a regular expression but is the ternary conditional operator. sub wantarrays {} $x = wantarrays ? 1 : 0; Now the situation is different. The function `wantarrays' takes a variable number of arguments (like any non-prototyped Perl function). The question mark is now the delimiter of a pattern match, and hence the piece of code does not compile. sub wantarrays() {} $x = wantarrays ? 1 : 0; Now the function is prototyped, Perl knows that it does not accept any arguments, and the question mark is therefore interpreted as the ternaray operator again. But that unfortunately outsmarts `xgettext'. The Perl parser in `xgettext' cannot know whether a function has a prototype and what that prototype would look like. It therefore makes an educated guess. If a function is known to be a Perl built-in and this function does not accept any arguments, a following question mark or slash is treated as an operator, otherwise as the delimiter of a following regular expression. The Perl built-ins that do not accept arguments are `wantarray', `fork', `time', `times', `getlogin', `getppid', `getpwent', `getgrent', `gethostent', `getnetent', `getprotoent', `getservent', `setpwent', `setgrent', `endpwent', `endgrent', `endhostent', `endnetent', `endprotoent', and `endservent'. If you find that `xgettext' fails to extract strings from portions of your sources, you should therefore look out for slashes and/or question marks preceding these sections. You may have come across a bug in `xgettext''s Perl parser (and of course you should report that bug). In the meantime you should consider to reformulate your code in a manner less challenging to `xgettext'. In particular, if the parser is too dumb to see that a function does not accept arguments, use parentheses: $x = somefunc() ? 1 : 0; $y = (somefunc) ? 1 : 0; In fact the Perl parser itself has similar problems and warns you about such constructs.  File: gettext.info, Node: Default Keywords, Next: Special Keywords, Prev: General Problems, Up: Perl 15.5.18.2 Which keywords will xgettext look for? ................................................ Unless you instruct `xgettext' otherwise by invoking it with one of the options `--keyword' or `-k', it will recognize the following keywords in your Perl sources: * `gettext' * `dgettext' * `dcgettext' * `ngettext:1,2' The first (singular) and the second (plural) argument will be extracted. * `dngettext:1,2' The first (singular) and the second (plural) argument will be extracted. * `dcngettext:1,2' The first (singular) and the second (plural) argument will be extracted. * `gettext_noop' * `%gettext' The keys of lookups into the hash `%gettext' will be extracted. * `$gettext' The keys of lookups into the hash reference `$gettext' will be extracted.  File: gettext.info, Node: Special Keywords, Next: Quote-like Expressions, Prev: Default Keywords, Up: Perl 15.5.18.3 How to Extract Hash Keys .................................. Translating messages at runtime is normally performed by looking up the original string in the translation database and returning the translated version. The "natural" Perl implementation is a hash lookup, and, of course, `xgettext' supports such practice. print __"Hello world!"; print $__{"Hello world!"}; print $__->{"Hello world!"}; print $$__{"Hello world!"}; The above four lines all do the same thing. The Perl module `Locale::TextDomain' exports by default a hash `%__' that is tied to the function `__()'. It also exports a reference `$__' to `%__'. If an argument to the `xgettext' option `--keyword', resp. `-k' starts with a percent sign, the rest of the keyword is interpreted as the name of a hash. If it starts with a dollar sign, the rest of the keyword is interpreted as a reference to a hash. Note that you can omit the quotation marks (single or double) around the hash key (almost) whenever Perl itself allows it: print $gettext{Error}; The exact rule is: You can omit the surrounding quotes, when the hash key is a valid C (!) identifier, i.e. when it starts with an underscore or an ASCII letter and is followed by an arbitrary number of underscores, ASCII letters or digits. Other Unicode characters are _not_ allowed, regardless of the `use utf8' pragma.  File: gettext.info, Node: Quote-like Expressions, Next: Interpolation I, Prev: Special Keywords, Up: Perl 15.5.18.4 What are Strings And Quote-like Expressions? ...................................................... Perl offers a plethora of different string constructs. Those that can be used either as arguments to functions or inside braces for hash lookups are generally supported by `xgettext'. * *double-quoted strings* print gettext "Hello World!"; * *single-quoted strings* print gettext 'Hello World!'; * *the operator qq* print gettext qq |Hello World!|; print gettext qq <E-mail: <guido\@imperia.net>>; The operator `qq' is fully supported. You can use arbitrary delimiters, including the four bracketing delimiters (round, angle, square, curly) that nest. * *the operator q* print gettext q |Hello World!|; print gettext q <E-mail: <guido@imperia.net>>; The operator `q' is fully supported. You can use arbitrary delimiters, including the four bracketing delimiters (round, angle, square, curly) that nest. * *the operator qx* print gettext qx ;LANGUAGE=C /bin/date; print gettext qx [/usr/bin/ls | grep '^[A-Z]*']; The operator `qx' is fully supported. You can use arbitrary delimiters, including the four bracketing delimiters (round, angle, square, curly) that nest. The example is actually a useless use of `gettext'. It will invoke the `gettext' function on the output of the command specified with the `qx' operator. The feature was included in order to make the interface consistent (the parser will extract all strings and quote-like expressions). * *here documents* print gettext <<'EOF'; program not found in $PATH EOF print ngettext <<EOF, <<"EOF"; one file deleted EOF several files deleted EOF Here-documents are recognized. If the delimiter is enclosed in single quotes, the string is not interpolated. If it is enclosed in double quotes or has no quotes at all, the string is interpolated. Delimiters that start with a digit are not supported!  File: gettext.info, Node: Interpolation I, Next: Interpolation II, Prev: Quote-like Expressions, Up: Perl 15.5.18.5 Invalid Uses Of String Interpolation .............................................. Perl is capable of interpolating variables into strings. This offers some nice features in localized programs but can also lead to problems. A common error is a construct like the following: print gettext "This is the program $0!\n"; Perl will interpolate at runtime the value of the variable `$0' into the argument of the `gettext()' function. Hence, this argument is not a string constant but a variable argument (`$0' is a global variable that holds the name of the Perl script being executed). The interpolation is performed by Perl before the string argument is passed to `gettext()' and will therefore depend on the name of the script which can only be determined at runtime. Consequently, it is almost impossible that a translation can be looked up at runtime (except if, by accident, the interpolated string is found in the message catalog). The `xgettext' program will therefore terminate parsing with a fatal error if it encounters a variable inside of an extracted string. In general, this will happen for all kinds of string interpolations that cannot be safely performed at compile time. If you absolutely know what you are doing, you can always circumvent this behavior: my $know_what_i_am_doing = "This is program $0!\n"; print gettext $know_what_i_am_doing; Since the parser only recognizes strings and quote-like expressions, but not variables or other terms, the above construct will be accepted. You will have to find another way, however, to let your original string make it into your message catalog. If invoked with the option `--extract-all', resp. `-a', variable interpolation will be accepted. Rationale: You will generally use this option in order to prepare your sources for internationalization. Please see the manual page `man perlop' for details of strings and quote-like expressions that are subject to interpolation and those that are not. Safe interpolations (that will not lead to a fatal error) are: * the escape sequences `\t' (tab, HT, TAB), `\n' (newline, NL), `\r' (return, CR), `\f' (form feed, FF), `\b' (backspace, BS), `\a' (alarm, bell, BEL), and `\e' (escape, ESC). * octal chars, like `\033' Note that octal escapes in the range of 400-777 are translated into a UTF-8 representation, regardless of the presence of the `use utf8' pragma. * hex chars, like `\x1b' * wide hex chars, like `\x{263a}' Note that this escape is translated into a UTF-8 representation, regardless of the presence of the `use utf8' pragma. * control chars, like `\c[' (CTRL-[) * named Unicode chars, like `\N{LATIN CAPITAL LETTER C WITH CEDILLA}' Note that this escape is translated into a UTF-8 representation, regardless of the presence of the `use utf8' pragma. The following escapes are considered partially safe: * `\l' lowercase next char * `\u' uppercase next char * `\L' lowercase till \E * `\U' uppercase till \E * `\E' end case modification * `\Q' quote non-word characters till \E These escapes are only considered safe if the string consists of ASCII characters only. Translation of characters outside the range defined by ASCII is locale-dependent and can actually only be performed at runtime; `xgettext' doesn't do these locale-dependent translations at extraction time. Except for the modifier `\Q', these translations, albeit valid, are generally useless and only obfuscate your sources. If a translation can be safely performed at compile time you can just as well write what you mean.  File: gettext.info, Node: Interpolation II, Next: Parentheses, Prev: Interpolation I, Up: Perl 15.5.18.6 Valid Uses Of String Interpolation ............................................ Perl is often used to generate sources for other programming languages or arbitrary file formats. Web applications that output HTML code make a prominent example for such usage. You will often come across situations where you want to intersperse code written in the target (programming) language with translatable messages, like in the following HTML example: print gettext <<EOF; <h1>My Homepage</h1> <script language="JavaScript"><!-- for (i = 0; i < 100; ++i) { alert ("Thank you so much for visiting my homepage!"); } //--></script> EOF The parser will extract the entire here document, and it will appear entirely in the resulting PO file, including the JavaScript snippet embedded in the HTML code. If you exaggerate with constructs like the above, you will run the risk that the translators of your package will look out for a less challenging project. You should consider an alternative expression here: print <<EOF; <h1>$gettext{"My Homepage"}</h1> <script language="JavaScript"><!-- for (i = 0; i < 100; ++i) { alert ("$gettext{'Thank you so much for visiting my homepage!'}"); } //--></script> EOF Only the translatable portions of the code will be extracted here, and the resulting PO file will begrudgingly improve in terms of readability. You can interpolate hash lookups in all strings or quote-like expressions that are subject to interpolation (see the manual page `man perlop' for details). Double interpolation is invalid, however: # TRANSLATORS: Replace "the earth" with the name of your planet. print gettext qq{Welcome to $gettext->{"the earth"}}; The `qq'-quoted string is recognized as an argument to `xgettext' in the first place, and checked for invalid variable interpolation. The dollar sign of hash-dereferencing will therefore terminate the parser with an "invalid interpolation" error. It is valid to interpolate hash lookups in regular expressions: if ($var =~ /$gettext{"the earth"}/) { print gettext "Match!\n"; } s/$gettext{"U. S. A."}/$gettext{"U. S. A."} $gettext{"(dial +0)"}/g;  File: gettext.info, Node: Parentheses, Next: Long Lines, Prev: Interpolation II, Up: Perl 15.5.18.7 When To Use Parentheses ................................. In Perl, parentheses around function arguments are mostly optional. `xgettext' will always assume that all recognized keywords (except for hashes and hash references) are names of properly prototyped functions, and will (hopefully) only require parentheses where Perl itself requires them. All constructs in the following example are therefore ok to use: print gettext ("Hello World!\n"); print gettext "Hello World!\n"; print dgettext ($package => "Hello World!\n"); print dgettext $package, "Hello World!\n"; # The "fat comma" => turns the left-hand side argument into a # single-quoted string! print dgettext smellovision => "Hello World!\n"; # The following assignment only works with prototyped functions. # Otherwise, the functions will act as "greedy" list operators and # eat up all following arguments. my $anonymous_hash = { planet => gettext "earth", cakes => ngettext "one cake", "several cakes", $n, still => $works, }; # The same without fat comma: my $other_hash = { 'planet', gettext "earth", 'cakes', ngettext "one cake", "several cakes", $n, 'still', $works, }; # Parentheses are only significant for the first argument. print dngettext 'package', ("one cake", "several cakes", $n), $discarded;  File: gettext.info, Node: Long Lines, Next: Perl Pitfalls, Prev: Parentheses, Up: Perl 15.5.18.8 How To Grok with Long Lines ..................................... The necessity of long messages can often lead to a cumbersome or unreadable coding style. Perl has several options that may prevent you from writing unreadable code, and `xgettext' does its best to do likewise. This is where the dot operator (the string concatenation operator) may come in handy: print gettext ("This is a very long" . " message that is still" . " readable, because" . " it is split into" . " multiple lines.\n"); Perl is smart enough to concatenate these constant string fragments into one long string at compile time, and so is `xgettext'. You will only find one long message in the resulting POT file. Note that the future Perl 6 will probably use the underscore (`_') as the string concatenation operator, and the dot (`.') for dereferencing. This new syntax is not yet supported by `xgettext'. If embedded newline characters are not an issue, or even desired, you may also insert newline characters inside quoted strings wherever you feel like it: print gettext ("<em>In HTML output embedded newlines are generally no problem, since adjacent whitespace is always rendered into a single space character.</em>"); You may also consider to use here documents: print gettext <<EOF; <em>In HTML output embedded newlines are generally no problem, since adjacent whitespace is always rendered into a single space character.</em> EOF Please do not forget that the line breaks are real, i.e. they translate into newline characters that will consequently show up in the resulting POT file.  File: gettext.info, Node: Perl Pitfalls, Prev: Long Lines, Up: Perl 15.5.18.9 Bugs, Pitfalls, And Things That Do Not Work ..................................................... The foregoing sections should have proven that `xgettext' is quite smart in extracting translatable strings from Perl sources. Yet, some more or less exotic constructs that could be expected to work, actually do not work. One of the more relevant limitations can be found in the implementation of variable interpolation inside quoted strings. Only simple hash lookups can be used there: print <<EOF; $gettext{"The dot operator" . " does not work" . "here!"} Likewise, you cannot @{[ gettext ("interpolate function calls") ]} inside quoted strings or quote-like expressions. EOF This is valid Perl code and will actually trigger invocations of the `gettext' function at runtime. Yet, the Perl parser in `xgettext' will fail to recognize the strings. A less obvious example can be found in the interpolation of regular expressions: s/<!--START_OF_WEEK-->/gettext ("Sunday")/e; The modifier `e' will cause the substitution to be interpreted as an evaluable statement. Consequently, at runtime the function `gettext()' is called, but again, the parser fails to extract the string "Sunday". Use a temporary variable as a simple workaround if you really happen to need this feature: my $sunday = gettext "Sunday"; s/<!--START_OF_WEEK-->/$sunday/; Hash slices would also be handy but are not recognized: my @weekdays = @gettext{'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'}; # Or even: @weekdays = @gettext{qw (Sunday Monday Tuesday Wednesday Thursday Friday Saturday) }; This is perfectly valid usage of the tied hash `%gettext' but the strings are not recognized and therefore will not be extracted. Another caveat of the current version is its rudimentary support for non-ASCII characters in identifiers. You may encounter serious problems if you use identifiers with characters outside the range of 'A'-'Z', 'a'-'z', '0'-'9' and the underscore '_'. Maybe some of these missing features will be implemented in future versions, but since you can always make do without them at minimal effort, these todos have very low priority. A nasty problem are brace format strings that already contain braces as part of the normal text, for example the usage strings typically encountered in programs: die "usage: $0 {OPTIONS} FILENAME...\n"; If you want to internationalize this code with Perl brace format strings, you will run into a problem: die __x ("usage: {program} {OPTIONS} FILENAME...\n", program => $0); Whereas `{program}' is a placeholder, `{OPTIONS}' is not and should probably be translated. Yet, there is no way to teach the Perl parser in `xgettext' to recognize the first one, and leave the other one alone. There are two possible work-arounds for this problem. If you are sure that your program will run under Perl 5.8.0 or newer (these Perl versions handle positional parameters in `printf()') or if you are sure that the translator will not have to reorder the arguments in her translation - for example if you have only one brace placeholder in your string, or if it describes a syntax, like in this one -, you can mark the string as `no-perl-brace-format' and use `printf()': # xgettext: no-perl-brace-format die sprintf ("usage: %s {OPTIONS} FILENAME...\n", $0); If you want to use the more portable Perl brace format, you will have to do put placeholders in place of the literal braces: die __x ("usage: {program} {[}OPTIONS{]} FILENAME...\n", program => $0, '[' => '{', ']' => '}'); Perl brace format strings know no escaping mechanism. No matter how this escaping mechanism looked like, it would either give the programmer a hard time, make translating Perl brace format strings heavy-going, or result in a performance penalty at runtime, when the format directives get executed. Most of the time you will happily get along with `printf()' for this special case.  File: gettext.info, Node: PHP, Next: Pike, Prev: Perl, Up: List of Programming Languages 15.5.19 PHP Hypertext Preprocessor ---------------------------------- RPMs mod_php4, mod_php4-core, phpdoc File extension `php', `php3', `php4' String syntax `"abc"', `'abc'' gettext shorthand `_("abc")' gettext/ngettext functions `gettext', `dgettext', `dcgettext'; starting with PHP 4.2.0 also `ngettext', `dngettext', `dcngettext' textdomain `textdomain' function bindtextdomain `bindtextdomain' function setlocale Programmer must call `setlocale (LC_ALL, "")' Prerequisite -- Use or emulate GNU gettext use Extractor `xgettext' Formatting with positions `printf "%2\$d %1\$d"' Portability On platforms without gettext, the functions are not available. po-mode marking -- An example is available in the `examples' directory: `hello-php'.  File: gettext.info, Node: Pike, Next: GCC-source, Prev: PHP, Up: List of Programming Languages 15.5.20 Pike ------------ RPMs roxen File extension `pike' String syntax `"abc"' gettext shorthand -- gettext/ngettext functions `gettext', `dgettext', `dcgettext' textdomain `textdomain' function bindtextdomain `bindtextdomain' function setlocale `setlocale' function Prerequisite `import Locale.Gettext;' Use or emulate GNU gettext use Extractor -- Formatting with positions -- Portability On platforms without gettext, the functions are not available. po-mode marking --  File: gettext.info, Node: GCC-source, Prev: Pike, Up: List of Programming Languages 15.5.21 GNU Compiler Collection sources --------------------------------------- RPMs gcc File extension `c', `h'. String syntax `"abc"' gettext shorthand `_("abc")' gettext/ngettext functions `gettext', `dgettext', `dcgettext', `ngettext', `dngettext', `dcngettext' textdomain `textdomain' function bindtextdomain `bindtextdomain' function setlocale Programmer must call `setlocale (LC_ALL, "")' Prerequisite `#include "intl.h"' Use or emulate GNU gettext Use Extractor `xgettext -k_' Formatting with positions -- Portability Uses autoconf macros po-mode marking yes  File: gettext.info, Node: List of Data Formats, Prev: List of Programming Languages, Up: Programming Languages 15.6 Internationalizable Data ============================= Here is a list of other data formats which can be internationalized using GNU gettext. * Menu: * POT:: POT - Portable Object Template * RST:: Resource String Table * Glade:: Glade - GNOME user interface description  File: gettext.info, Node: POT, Next: RST, Prev: List of Data Formats, Up: List of Data Formats 15.6.1 POT - Portable Object Template ------------------------------------- RPMs gettext File extension `pot', `po' Extractor `xgettext'  File: gettext.info, Node: RST, Next: Glade, Prev: POT, Up: List of Data Formats 15.6.2 Resource String Table ---------------------------- RPMs fpk File extension `rst' Extractor `xgettext', `rstconv'  File: gettext.info, Node: Glade, Prev: RST, Up: List of Data Formats 15.6.3 Glade - GNOME user interface description ----------------------------------------------- RPMs glade, libglade, glade2, libglade2, intltool File extension `glade', `glade2' Extractor `xgettext', `libglade-xgettext', `xml-i18n-extract', `intltool-extract'  File: gettext.info, Node: Conclusion, Next: Language Codes, Prev: Programming Languages, Up: Top 16 Concluding Remarks ********************* We would like to conclude this GNU `gettext' manual by presenting an history of the Translation Project so far. We finally give a few pointers for those who want to do further research or readings about Native Language Support matters. * Menu: * History:: History of GNU `gettext' * References:: Related Readings  File: gettext.info, Node: History, Next: References, Prev: Conclusion, Up: Conclusion 16.1 History of GNU `gettext' ============================= Internationalization concerns and algorithms have been informally and casually discussed for years in GNU, sometimes around GNU `libc', maybe around the incoming `Hurd', or otherwise (nobody clearly remembers). And even then, when the work started for real, this was somewhat independently of these previous discussions. This all began in July 1994, when Patrick D'Cruze had the idea and initiative of internationalizing version 3.9.2 of GNU `fileutils'. He then asked Jim Meyering, the maintainer, how to get those changes folded into an official release. That first draft was full of `#ifdef's and somewhat disconcerting, and Jim wanted to find nicer ways. Patrick and Jim shared some tries and experimentations in this area. Then, feeling that this might eventually have a deeper impact on GNU, Jim wanted to know what standards were, and contacted Richard Stallman, who very quickly and verbally described an overall design for what was meant to become `glocale', at that time. Jim implemented `glocale' and got a lot of exhausting feedback from Patrick and Richard, of course, but also from Mitchum DSouza (who wrote a `catgets'-like package), Roland McGrath, maybe David MacKenzie, François Pinard, and Paul Eggert, all pushing and pulling in various directions, not always compatible, to the extent that after a couple of test releases, `glocale' was torn apart. In particular, Paul Eggert - always keeping an eye on developments in Solaris - advocated the use of the `gettext' API over `glocale''s `catgets'-based API. While Jim took some distance and time and became dad for a second time, Roland wanted to get GNU `libc' internationalized, and got Ulrich Drepper involved in that project. Instead of starting from `glocale', Ulrich rewrote something from scratch, but more conforming to the set of guidelines who emerged out of the `glocale' effort. Then, Ulrich got people from the previous forum to involve themselves into this new project, and the switch from `glocale' to what was first named `msgutils', renamed `nlsutils', and later `gettext', became officially accepted by Richard in May 1995 or so. Let's summarize by saying that Ulrich Drepper wrote GNU `gettext' in April 1995. The first official release of the package, including PO mode, occurred in July 1995, and was numbered 0.7. Other people contributed to the effort by providing a discussion forum around Ulrich, writing little pieces of code, or testing. These are quoted in the `THANKS' file which comes with the GNU `gettext' distribution. While this was being done, François adapted half a dozen of GNU packages to `glocale' first, then later to `gettext', putting them in pretest, so providing along the way an effective user environment for fine tuning the evolving tools. He also took the responsibility of organizing and coordinating the Translation Project. After nearly a year of informal exchanges between people from many countries, translator teams started to exist in May 1995, through the creation and support by Patrick D'Cruze of twenty unmoderated mailing lists for that many native languages, and two moderated lists: one for reaching all teams at once, the other for reaching all willing maintainers of internationalized free software packages. François also wrote PO mode in June 1995 with the collaboration of Greg McGary, as a kind of contribution to Ulrich's package. He also gave a hand with the GNU `gettext' Texinfo manual. In 1997, Ulrich Drepper released the GNU libc 2.0, which included the `gettext', `textdomain' and `bindtextdomain' functions. In 2000, Ulrich Drepper added plural form handling (the `ngettext' function) to GNU libc. Later, in 2001, he released GNU libc 2.2.x, which is the first free C library with full internationalization support. Ulrich being quite busy in his role of General Maintainer of GNU libc, he handed over the GNU `gettext' maintenance to Bruno Haible in 2000. Bruno added the plural form handling to the tools as well, added support for UTF-8 and CJK locales, and wrote a few new tools for manipulating PO files.  File: gettext.info, Node: References, Prev: History, Up: Conclusion 16.2 Related Readings ===================== * NOTE: * This documentation section is outdated and needs to be revised. Eugene H. Dorr (`dorre@well.com') maintains an interesting bibliography on internationalization matters, called `Internationalization Reference List', which is available as: ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/i18n-books.txt Michael Gschwind (`mike@vlsivie.tuwien.ac.at') maintains a Frequently Asked Questions (FAQ) list, entitled `Programming for Internationalisation'. This FAQ discusses writing programs which can handle different language conventions, character sets, etc.; and is applicable to all character set encodings, with particular emphasis on ISO 8859-1. It is regularly published in Usenet groups `comp.unix.questions', `comp.std.internat', `comp.software.international', `comp.lang.c', `comp.windows.x', `comp.std.c', `comp.answers' and `news.answers'. The home location of this document is: ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit/ISO-programming Patrick D'Cruze (`pdcruze@li.org') wrote a tutorial about NLS matters, and Jochen Hein (`Hein@student.tu-clausthal.de') took over the responsibility of maintaining it. It may be found as: ftp://sunsite.unc.edu/pub/Linux/utils/nls/catalogs/Incoming/... ...locale-tutorial-0.8.txt.gz This site is mirrored in: ftp://ftp.ibp.fr/pub/linux/sunsite/ A French version of the same tutorial should be findable at: ftp://ftp.ibp.fr/pub/linux/french/docs/ together with French translations of many Linux-related documents.  File: gettext.info, Node: Language Codes, Next: Country Codes, Prev: Conclusion, Up: Top Appendix A Language Codes ************************* The ISO 639 standard defines two-letter codes for many languages, and three-letter codes for more rarely used languages. All abbreviations for languages used in the Translation Project should come from this standard. * Menu: * Usual Language Codes:: Two-letter ISO 639 language codes * Rare Language Codes:: Three-letter ISO 639 language codes  File: gettext.info, Node: Usual Language Codes, Next: Rare Language Codes, Prev: Language Codes, Up: Language Codes A.1 Usual Language Codes ======================== For the commonly used languages, the ISO 639-1 standard defines two-letter codes. `aa' Afar. `ab' Abkhazian. `ae' Avestan. `af' Afrikaans. `ak' Akan. `am' Amharic. `an' Aragonese. `ar' Arabic. `as' Assamese. `av' Avaric. `ay' Aymara. `az' Azerbaijani. `ba' Bashkir. `be' Belarusian. `bg' Bulgarian. `bh' Bihari. `bi' Bislama. `bm' Bambara. `bn' Bengali; Bangla. `bo' Tibetan. `br' Breton. `bs' Bosnian. `ca' Catalan. `ce' Chechen. `ch' Chamorro. `co' Corsican. `cr' Cree. `cs' Czech. `cu' Church Slavic. `cv' Chuvash. `cy' Welsh. `da' Danish. `de' German. `dv' Divehi; Maldivian. `dz' Dzongkha; Bhutani. `ee' Éwé. `el' Greek. `en' English. `eo' Esperanto. `es' Spanish. `et' Estonian. `eu' Basque. `fa' Persian. `ff' Fulah. `fi' Finnish. `fj' Fijian; Fiji. `fo' Faroese. `fr' French. `fy' Western Frisian. `ga' Irish. `gd' Scottish Gaelic. `gl' Galician. `gn' Guarani. `gu' Gujarati. `gv' Manx. `ha' Hausa. `he' Hebrew (formerly iw). `hi' Hindi. `ho' Hiri Motu. `hr' Croatian. `ht' Haitian; Haitian Creole. `hu' Hungarian. `hy' Armenian. `hz' Herero. `ia' Interlingua. `id' Indonesian (formerly in). `ie' Interlingue; Occidental. `ig' Igbo. `ii' Sichuan Yi; Nuosu. `ik' Inupiak; Inupiaq. `io' Ido. `is' Icelandic. `it' Italian. `iu' Inuktitut. `ja' Japanese. `jv' Javanese. `ka' Georgian. `kg' Kongo. `ki' Kikuyu; Gikuyu. `kj' Kuanyama; Kwanyama. `kk' Kazakh. `kl' Kalaallisut; Greenlandic. `km' Central Khmer; Cambodian. `kn' Kannada. `ko' Korean. `kr' Kanuri. `ks' Kashmiri. `ku' Kurdish. `kv' Komi. `kw' Cornish. `ky' Kirghiz. `la' Latin. `lb' Letzeburgesch; Luxembourgish. `lg' Ganda. `li' Limburgish; Limburger; Limburgan. `ln' Lingala. `lo' Lao; Laotian. `lt' Lithuanian. `lu' Luba-Katanga. `lv' Latvian; Lettish. `mg' Malagasy. `mh' Marshallese. `mi' Maori. `mk' Macedonian. `ml' Malayalam. `mn' Mongolian. `mo' Moldavian. `mr' Marathi. `ms' Malay. `mt' Maltese. `my' Burmese. `na' Nauru. `nb' Norwegian Bokmål. `nd' Ndebele, North. `ne' Nepali. `ng' Ndonga. `nl' Dutch. `nn' Norwegian Nynorsk. `no' Norwegian. `nr' Ndebele, South. `nv' Navajo; Navaho. `ny' Chichewa; Nyanja. `oc' Occitan; Provençal. `oj' Ojibwa. `om' (Afan) Oromo. `or' Oriya. `os' Ossetian; Ossetic. `pa' Panjabi; Punjabi. `pi' Pali. `pl' Polish. `ps' Pashto; Pushto. `pt' Portuguese. `qu' Quechua. `rm' Romansh. `rn' Rundi; Kirundi. `ro' Romanian. `ru' Russian. `rw' Kinyarwanda. `sa' Sanskrit. `sc' Sardinian. `sd' Sindhi. `se' Northern Sami. `sg' Sango; Sangro. `si' Sinhala; Sinhalese. `sk' Slovak. `sl' Slovenian. `sm' Samoan. `sn' Shona. `so' Somali. `sq' Albanian. `sr' Serbian. `ss' Swati; Siswati. `st' Sesotho; Sotho, Southern. `su' Sundanese. `sv' Swedish. `sw' Swahili. `ta' Tamil. `te' Telugu. `tg' Tajik. `th' Thai. `ti' Tigrinya. `tk' Turkmen. `tl' Tagalog. `tn' Tswana; Setswana. `to' Tonga. `tr' Turkish. `ts' Tsonga. `tt' Tatar. `tw' Twi. `ty' Tahitian. `ug' Uighur. `uk' Ukrainian. `ur' Urdu. `uz' Uzbek. `ve' Venda. `vi' Vietnamese. `vo' Volapük; Volapuk. `wa' Walloon. `wo' Wolof. `xh' Xhosa. `yi' Yiddish (formerly ji). `yo' Yoruba. `za' Zhuang. `zh' Chinese. `zu' Zulu.  File: gettext.info, Node: Rare Language Codes, Prev: Usual Language Codes, Up: Language Codes A.2 Rare Language Codes ======================= For rarely used languages, the ISO 639-2 standard defines three-letter codes. Here is the current list, reduced to only living languages with at least one million of speakers. `ace' Achinese. `awa' Awadhi. `bal' Baluchi. `ban' Balinese. `bej' Beja; Bedawiyet. `bem' Bemba. `bho' Bhojpuri. `bik' Bikol. `bin' Bini; Edo. `bug' Buginese. `ceb' Cebuano. `din' Dinka. `doi' Dogri. `fil' Filipino; Pilipino. `fon' Fon. `gon' Gondi. `gsw' Swiss German; Alemannic; Alsatian. `hil' Hiligaynon. `hmn' Hmong. `ilo' Iloko. `kab' Kabyle. `kam' Kamba. `kbd' Kabardian. `kmb' Kimbundu. `kok' Konkani. `kru' Kurukh. `lua' Luba-Lulua. `luo' Luo (Kenya and Tanzania). `mad' Madurese. `mag' Magahi. `mai' Maithili. `mak' Makasar. `man' Mandingo. `men' Mende. `min' Minangkabau. `mni' Manipuri. `mos' Mossi. `mwr' Marwari. `nap' Neapolitan. `nso' Pedi; Sepedi; Northern Sotho. `nym' Nyamwezi. `nyn' Nyankole. `pag' Pangasinan. `pam' Pampanga; Kapampangan. `raj' Rajasthani. `sas' Sasak. `sat' Santali. `scn' Sicilian. `shn' Shan. `sid' Sidamo. `srr' Serer. `suk' Sukuma. `sus' Susu. `tem' Timne. `tiv' Tiv. `tum' Tumbuka. `umb' Umbundu. `wal' Walamo. `war' Waray. `yao' Yao.  File: gettext.info, Node: Country Codes, Next: Licenses, Prev: Language Codes, Up: Top Appendix B Country Codes ************************ The ISO 3166 standard defines two character codes for many countries and territories. All abbreviations for countries used in the Translation Project should come from this standard. `AD' Andorra. `AE' United Arab Emirates. `AF' Afghanistan. `AG' Antigua and Barbuda. `AI' Anguilla. `AL' Albania. `AM' Armenia. `AN' Netherlands Antilles. `AO' Angola. `AQ' Antarctica. `AR' Argentina. `AS' Samoa (American). `AT' Austria. `AU' Australia. `AW' Aruba. `AX' Aaland Islands. `AZ' Azerbaijan. `BA' Bosnia and Herzegovina. `BB' Barbados. `BD' Bangladesh. `BE' Belgium. `BF' Burkina Faso. `BG' Bulgaria. `BH' Bahrain. `BI' Burundi. `BJ' Benin. `BM' Bermuda. `BN' Brunei. `BO' Bolivia. `BR' Brazil. `BS' Bahamas. `BT' Bhutan. `BV' Bouvet Island. `BW' Botswana. `BY' Belarus. `BZ' Belize. `CA' Canada. `CC' Cocos (Keeling) Islands. `CD' Congo (Dem. Rep.). `CF' Central African Republic. `CG' Congo (Rep.). `CH' Switzerland. `CI' Côte d'Ivoire. `CK' Cook Islands. `CL' Chile. `CM' Cameroon. `CN' China. `CO' Colombia. `CR' Costa Rica. `CU' Cuba. `CV' Cape Verde. `CX' Christmas Island. `CY' Cyprus. `CZ' Czech Republic. `DE' Germany. `DJ' Djibouti. `DK' Denmark. `DM' Dominica. `DO' Dominican Republic. `DZ' Algeria. `EC' Ecuador. `EE' Estonia. `EG' Egypt. `EH' Western Sahara. `ER' Eritrea. `ES' Spain. `ET' Ethiopia. `FI' Finland. `FJ' Fiji. `FK' Falkland Islands. `FM' Micronesia. `FO' Faeroe Islands. `FR' France. `GA' Gabon. `GB' Britain (United Kingdom). `GD' Grenada. `GE' Georgia. `GF' French Guiana. `GG' Guernsey. `GH' Ghana. `GI' Gibraltar. `GL' Greenland. `GM' Gambia. `GN' Guinea. `GP' Guadeloupe. `GQ' Equatorial Guinea. `GR' Greece. `GS' South Georgia and the South Sandwich Islands. `GT' Guatemala. `GU' Guam. `GW' Guinea-Bissau. `GY' Guyana. `HK' Hong Kong. `HM' Heard Island and McDonald Islands. `HN' Honduras. `HR' Croatia. `HT' Haiti. `HU' Hungary. `ID' Indonesia. `IE' Ireland. `IL' Israel. `IM' Isle of Man. `IN' India. `IO' British Indian Ocean Territory. `IQ' Iraq. `IR' Iran. `IS' Iceland. `IT' Italy. `JE' Jersey. `JM' Jamaica. `JO' Jordan. `JP' Japan. `KE' Kenya. `KG' Kyrgyzstan. `KH' Cambodia. `KI' Kiribati. `KM' Comoros. `KN' St Kitts and Nevis. `KP' Korea (North). `KR' Korea (South). `KW' Kuwait. `KY' Cayman Islands. `KZ' Kazakhstan. `LA' Laos. `LB' Lebanon. `LC' St Lucia. `LI' Liechtenstein. `LK' Sri Lanka. `LR' Liberia. `LS' Lesotho. `LT' Lithuania. `LU' Luxembourg. `LV' Latvia. `LY' Libya. `MA' Morocco. `MC' Monaco. `MD' Moldova. `ME' Montenegro. `MG' Madagascar. `MH' Marshall Islands. `MK' Macedonia. `ML' Mali. `MM' Myanmar (Burma). `MN' Mongolia. `MO' Macao. `MP' Northern Mariana Islands. `MQ' Martinique. `MR' Mauritania. `MS' Montserrat. `MT' Malta. `MU' Mauritius. `MV' Maldives. `MW' Malawi. `MX' Mexico. `MY' Malaysia. `MZ' Mozambique. `NA' Namibia. `NC' New Caledonia. `NE' Niger. `NF' Norfolk Island. `NG' Nigeria. `NI' Nicaragua. `NL' Netherlands. `NO' Norway. `NP' Nepal. `NR' Nauru. `NU' Niue. `NZ' New Zealand. `OM' Oman. `PA' Panama. `PE' Peru. `PF' French Polynesia. `PG' Papua New Guinea. `PH' Philippines. `PK' Pakistan. `PL' Poland. `PM' St Pierre and Miquelon. `PN' Pitcairn. `PR' Puerto Rico. `PS' Palestine. `PT' Portugal. `PW' Palau. `PY' Paraguay. `QA' Qatar. `RE' Reunion. `RO' Romania. `RS' Serbia. `RU' Russia. `RW' Rwanda. `SA' Saudi Arabia. `SB' Solomon Islands. `SC' Seychelles. `SD' Sudan. `SE' Sweden. `SG' Singapore. `SH' St Helena. `SI' Slovenia. `SJ' Svalbard and Jan Mayen. `SK' Slovakia. `SL' Sierra Leone. `SM' San Marino. `SN' Senegal. `SO' Somalia. `SR' Suriname. `ST' Sao Tome and Principe. `SV' El Salvador. `SY' Syria. `SZ' Swaziland. `TC' Turks and Caicos Islands. `TD' Chad. `TF' French Southern and Antarctic Lands. `TG' Togo. `TH' Thailand. `TJ' Tajikistan. `TK' Tokelau. `TL' Timor-Leste. `TM' Turkmenistan. `TN' Tunisia. `TO' Tonga. `TR' Turkey. `TT' Trinidad and Tobago. `TV' Tuvalu. `TW' Taiwan. `TZ' Tanzania. `UA' Ukraine. `UG' Uganda. `UM' US minor outlying islands. `US' United States. `UY' Uruguay. `UZ' Uzbekistan. `VA' Vatican City. `VC' St Vincent and the Grenadines. `VE' Venezuela. `VG' Virgin Islands (UK). `VI' Virgin Islands (US). `VN' Vietnam. `VU' Vanuatu. `WF' Wallis and Futuna. `WS' Samoa (Western). `YE' Yemen. `YT' Mayotte. `ZA' South Africa. `ZM' Zambia. `ZW' Zimbabwe.  File: gettext.info, Node: Licenses, Next: Program Index, Prev: Country Codes, Up: Top Appendix C Licenses ******************* The files of this package are covered by the licenses indicated in each particular file or directory. Here is a summary: * The `libintl' and `libasprintf' libraries are covered by the GNU Library General Public License (LGPL). A copy of the license is included in *note GNU LGPL::. * The executable programs of this package and the `libgettextpo' library are covered by the GNU General Public License (GPL). A copy of the license is included in *note GNU GPL::. * This manual is free documentation. It is dually licensed under the GNU FDL and the GNU GPL. This means that you can redistribute this manual under either of these two licenses, at your choice. This manual is covered by the GNU FDL. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (FDL), either version 1.2 of the License, or (at your option) any later version published by the Free Software Foundation (FSF); with no Invariant Sections, with no Front-Cover Text, and with no Back-Cover Texts. A copy of the license is included in *note GNU FDL::. This manual is covered by the GNU GPL. You can redistribute it and/or modify it under the terms of the GNU General Public License (GPL), either version 2 of the License, or (at your option) any later version published by the Free Software Foundation (FSF). A copy of the license is included in *note GNU GPL::. * Menu: * GNU GPL:: GNU General Public License * GNU LGPL:: GNU Lesser General Public License * GNU FDL:: GNU Free Documentation License  File: gettext.info, Node: GNU GPL, Next: GNU LGPL, Up: Licenses C.1 GNU GENERAL PUBLIC LICENSE ============================== Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -------- The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a. You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b. You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c. If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a. Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b. Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c. Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs ------------------------------------------------------- If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. Copyright (C) YYYY NAME OF AUTHOR This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. SIGNATURE OF TY COON, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.  File: gettext.info, Node: GNU LGPL, Next: GNU FDL, Prev: GNU GPL, Up: Licenses C.2 GNU LESSER GENERAL PUBLIC LICENSE ===================================== Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble -------- The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does _Less_ to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a. The modified work must itself be a software library. b. You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c. You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d. If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a. Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b. Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c. Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d. If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e. Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a. Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b. Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries ---------------------------------------------- If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES. Copyright (C) YEAR NAME OF AUTHOR This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. SIGNATURE OF TY COON, 1 April 1990 Ty Coon, President of Vice That's all there is to it!  File: gettext.info, Node: GNU FDL, Prev: GNU LGPL, Up: Licenses C.3 GNU Free Documentation License ================================== Version 1.2, November 2002 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents ---------------------------------------------------- To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.  File: gettext.info, Node: Program Index, Next: Option Index, Prev: Licenses, Up: Top Program Index ************* �[index�] * Menu: * autopoint: autopoint Invocation. (line 6) * envsubst: envsubst Invocation. (line 6) * gettext <1>: gettext Invocation. (line 6) * gettext: sh. (line 19) * gettextize: gettextize Invocation. (line 34) * msgattrib: msgattrib Invocation. (line 6) * msgcat: msgcat Invocation. (line 6) * msgcmp: msgcmp Invocation. (line 6) * msgcomm: msgcomm Invocation. (line 6) * msgconv: msgconv Invocation. (line 6) * msgen: msgen Invocation. (line 6) * msgexec: msgexec Invocation. (line 6) * msgfilter: msgfilter Invocation. (line 6) * msgfmt: msgfmt Invocation. (line 6) * msggrep: msggrep Invocation. (line 6) * msginit: msginit Invocation. (line 6) * msgmerge: msgmerge Invocation. (line 6) * msgunfmt: msgunfmt Invocation. (line 6) * msguniq: msguniq Invocation. (line 6) * ngettext <1>: ngettext Invocation. (line 6) * ngettext: sh. (line 19) * recode-sr-latin: msgfilter Invocation. (line 92) * xgettext: xgettext Invocation. (line 6)  File: gettext.info, Node: Option Index, Next: Variable Index, Prev: Program Index, Up: Top Option Index ************ �[index�] * Menu: * --add-comments, xgettext option: xgettext Invocation. (line 97) * --add-location, msgattrib option: msgattrib Invocation. (line 136) * --add-location, msgcat option: msgcat Invocation. (line 119) * --add-location, msgcomm option: msgcomm Invocation. (line 104) * --add-location, msgconv option: msgconv Invocation. (line 83) * --add-location, msgen option: msgen Invocation. (line 85) * --add-location, msgfilter option: msgfilter Invocation. (line 144) * --add-location, msggrep option: msggrep Invocation. (line 161) * --add-location, msgmerge option: msgmerge Invocation. (line 155) * --add-location, msguniq option: msguniq Invocation. (line 101) * --add-location, xgettext option: xgettext Invocation. (line 297) * --alignment, msgfmt option: msgfmt Invocation. (line 209) * --backup, msgmerge option: msgmerge Invocation. (line 65) * --boost, xgettext option: xgettext Invocation. (line 254) * --c++, xgettext option: xgettext Invocation. (line 64) * --check, msgfmt option: msgfmt Invocation. (line 146) * --check-accelerators, msgfmt option: msgfmt Invocation. (line 187) * --check-compatibility, msgfmt option: msgfmt Invocation. (line 183) * --check-domain, msgfmt option: msgfmt Invocation. (line 178) * --check-format, msgfmt option: msgfmt Invocation. (line 150) * --check-header, msgfmt option: msgfmt Invocation. (line 173) * --clear-fuzzy, msgattrib option: msgattrib Invocation. (line 71) * --clear-obsolete, msgattrib option: msgattrib Invocation. (line 77) * --clear-previous, msgattrib option: msgattrib Invocation. (line 80) * --color, msgattrib option: msgattrib Invocation. (line 117) * --color, msgcat option <1>: The --color option. (line 6) * --color, msgcat option: msgcat Invocation. (line 100) * --color, msgcomm option: msgcomm Invocation. (line 85) * --color, msgconv option: msgconv Invocation. (line 65) * --color, msgen option: msgen Invocation. (line 67) * --color, msgfilter option: msgfilter Invocation. (line 122) * --color, msggrep option: msggrep Invocation. (line 144) * --color, msginit option: msginit Invocation. (line 63) * --color, msgmerge option: msgmerge Invocation. (line 137) * --color, msgunfmt option: msgunfmt Invocation. (line 109) * --color, msguniq option: msguniq Invocation. (line 82) * --color, xgettext option: xgettext Invocation. (line 276) * --comment, msggrep option: msggrep Invocation. (line 93) * --compendium, msgmerge option: msgmerge Invocation. (line 36) * --copyright-holder, xgettext option: xgettext Invocation. (line 347) * --csharp, msgfmt option: msgfmt Invocation. (line 36) * --csharp, msgunfmt option: msgunfmt Invocation. (line 19) * --csharp-resources, msgfmt option: msgfmt Invocation. (line 40) * --csharp-resources, msgunfmt option: msgunfmt Invocation. (line 23) * --debug, xgettext option: xgettext Invocation. (line 258) * --default-domain, xgettext option: xgettext Invocation. (line 36) * --directory, msgattrib option: msgattrib Invocation. (line 19) * --directory, msgcat option: msgcat Invocation. (line 32) * --directory, msgcmp option: msgcmp Invocation. (line 27) * --directory, msgcomm option: msgcomm Invocation. (line 30) * --directory, msgconv option: msgconv Invocation. (line 19) * --directory, msgen option: msgen Invocation. (line 25) * --directory, msgexec option: msgexec Invocation. (line 44) * --directory, msgfilter option: msgfilter Invocation. (line 27) * --directory, msgfmt option: msgfmt Invocation. (line 18) * --directory, msggrep option: msggrep Invocation. (line 19) * --directory, msgmerge option: msgmerge Invocation. (line 30) * --directory, msguniq option: msguniq Invocation. (line 26) * --directory, xgettext option: xgettext Invocation. (line 24) * --domain, gettext option: gettext Invocation. (line 16) * --domain, msggrep option: msggrep Invocation. (line 77) * --domain, ngettext option: ngettext Invocation. (line 15) * --dry-run, autopoint option: autopoint Invocation. (line 24) * --dry-run, gettextize option: gettextize Invocation. (line 72) * --exclude-file, xgettext option: xgettext Invocation. (line 92) * --expression, msgfilter option: msgfilter Invocation. (line 77) * --extended-regexp, msggrep option: msggrep Invocation. (line 101) * --extract-all, xgettext option: xgettext Invocation. (line 107) * --extracted-comment, msggrep option: msggrep Invocation. (line 97) * --file, msgfilter option: msgfilter Invocation. (line 81) * --file, msggrep option: msggrep Invocation. (line 113) * --files-from, msgcat option: msgcat Invocation. (line 27) * --files-from, msgcomm option: msgcomm Invocation. (line 25) * --files-from, xgettext option: xgettext Invocation. (line 19) * --fixed-strings, msggrep option: msggrep Invocation. (line 105) * --flag, xgettext option: xgettext Invocation. (line 201) * --force, autopoint option: autopoint Invocation. (line 20) * --force, gettextize option: gettextize Invocation. (line 40) * --force-po, msgattrib option: msgattrib Invocation. (line 125) * --force-po, msgcat option: msgcat Invocation. (line 108) * --force-po, msgcomm option: msgcomm Invocation. (line 93) * --force-po, msgconv option: msgconv Invocation. (line 73) * --force-po, msgen option: msgen Invocation. (line 75) * --force-po, msgfilter option: msgfilter Invocation. (line 130) * --force-po, msggrep option: msggrep Invocation. (line 152) * --force-po, msgmerge option: msgmerge Invocation. (line 145) * --force-po, msgunfmt option: msgunfmt Invocation. (line 117) * --force-po, msguniq option: msguniq Invocation. (line 90) * --force-po, xgettext option: xgettext Invocation. (line 284) * --foreign-user, xgettext option: xgettext Invocation. (line 362) * --from-code, xgettext option: xgettext Invocation. (line 74) * --fuzzy, msgattrib option: msgattrib Invocation. (line 91) * --help, autopoint option: autopoint Invocation. (line 33) * --help, envsubst option: envsubst Invocation. (line 22) * --help, gettext option: gettext Invocation. (line 32) * --help, gettextize option: gettextize Invocation. (line 77) * --help, msgattrib option: msgattrib Invocation. (line 181) * --help, msgcat option: msgcat Invocation. (line 164) * --help, msgcmp option: msgcmp Invocation. (line 72) * --help, msgcomm option: msgcomm Invocation. (line 152) * --help, msgconv option: msgconv Invocation. (line 128) * --help, msgen option: msgen Invocation. (line 130) * --help, msgexec option: msgexec Invocation. (line 69) * --help, msgfilter option: msgfilter Invocation. (line 189) * --help, msgfmt option: msgfmt Invocation. (line 222) * --help, msggrep option: msggrep Invocation. (line 204) * --help, msginit option: msginit Invocation. (line 99) * --help, msgmerge option: msgmerge Invocation. (line 200) * --help, msgunfmt option: msgunfmt Invocation. (line 162) * --help, msguniq option: msguniq Invocation. (line 146) * --help, ngettext option: ngettext Invocation. (line 31) * --help, xgettext option: xgettext Invocation. (line 415) * --ignore-case, msggrep option: msggrep Invocation. (line 117) * --ignore-file, msgattrib option: msgattrib Invocation. (line 87) * --indent, msgattrib option: msgattrib Invocation. (line 129) * --indent, msgcat option: msgcat Invocation. (line 112) * --indent, msgcomm option: msgcomm Invocation. (line 97) * --indent, msgconv option: msgconv Invocation. (line 77) * --indent, msgen option: msgen Invocation. (line 79) * --indent, msgfilter option: msgfilter Invocation. (line 133) * --indent, msggrep option: msggrep Invocation. (line 155) * --indent, msgmerge option: msgmerge Invocation. (line 149) * --indent, msgunfmt option: msgunfmt Invocation. (line 121) * --indent, msguniq option: msguniq Invocation. (line 94) * --indent, xgettext option: xgettext Invocation. (line 288) * --input, msgexec option: msgexec Invocation. (line 40) * --input, msgfilter option: msgfilter Invocation. (line 23) * --input, msginit option: msginit Invocation. (line 16) * --intl, gettextize option: gettextize Invocation. (line 43) * --invert-match, msggrep option: msggrep Invocation. (line 121) * --java, msgfmt option: msgfmt Invocation. (line 30) * --java, msgunfmt option: msgunfmt Invocation. (line 16) * --java2, msgfmt option: msgfmt Invocation. (line 33) * --join-existing, xgettext option: xgettext Invocation. (line 88) * --kde, xgettext option: xgettext Invocation. (line 250) * --keep-header, msgfilter option: msgfilter Invocation. (line 136) * --keyword, xgettext option: xgettext Invocation. (line 115) * --lang, msgcat option <1>: msgen Invocation. (line 60) * --lang, msgcat option <2>: msgcat Invocation. (line 94) * --lang, msgcat option: msgmerge Invocation. (line 129) * --language, xgettext option: xgettext Invocation. (line 56) * --less-than, msgcat option: msgcat Invocation. (line 55) * --less-than, msgcomm option: msgcomm Invocation. (line 53) * --locale, msgfmt option: msgfmt Invocation. (line 79) * --locale, msginit option: msginit Invocation. (line 52) * --locale, msgunfmt option: msgunfmt Invocation. (line 47) * --location, msggrep option: msggrep Invocation. (line 72) * --more-than, msgcat option: msgcat Invocation. (line 60) * --more-than, msgcomm option: msgcomm Invocation. (line 58) * --msgctxt, msggrep option: msggrep Invocation. (line 81) * --msgid, msggrep option: msggrep Invocation. (line 85) * --msgid-bugs-address, xgettext option: xgettext Invocation. (line 375) * --msgstr, msggrep option: msggrep Invocation. (line 89) * --msgstr-prefix, xgettext option: xgettext Invocation. (line 403) * --msgstr-suffix, xgettext option: xgettext Invocation. (line 407) * --multi-domain, msgcmp option: msgcmp Invocation. (line 36) * --multi-domain, msgmerge option: msgmerge Invocation. (line 101) * --no-changelog, gettextize option: gettextize Invocation. (line 58) * --no-fuzzy, msgattrib option: msgattrib Invocation. (line 47) * --no-fuzzy-matching, msgcmp option: msgcmp Invocation. (line 40) * --no-fuzzy-matching, msgmerge option: msgmerge Invocation. (line 105) * --no-hash, msgfmt option: msgfmt Invocation. (line 212) * --no-location, msgattrib option: msgattrib Invocation. (line 132) * --no-location, msgcat option: msgcat Invocation. (line 115) * --no-location, msgcomm option: msgcomm Invocation. (line 100) * --no-location, msgconv option: msgconv Invocation. (line 80) * --no-location, msgen option: msgen Invocation. (line 82) * --no-location, msgfilter option: msgfilter Invocation. (line 141) * --no-location, msggrep option: msggrep Invocation. (line 158) * --no-location, msgmerge option: msgmerge Invocation. (line 152) * --no-location, msguniq option: msguniq Invocation. (line 97) * --no-location, xgettext option: xgettext Invocation. (line 291) * --no-obsolete, msgattrib option: msgattrib Invocation. (line 53) * --no-translator, msginit option: msginit Invocation. (line 58) * --no-wrap, msgattrib option: msgattrib Invocation. (line 161) * --no-wrap, msgcat option: msgcat Invocation. (line 144) * --no-wrap, msgcomm option: msgcomm Invocation. (line 129) * --no-wrap, msgconv option: msgconv Invocation. (line 108) * --no-wrap, msgen option: msgen Invocation. (line 110) * --no-wrap, msgfilter option: msgfilter Invocation. (line 169) * --no-wrap, msggrep option: msggrep Invocation. (line 186) * --no-wrap, msginit option: msginit Invocation. (line 88) * --no-wrap, msgmerge option: msgmerge Invocation. (line 180) * --no-wrap, msgunfmt option: msgunfmt Invocation. (line 146) * --no-wrap, msguniq option: msguniq Invocation. (line 126) * --no-wrap, xgettext option: xgettext Invocation. (line 321) * --obsolete, msgattrib option: msgattrib Invocation. (line 95) * --omit-header, msgcomm option: msgcomm Invocation. (line 144) * --omit-header, xgettext option: xgettext Invocation. (line 336) * --only-file, msgattrib option: msgattrib Invocation. (line 83) * --only-fuzzy, msgattrib option: msgattrib Invocation. (line 50) * --only-obsolete, msgattrib option: msgattrib Invocation. (line 56) * --output, xgettext option: xgettext Invocation. (line 40) * --output-dir, xgettext option: xgettext Invocation. (line 45) * --output-file, msgattrib option: msgattrib Invocation. (line 31) * --output-file, msgcat option: msgcat Invocation. (line 44) * --output-file, msgcomm option: msgcomm Invocation. (line 42) * --output-file, msgconv option: msgconv Invocation. (line 31) * --output-file, msgen option: msgen Invocation. (line 37) * --output-file, msgfilter option: msgfilter Invocation. (line 39) * --output-file, msgfmt option: msgfmt Invocation. (line 54) * --output-file, msggrep option: msggrep Invocation. (line 31) * --output-file, msginit option: msginit Invocation. (line 27) * --output-file, msgmerge option: msgmerge Invocation. (line 53) * --output-file, msgunfmt option: msgunfmt Invocation. (line 98) * --output-file, msguniq option: msguniq Invocation. (line 38) * --package-name, xgettext option: xgettext Invocation. (line 368) * --package-version, xgettext option: xgettext Invocation. (line 371) * --po-dir, gettextize option: gettextize Invocation. (line 51) * --previous, msgmerge option: msgmerge Invocation. (line 109) * --properties-input, msgattrib option: msgattrib Invocation. (line 104) * --properties-input, msgcat option: msgcat Invocation. (line 74) * --properties-input, msgcmp option: msgcmp Invocation. (line 59) * --properties-input, msgcomm option: msgcomm Invocation. (line 72) * --properties-input, msgconv option: msgconv Invocation. (line 52) * --properties-input, msgen option: msgen Invocation. (line 48) * --properties-input, msgexec option: msgexec Invocation. (line 56) * --properties-input, msgfilter option: msgfilter Invocation. (line 109) * --properties-input, msgfmt option: msgfmt Invocation. (line 133) * --properties-input, msggrep option: msggrep Invocation. (line 131) * --properties-input, msginit option: msginit Invocation. (line 39) * --properties-input, msgmerge option: msgmerge Invocation. (line 117) * --properties-input, msguniq option: msguniq Invocation. (line 61) * --properties-output, msgattrib option: msgattrib Invocation. (line 145) * --properties-output, msgcat option: msgcat Invocation. (line 128) * --properties-output, msgcomm option: msgcomm Invocation. (line 113) * --properties-output, msgconv option: msgconv Invocation. (line 92) * --properties-output, msgen option: msgen Invocation. (line 94) * --properties-output, msgfilter option: msgfilter Invocation. (line 153) * --properties-output, msggrep option: msggrep Invocation. (line 170) * --properties-output, msginit option: msginit Invocation. (line 72) * --properties-output, msgmerge option: msgmerge Invocation. (line 164) * --properties-output, msgunfmt option: msgunfmt Invocation. (line 130) * --properties-output, msguniq option: msguniq Invocation. (line 110) * --properties-output, xgettext option: xgettext Invocation. (line 305) * --qt, msgfmt option: msgfmt Invocation. (line 46) * --qt, xgettext option: xgettext Invocation. (line 246) * --quiet, msgfilter option: msgfilter Invocation. (line 86) * --quiet, msgmerge option: msgmerge Invocation. (line 213) * --regexp=, msggrep option: msggrep Invocation. (line 109) * --repeated, msguniq option: msguniq Invocation. (line 49) * --resource, msgfmt option: msgfmt Invocation. (line 75) * --resource, msgunfmt option: msgunfmt Invocation. (line 43) * --set-fuzzy, msgattrib option: msgattrib Invocation. (line 68) * --set-obsolete, msgattrib option: msgattrib Invocation. (line 74) * --silent, msgfilter option: msgfilter Invocation. (line 86) * --silent, msgmerge option: msgmerge Invocation. (line 213) * --sort-by-file, msgattrib option: msgattrib Invocation. (line 173) * --sort-by-file, msgcat option: msgcat Invocation. (line 156) * --sort-by-file, msgcomm option: msgcomm Invocation. (line 141) * --sort-by-file, msgconv option: msgconv Invocation. (line 120) * --sort-by-file, msgen option: msgen Invocation. (line 122) * --sort-by-file, msgfilter option: msgfilter Invocation. (line 181) * --sort-by-file, msggrep option: msggrep Invocation. (line 196) * --sort-by-file, msgmerge option: msgmerge Invocation. (line 192) * --sort-by-file, msguniq option: msguniq Invocation. (line 138) * --sort-by-file, xgettext option: xgettext Invocation. (line 333) * --sort-output, msgattrib option: msgattrib Invocation. (line 168) * --sort-output, msgcat option: msgcat Invocation. (line 151) * --sort-output, msgcomm option: msgcomm Invocation. (line 136) * --sort-output, msgconv option: msgconv Invocation. (line 115) * --sort-output, msgen option: msgen Invocation. (line 117) * --sort-output, msgfilter option: msgfilter Invocation. (line 176) * --sort-output, msggrep option: msggrep Invocation. (line 192) * --sort-output, msgmerge option: msgmerge Invocation. (line 187) * --sort-output, msgunfmt option: msgunfmt Invocation. (line 153) * --sort-output, msguniq option: msguniq Invocation. (line 133) * --sort-output, xgettext option: xgettext Invocation. (line 328) * --statistics, msgfmt option: msgfmt Invocation. (line 229) * --strict, msgattrib option: msgattrib Invocation. (line 139) * --strict, msgcat option: msgcat Invocation. (line 122) * --strict, msgcomm option: msgcomm Invocation. (line 107) * --strict, msgconv option: msgconv Invocation. (line 86) * --strict, msgen option: msgen Invocation. (line 88) * --strict, msgfilter option: msgfilter Invocation. (line 147) * --strict, msgfmt option: msgfmt Invocation. (line 57) * --strict, msggrep option: msggrep Invocation. (line 164) * --strict, msgmerge option: msgmerge Invocation. (line 158) * --strict, msgunfmt option: msgunfmt Invocation. (line 124) * --strict, msguniq option: msguniq Invocation. (line 104) * --strict, xgettext option: xgettext Invocation. (line 300) * --stringtable-input, msgattrib option: msgattrib Invocation. (line 108) * --stringtable-input, msgcat option: msgcat Invocation. (line 78) * --stringtable-input, msgcmp option: msgcmp Invocation. (line 63) * --stringtable-input, msgcomm option: msgcomm Invocation. (line 76) * --stringtable-input, msgen option: msgen Invocation. (line 52) * --stringtable-input, msgexec option: msgexec Invocation. (line 60) * --stringtable-input, msgfilter option: msgfilter Invocation. (line 113) * --stringtable-input, msgfmt option: msgfmt Invocation. (line 137) * --stringtable-input, msggrep option: msggrep Invocation. (line 135) * --stringtable-input, msginit option: msginit Invocation. (line 43) * --stringtable-input, msgmerge option: msgmerge Invocation. (line 121) * --stringtable-input, msgonv option: msgconv Invocation. (line 56) * --stringtable-input, msguniq option: msguniq Invocation. (line 65) * --stringtable-output, msgattrib option: msgattrib Invocation. (line 150) * --stringtable-output, msgcat option: msgcat Invocation. (line 133) * --stringtable-output, msgcomm option: msgcomm Invocation. (line 118) * --stringtable-output, msgconv option: msgconv Invocation. (line 97) * --stringtable-output, msgen option: msgen Invocation. (line 99) * --stringtable-output, msgfilter option: msgfilter Invocation. (line 158) * --stringtable-output, msggrep option: msggrep Invocation. (line 175) * --stringtable-output, msginit option: msginit Invocation. (line 77) * --stringtable-output, msgmerge option: msgmerge Invocation. (line 169) * --stringtable-output, msgunfmt option: msgunfmt Invocation. (line 135) * --stringtable-output, msguniq option: msguniq Invocation. (line 115) * --stringtable-output, xgettext option: xgettext Invocation. (line 310) * --style, msgattrib option: msgattrib Invocation. (line 121) * --style, msgcat option <1>: The --style option. (line 6) * --style, msgcat option: msgcat Invocation. (line 104) * --style, msgcomm option: msgcomm Invocation. (line 89) * --style, msgconv option: msgconv Invocation. (line 69) * --style, msgen option: msgen Invocation. (line 71) * --style, msgfilter option: msgfilter Invocation. (line 126) * --style, msggrep option: msggrep Invocation. (line 148) * --style, msginit option: msginit Invocation. (line 67) * --style, msgmerge option: msgmerge Invocation. (line 141) * --style, msgunfmt option: msgunfmt Invocation. (line 113) * --style, msguniq option: msguniq Invocation. (line 86) * --style, xgettext option: xgettext Invocation. (line 280) * --suffix, msgmerge option: msgmerge Invocation. (line 68) * --symlink, gettextize option: gettextize Invocation. (line 63) * --tcl, msgfmt option: msgfmt Invocation. (line 43) * --tcl, msgunfmt option: msgunfmt Invocation. (line 26) * --to-code, msgcat option: msgcat Invocation. (line 87) * --to-code, msgconv option: msgconv Invocation. (line 42) * --to-code, msguniq option: msguniq Invocation. (line 74) * --translated, msgattrib option: msgattrib Invocation. (line 41) * --trigraphs, xgettext option: xgettext Invocation. (line 241) * --unique, msgcat option: msgcat Invocation. (line 65) * --unique, msgcomm option: msgcomm Invocation. (line 63) * --unique, msguniq option: msguniq Invocation. (line 53) * --untranslated, msgattrib option: msgattrib Invocation. (line 44) * --update, msgmerge option: msgmerge Invocation. (line 45) * --use-first, msgcat option: msgcat Invocation. (line 90) * --use-first, msguniq option: msguniq Invocation. (line 77) * --use-fuzzy, msgcmp option: msgcmp Invocation. (line 44) * --use-fuzzy, msgfmt option: msgfmt Invocation. (line 199) * --use-untranslated, msgcmp option: msgcmp Invocation. (line 50) * --variables, envsubst option: envsubst Invocation. (line 15) * --verbose, msgfmt option: msgfmt Invocation. (line 235) * --verbose, msgmerge option: msgmerge Invocation. (line 208) * --verbose, msgunfmt option: msgunfmt Invocation. (line 170) * --version, autopoint option: autopoint Invocation. (line 36) * --version, envsubst option: envsubst Invocation. (line 26) * --version, gettext option: gettext Invocation. (line 40) * --version, gettextize option: gettextize Invocation. (line 80) * --version, msgattrib option: msgattrib Invocation. (line 185) * --version, msgcat option: msgcat Invocation. (line 168) * --version, msgcmp option: msgcmp Invocation. (line 76) * --version, msgcomm option: msgcomm Invocation. (line 156) * --version, msgconv option: msgconv Invocation. (line 132) * --version, msgen option: msgen Invocation. (line 134) * --version, msgexec option: msgexec Invocation. (line 73) * --version, msgfilter option: msgfilter Invocation. (line 193) * --version, msgfmt option: msgfmt Invocation. (line 226) * --version, msggrep option: msggrep Invocation. (line 208) * --version, msginit option: msginit Invocation. (line 103) * --version, msgmerge option: msgmerge Invocation. (line 204) * --version, msgunfmt option: msgunfmt Invocation. (line 166) * --version, msguniq option: msguniq Invocation. (line 150) * --version, ngettext option: ngettext Invocation. (line 35) * --version, xgettext option: xgettext Invocation. (line 419) * --width, msgattrib option: msgattrib Invocation. (line 155) * --width, msgcat option: msgcat Invocation. (line 138) * --width, msgcomm option: msgcomm Invocation. (line 123) * --width, msgconv option: msgconv Invocation. (line 102) * --width, msgen option: msgen Invocation. (line 104) * --width, msgfilter option: msgfilter Invocation. (line 163) * --width, msggrep option: msggrep Invocation. (line 180) * --width, msginit option: msginit Invocation. (line 82) * --width, msgmerge option: msgmerge Invocation. (line 174) * --width, msgunfmt option: msgunfmt Invocation. (line 140) * --width, msguniq option: msguniq Invocation. (line 120) * --width, xgettext option: xgettext Invocation. (line 315) * -<, msgcat option: msgcat Invocation. (line 55) * -<, msgcomm option: msgcomm Invocation. (line 53) * ->, msgcat option: msgcat Invocation. (line 60) * ->, msgcomm option: msgcomm Invocation. (line 58) * -a, msgfmt option: msgfmt Invocation. (line 209) * -a, xgettext option: xgettext Invocation. (line 107) * -C, msgfmt option: msgfmt Invocation. (line 183) * -c, msgfmt option: msgfmt Invocation. (line 146) * -C, msggrep option: msggrep Invocation. (line 93) * -C, msgmerge option: msgmerge Invocation. (line 36) * -c, xgettext option: xgettext Invocation. (line 97) * -C, xgettext option: xgettext Invocation. (line 64) * -d, autopoint option: autopoint Invocation. (line 24) * -d, gettext option: gettext Invocation. (line 16) * -d, gettextize option: gettextize Invocation. (line 72) * -D, msgattrib option: msgattrib Invocation. (line 19) * -D, msgcat option: msgcat Invocation. (line 32) * -D, msgcmp option: msgcmp Invocation. (line 27) * -D, msgcomm option: msgcomm Invocation. (line 30) * -D, msgconv option: msgconv Invocation. (line 19) * -D, msgen option: msgen Invocation. (line 25) * -D, msgexec option: msgexec Invocation. (line 44) * -D, msgfilter option: msgfilter Invocation. (line 27) * -d, msgfmt option: msgfmt Invocation. (line 84) * -D, msgfmt option: msgfmt Invocation. (line 18) * -D, msggrep option: msggrep Invocation. (line 19) * -D, msgmerge option: msgmerge Invocation. (line 30) * -d, msgunfmt option: msgunfmt Invocation. (line 70) * -d, msguniq option: msguniq Invocation. (line 49) * -D, msguniq option: msguniq Invocation. (line 26) * -d, ngettext option: ngettext Invocation. (line 15) * -d, xgettext option: xgettext Invocation. (line 36) * -D, xgettext option: xgettext Invocation. (line 24) * -E, gettext option: gettext Invocation. (line 27) * -e, gettext option: gettext Invocation. (line 20) * -e, msgfilter option: msgfilter Invocation. (line 77) * -e, msggrep option: msggrep Invocation. (line 109) * -E, msggrep option: msggrep Invocation. (line 101) * -E, ngettext option: ngettext Invocation. (line 26) * -e, ngettext option: ngettext Invocation. (line 19) * -f, autopoint option: autopoint Invocation. (line 20) * -f, gettextize option: gettextize Invocation. (line 40) * -F, msgattrib option: msgattrib Invocation. (line 173) * -F, msgcat option: msgcat Invocation. (line 156) * -f, msgcat option: msgcat Invocation. (line 27) * -F, msgcomm option: msgcomm Invocation. (line 141) * -f, msgcomm option: msgcomm Invocation. (line 25) * -F, msgconv option: msgconv Invocation. (line 120) * -F, msgen option: msgen Invocation. (line 122) * -F, msgfilter option: msgfilter Invocation. (line 181) * -f, msgfilter option: msgfilter Invocation. (line 81) * -f, msgfmt option: msgfmt Invocation. (line 199) * -f, msggrep option: msggrep Invocation. (line 113) * -F, msggrep option: msggrep Invocation. (line 105) * -F, msgmerge option: msgmerge Invocation. (line 192) * -F, msguniq option: msguniq Invocation. (line 138) * -F, xgettext option: xgettext Invocation. (line 333) * -f, xgettext option: xgettext Invocation. (line 19) * -h, envsubst option: envsubst Invocation. (line 22) * -h, gettext option: gettext Invocation. (line 32) * -h, msgattrib option: msgattrib Invocation. (line 181) * -h, msgcat option: msgcat Invocation. (line 164) * -h, msgcmp option: msgcmp Invocation. (line 72) * -h, msgcomm option: msgcomm Invocation. (line 152) * -h, msgconv option: msgconv Invocation. (line 128) * -h, msgen option: msgen Invocation. (line 130) * -h, msgexec option: msgexec Invocation. (line 69) * -h, msgfilter option: msgfilter Invocation. (line 189) * -h, msgfmt option: msgfmt Invocation. (line 222) * -h, msggrep option: msggrep Invocation. (line 204) * -h, msginit option: msginit Invocation. (line 99) * -h, msgmerge option: msgmerge Invocation. (line 200) * -h, msgunfmt option: msgunfmt Invocation. (line 162) * -h, msguniq option: msguniq Invocation. (line 146) * -h, ngettext option: ngettext Invocation. (line 31) * -h, xgettext option: xgettext Invocation. (line 415) * -i, msgattrib option: msgattrib Invocation. (line 129) * -i, msgcat option: msgcat Invocation. (line 112) * -i, msgcomm option: msgcomm Invocation. (line 97) * -i, msgconv option: msgconv Invocation. (line 77) * -i, msgen option: msgen Invocation. (line 79) * -i, msgexec option: msgexec Invocation. (line 40) * -i, msgfilter option: msgfilter Invocation. (line 23) * -i, msggrep option: msggrep Invocation. (line 117) * -i, msginit option: msginit Invocation. (line 16) * -i, msgmerge option: msgmerge Invocation. (line 149) * -i, msgunfmt option: msgunfmt Invocation. (line 121) * -i, msguniq option: msguniq Invocation. (line 94) * -i, xgettext option: xgettext Invocation. (line 288) * -j, msgfmt option: msgfmt Invocation. (line 30) * -J, msggrep option: msggrep Invocation. (line 81) * -j, msgunfmt option: msgunfmt Invocation. (line 16) * -j, xgettext option: xgettext Invocation. (line 88) * -K, msggrep option: msggrep Invocation. (line 85) * -k, xgettext option: xgettext Invocation. (line 115) * -l, msgfmt option: msgfmt Invocation. (line 79) * -l, msginit option: msginit Invocation. (line 52) * -l, msgunfmt option: msgunfmt Invocation. (line 47) * -L, xgettext option: xgettext Invocation. (line 56) * -m, msgcmp option: msgcmp Invocation. (line 36) * -M, msggrep option: msggrep Invocation. (line 77) * -m, msgmerge option: msgmerge Invocation. (line 101) * -M, xgettext option: xgettext Invocation. (line 407) * -m, xgettext option: xgettext Invocation. (line 403) * -n, gettext option: gettext Invocation. (line 35) * -n, msgattrib option: msgattrib Invocation. (line 136) * -n, msgcat option: msgcat Invocation. (line 119) * -N, msgcmp option: msgcmp Invocation. (line 40) * -n, msgcomm option: msgcomm Invocation. (line 104) * -n, msgfilter option: msgfilter Invocation. (line 86) * -N, msggrep option: msggrep Invocation. (line 72) * -N, msgmerge option: msgmerge Invocation. (line 105) * -n, msguniq option: msguniq Invocation. (line 101) * -n, xgettext option: xgettext Invocation. (line 297) * -o, msgattrib option: msgattrib Invocation. (line 31) * -o, msgcat option: msgcat Invocation. (line 44) * -o, msgcomm option: msgcomm Invocation. (line 42) * -o, msgconv option: msgconv Invocation. (line 31) * -o, msgen option: msgen Invocation. (line 37) * -o, msgfilter option: msgfilter Invocation. (line 39) * -o, msgfmt option: msgfmt Invocation. (line 54) * -o, msggrep option: msggrep Invocation. (line 31) * -o, msginit option: msginit Invocation. (line 27) * -o, msgmerge option: msgmerge Invocation. (line 53) * -o, msgunfmt option: msgunfmt Invocation. (line 98) * -o, msguniq option: msguniq Invocation. (line 38) * -o, xgettext option: xgettext Invocation. (line 40) * -p, msgattrib option: msgattrib Invocation. (line 145) * -P, msgattrib option: msgattrib Invocation. (line 104) * -p, msgcat option: msgcat Invocation. (line 128) * -P, msgcat option: msgcat Invocation. (line 74) * -P, msgcmp option: msgcmp Invocation. (line 59) * -p, msgcomm option: msgcomm Invocation. (line 113) * -P, msgcomm option: msgcomm Invocation. (line 72) * -p, msgconv option: msgconv Invocation. (line 92) * -P, msgconv option: msgconv Invocation. (line 52) * -p, msgen option: msgen Invocation. (line 94) * -P, msgen option: msgen Invocation. (line 48) * -P, msgexec option: msgexec Invocation. (line 56) * -p, msgfilter option: msgfilter Invocation. (line 153) * -P, msgfilter option: msgfilter Invocation. (line 109) * -P, msgfmt option: msgfmt Invocation. (line 133) * -p, msggrep option: msggrep Invocation. (line 170) * -P, msggrep option: msggrep Invocation. (line 131) * -p, msginit option: msginit Invocation. (line 72) * -P, msginit option: msginit Invocation. (line 39) * -p, msgmerge option: msgmerge Invocation. (line 164) * -P, msgmerge option: msgmerge Invocation. (line 117) * -p, msgunfmt option: msgunfmt Invocation. (line 130) * -p, msguniq option: msguniq Invocation. (line 110) * -P, msguniq option: msguniq Invocation. (line 61) * -p, xgettext option: xgettext Invocation. (line 45) * -q, msgmerge option: msgmerge Invocation. (line 213) * -r, msgfmt option: msgfmt Invocation. (line 75) * -r, msgunfmt option: msgunfmt Invocation. (line 43) * -s, msgattrib option: msgattrib Invocation. (line 168) * -s, msgcat option: msgcat Invocation. (line 151) * -s, msgcomm option: msgcomm Invocation. (line 136) * -s, msgconv option: msgconv Invocation. (line 115) * -s, msgen option: msgen Invocation. (line 117) * -s, msgfilter option: msgfilter Invocation. (line 176) * -s, msgmerge option: msgmerge Invocation. (line 187) * -s, msgunfmt option: msgunfmt Invocation. (line 153) * -s, msguniq option: msguniq Invocation. (line 133) * -s, xgettext option: xgettext Invocation. (line 328) * -t, msgcat option: msgcat Invocation. (line 87) * -t, msgconv option: msgconv Invocation. (line 42) * -T, msggrep option: msggrep Invocation. (line 89) * -t, msguniq option: msguniq Invocation. (line 74) * -T, xgettext option: xgettext Invocation. (line 241) * -u, msgcat option: msgcat Invocation. (line 65) * -u, msgcomm option: msgcomm Invocation. (line 63) * -U, msgmerge option: msgmerge Invocation. (line 45) * -u, msguniq option: msguniq Invocation. (line 53) * -V, envsubst option: envsubst Invocation. (line 26) * -v, envsubst option: envsubst Invocation. (line 15) * -V, gettext option: gettext Invocation. (line 40) * -V, msgattrib option: msgattrib Invocation. (line 185) * -V, msgcat option: msgcat Invocation. (line 168) * -V, msgcmp option: msgcmp Invocation. (line 76) * -V, msgcomm option: msgcomm Invocation. (line 156) * -V, msgconv option: msgconv Invocation. (line 132) * -V, msgen option: msgen Invocation. (line 134) * -V, msgexec option: msgexec Invocation. (line 73) * -V, msgfilter option: msgfilter Invocation. (line 193) * -v, msgfmt option: msgfmt Invocation. (line 235) * -V, msgfmt option: msgfmt Invocation. (line 226) * -V, msggrep option: msggrep Invocation. (line 208) * -v, msggrep option: msggrep Invocation. (line 121) * -V, msginit option: msginit Invocation. (line 103) * -v, msgmerge option: msgmerge Invocation. (line 208) * -V, msgmerge option: msgmerge Invocation. (line 204) * -v, msgunfmt option: msgunfmt Invocation. (line 170) * -V, msgunfmt option: msgunfmt Invocation. (line 166) * -V, msguniq option: msguniq Invocation. (line 150) * -V, ngettext option: ngettext Invocation. (line 35) * -V, xgettext option: xgettext Invocation. (line 419) * -w, msgattrib option: msgattrib Invocation. (line 155) * -w, msgcat option: msgcat Invocation. (line 138) * -w, msgcomm option: msgcomm Invocation. (line 123) * -w, msgconv option: msgconv Invocation. (line 102) * -w, msgen option: msgen Invocation. (line 104) * -w, msgfilter option: msgfilter Invocation. (line 163) * -w, msggrep option: msggrep Invocation. (line 180) * -w, msginit option: msginit Invocation. (line 82) * -w, msgmerge option: msgmerge Invocation. (line 174) * -w, msgunfmt option: msgunfmt Invocation. (line 140) * -w, msguniq option: msguniq Invocation. (line 120) * -w, xgettext option: xgettext Invocation. (line 315) * -X, msggrep option: msggrep Invocation. (line 97) * -x, xgettext option: xgettext Invocation. (line 92)  File: gettext.info, Node: Variable Index, Next: PO Mode Index, Prev: Option Index, Up: Top Variable Index ************** �[index�] * Menu: * GETTEXT_LOG_UNTRANSLATED, environment variable: Prioritizing messages. (line 23) * LANG, environment variable <1>: gettext grok. (line 32) * LANG, environment variable: Locale Environment Variables. (line 17) * LANGUAGE, environment variable <1>: po/Rules-*. (line 11) * LANGUAGE, environment variable <2>: gettext grok. (line 28) * LANGUAGE, environment variable: Locale Environment Variables. (line 11) * LC_ALL, environment variable <1>: gettext grok. (line 28) * LC_ALL, environment variable: Locale Environment Variables. (line 11) * LC_COLLATE, environment variable <1>: gettext grok. (line 30) * LC_COLLATE, environment variable: Locale Environment Variables. (line 13) * LC_CTYPE, environment variable <1>: gettext grok. (line 30) * LC_CTYPE, environment variable: Locale Environment Variables. (line 13) * LC_MESSAGES, environment variable <1>: gettext grok. (line 30) * LC_MESSAGES, environment variable: Locale Environment Variables. (line 13) * LC_MONETARY, environment variable <1>: gettext grok. (line 30) * LC_MONETARY, environment variable: Locale Environment Variables. (line 13) * LC_NUMERIC, environment variable <1>: gettext grok. (line 30) * LC_NUMERIC, environment variable: Locale Environment Variables. (line 13) * LC_TIME, environment variable <1>: gettext grok. (line 30) * LC_TIME, environment variable: Locale Environment Variables. (line 13) * LINGUAS, environment variable: Installers. (line 17) * MSGEXEC_LOCATION, environment variable: msgexec Invocation. (line 18) * MSGEXEC_MSGCTXT, environment variable: msgexec Invocation. (line 18) * MSGEXEC_MSGID, environment variable: msgexec Invocation. (line 18) * MSGFILTER_LOCATION, environment variable: msgfilter Invocation. (line 11) * MSGFILTER_MSGCTXT, environment variable: msgfilter Invocation. (line 11) * MSGFILTER_MSGID, environment variable: msgfilter Invocation. (line 11) * PO_STYLE, environment variable: The --style option. (line 10) * TERM, environment variable: The TERM variable. (line 6) * TEXTDOMAIN, environment variable: sh. (line 23) * TEXTDOMAINDIR, environment variable: sh. (line 26)  File: gettext.info, Node: PO Mode Index, Next: Autoconf Macro Index, Prev: Variable Index, Up: Top PO Mode Index ************* �[index�] * Menu: * #, PO Mode command: Modifying Comments. (line 24) * ,, PO Mode command: Marking. (line 44) * ., PO Mode command: Entry Positioning. (line 20) * .emacs customizations: Installation. (line 13) * 0, PO Mode command: Main PO Commands. (line 40) * <, PO Mode command: Entry Positioning. (line 29) * =, PO Mode command: Main PO Commands. (line 47) * >, PO Mode command: Entry Positioning. (line 32) * ?, PO Mode command: Main PO Commands. (line 44) * _, PO Mode command: Main PO Commands. (line 30) * a, PO Mode command: Auxiliary. (line 40) * A, PO Mode command: Auxiliary. (line 28) * a, PO Mode command: Auxiliary. (line 21) * auxiliary PO file: Auxiliary. (line 13) * C-c C-a, PO Mode command <1>: Auxiliary. (line 25) * C-c C-a, PO Mode command: Subedit. (line 17) * C-c C-c, PO Mode command: Subedit. (line 11) * C-c C-k, PO Mode command: Subedit. (line 14) * C-j, PO Mode command: Modifying Translations. (line 26) * commands: Main PO Commands. (line 6) * comment out PO file entry: Obsolete Entries. (line 47) * consulting program sources: C Sources Context. (line 6) * consulting translations to other languages: Auxiliary. (line 6) * current entry of a PO file: Entry Positioning. (line 6) * cut and paste for translated strings: Modifying Translations. (line 74) * DEL, PO Mode command <1>: Obsolete Entries. (line 32) * DEL, PO Mode command: Fuzzy Entries. (line 60) * editing comments: Modifying Comments. (line 6) * editing multiple entries: Subedit. (line 62) * editing translations: Modifying Translations. (line 6) * etags, using for marking strings: Marking. (line 17) * exiting PO subedit: Subedit. (line 20) * F, PO Mode command: Fuzzy Entries. (line 39) * f, PO Mode command: Fuzzy Entries. (line 39) * F, PO Mode command: Fuzzy Entries. (line 33) * f, PO Mode command: Fuzzy Entries. (line 30) * find source fragment for a PO file entry: C Sources Context. (line 33) * h, PO Mode command: Main PO Commands. (line 44) * installing PO mode: Installation. (line 13) * K, PO Mode command: Modifying Comments. (line 27) * k, PO Mode command <1>: Modifying Translations. (line 30) * k, PO Mode command: Untranslated Entries. (line 32) * LFD, PO Mode command: Modifying Translations. (line 26) * looking at the source to aid translation: C Sources Context. (line 6) * m, PO Mode command: Entry Positioning. (line 35) * M-,, PO Mode command: Marking. (line 48) * M-., PO Mode command: Marking. (line 51) * M-A, PO Mode command: Auxiliary. (line 32) * M-S, PO Mode command: C Sources Context. (line 89) * M-s, PO Mode command: C Sources Context. (line 53) * M-S, PO Mode command: C Sources Context. (line 49) * M-s, PO Mode command: C Sources Context. (line 41) * marking strings for translation: Marking. (line 6) * moving by fuzzy entries: Fuzzy Entries. (line 24) * moving by obsolete entries: Obsolete Entries. (line 22) * moving by translated entries: Translated Entries. (line 12) * moving by untranslated entries: Untranslated Entries. (line 18) * moving through a PO file: Entry Positioning. (line 14) * n, PO Mode command: Entry Positioning. (line 23) * next-error, stepping through PO file validation results: Main PO Commands. (line 99) * normalize, PO Mode command: Auxiliary. (line 64) * O, PO Mode command: Obsolete Entries. (line 36) * o, PO Mode command: Obsolete Entries. (line 36) * O, PO Mode command: Obsolete Entries. (line 29) * o, PO Mode command: Obsolete Entries. (line 26) * obsolete active entry: Obsolete Entries. (line 47) * p, PO Mode command: Entry Positioning. (line 26) * pending subedits: Subedit. (line 73) * po-auto-edit-with-msgid, PO Mode variable: Modifying Translations. (line 57) * po-auto-fuzzy-on-edit, PO Mode variable: Translated Entries. (line 28) * po-auto-select-on-unfuzzy, PO Mode variable: Fuzzy Entries. (line 44) * po-confirm-and-quit, PO Mode command: Main PO Commands. (line 62) * po-consider-as-auxiliary, PO Mode command: Auxiliary. (line 36) * po-consider-source-path, PO Mode command: C Sources Context. (line 89) * po-current-entry, PO Mode command: Entry Positioning. (line 46) * po-cycle-auxiliary, PO Mode command: Auxiliary. (line 40) * po-cycle-source-reference, PO Mode command: C Sources Context. (line 53) * po-edit-comment, PO Mode command: Modifying Comments. (line 46) * po-edit-msgstr, PO Mode command: Modifying Translations. (line 42) * po-exchange-location, PO Mode command: Entry Positioning. (line 106) * po-fade-out-entry, PO Mode command <1>: Obsolete Entries. (line 47) * po-fade-out-entry, PO Mode command: Fuzzy Entries. (line 60) * po-first-entry, PO Mode command: Entry Positioning. (line 74) * po-help, PO Mode command: Main PO Commands. (line 83) * po-ignore-as-auxiliary, PO Mode command: Auxiliary. (line 36) * po-ignore-source-path, PO Mode command: C Sources Context. (line 89) * po-kill-comment, PO Mode command: Modifying Comments. (line 60) * po-kill-msgstr, PO Mode command <1>: Modifying Translations. (line 74) * po-kill-msgstr, PO Mode command: Untranslated Entries. (line 40) * po-kill-ring-save-comment, PO Mode command: Modifying Comments. (line 60) * po-kill-ring-save-msgstr, PO Mode command: Modifying Translations. (line 74) * po-last-entry, PO Mode command: Entry Positioning. (line 74) * po-mark-translatable, PO Mode command: Marking. (line 98) * po-msgid-to-msgstr, PO Mode command: Modifying Translations. (line 52) * po-next-entry, PO Mode command: Entry Positioning. (line 69) * po-next-fuzzy-entry, PO Mode command: Fuzzy Entries. (line 39) * po-next-obsolete-entry, PO Mode command: Obsolete Entries. (line 36) * po-next-translated-entry, PO Mode command: Translated Entries. (line 23) * po-next-untranslated-entry, PO Mode command: Untranslated Entries. (line 35) * po-normalize, PO Mode command: Normalizing. (line 31) * po-other-window, PO Mode command: Main PO Commands. (line 72) * po-pop-location, PO Mode command: Entry Positioning. (line 92) * po-previous-entry, PO Mode command: Entry Positioning. (line 69) * po-previous-fuzzy-entry, PO Mode command: Fuzzy Entries. (line 39) * po-previous-obsolete-entry, PO Mode command: Obsolete Entries. (line 36) * po-previous-translated-entry, PO Mode command: Translated Entries. (line 23) * po-previous-untransted-entry, PO Mode command: Untranslated Entries. (line 35) * po-push-location, PO Mode command: Entry Positioning. (line 92) * po-quit, PO Mode command: Main PO Commands. (line 62) * po-select-auxiliary, PO Mode command: Auxiliary. (line 49) * po-select-mark-and-mark, PO Mode command: Marking. (line 98) * po-select-source-reference, PO Mode command: C Sources Context. (line 53) * po-statistics, PO Mode command: Main PO Commands. (line 87) * po-subedit-abort, PO Mode command: Subedit. (line 27) * po-subedit-cycle-auxiliary, PO Mode command: Subedit. (line 35) * po-subedit-exit, PO Mode command: Subedit. (line 20) * po-subedit-mode-hook, PO Mode variable: Modifying Comments. (line 57) * po-tags-search, PO Mode command: Marking. (line 56) * po-undo, PO Mode command: Main PO Commands. (line 53) * po-unfuzzy, PO Mode command: Fuzzy Entries. (line 44) * po-validate, PO Mode command: Main PO Commands. (line 92) * po-yank-comment, PO Mode command: Modifying Comments. (line 60) * po-yank-msgstr, PO Mode command: Modifying Translations. (line 98) * q, PO Mode command: Main PO Commands. (line 62) * Q, PO Mode command: Main PO Commands. (line 62) * q, PO Mode command: Main PO Commands. (line 36) * Q, PO Mode command: Main PO Commands. (line 33) * r, PO Mode command: Entry Positioning. (line 39) * RET, PO Mode command: Modifying Translations. (line 22) * S, PO Mode command: C Sources Context. (line 89) * s, PO Mode command: C Sources Context. (line 53) * S, PO Mode command: C Sources Context. (line 45) * s, PO Mode command: C Sources Context. (line 37) * starting a string translation: Modifying Translations. (line 63) * string normalization in entries: Normalizing. (line 30) * subedit minor mode: Subedit. (line 6) * T, PO Mode command: Translated Entries. (line 23) * t, PO Mode command: Translated Entries. (line 23) * T, PO Mode command: Translated Entries. (line 19) * t, PO Mode command: Translated Entries. (line 16) * TAB, PO Mode command: Fuzzy Entries. (line 36) * TAGS, and marking translatable strings: Marking. (line 31) * U, PO Mode command: Untranslated Entries. (line 35) * u, PO Mode command: Untranslated Entries. (line 35) * U, PO Mode command: Untranslated Entries. (line 28) * u, PO Mode command: Untranslated Entries. (line 25) * use the source, Luke: C Sources Context. (line 6) * using obsolete translations to make new entries: Modifying Translations. (line 124) * using translation compendia: Compendium. (line 6) * V, PO Mode command: Main PO Commands. (line 50) * W, PO Mode command: Modifying Comments. (line 31) * w, PO Mode command: Modifying Translations. (line 34) * x, PO Mode command: Entry Positioning. (line 42) * Y, PO Mode command: Modifying Comments. (line 35) * y, PO Mode command: Modifying Translations. (line 38)  File: gettext.info, Node: Autoconf Macro Index, Next: Index, Prev: PO Mode Index, Up: Top Autoconf Macro Index ******************** �[index�] * Menu: * AM_GNU_GETTEXT: AM_GNU_GETTEXT. (line 6) * AM_GNU_GETTEXT_INTL_SUBDIR: AM_GNU_GETTEXT_INTL_SUBDIR. (line 6) * AM_GNU_GETTEXT_NEED: AM_GNU_GETTEXT_NEED. (line 6) * AM_GNU_GETTEXT_VERSION: AM_GNU_GETTEXT_VERSION. (line 6) * AM_ICONV: AM_ICONV. (line 6) * AM_PO_SUBDIRS: AM_PO_SUBDIRS. (line 6) * AM_XGETTEXT_OPTION: AM_XGETTEXT_OPTION. (line 6)  File: gettext.info, Node: Index, Prev: Autoconf Macro Index, Up: Top General Index ************* �[index�] * Menu: * _, a macro to mark strings for translation: Mark Keywords. (line 45) * _nl_msg_cat_cntr: gettext grok. (line 62) * ABOUT-NLS file: Installing Localizations. (line 13) * acconfig.h file: acconfig. (line 6) * accumulating translations: Creating Compendia. (line 14) * aclocal.m4 file: aclocal. (line 6) * adding keywords, xgettext: xgettext Invocation. (line 119) * ambiguities: Preparing Strings. (line 41) * apply a filter to translations: msgfilter Invocation. (line 8) * apply command to all translations in a catalog: msgexec Invocation. (line 8) * Arabic digits: c-format. (line 28) * attribute manipulation: msgattrib Invocation. (line 8) * attribute, fuzzy: Fuzzy Entries. (line 6) * attributes of a PO file entry: Fuzzy Entries. (line 6) * attributes, manipulating: Manipulating. (line 56) * autoconf macros for gettext: autoconf macros. (line 6) * autopoint program, usage: autopoint Invocation. (line 6) * auxiliary PO file: Auxiliary. (line 13) * available translations: Installing Localizations. (line 6) * awk: gawk. (line 6) * awk-format flag: PO Files. (line 149) * backup old file, and msgmerge program: msgmerge Invocation. (line 65) * bash: bash. (line 6) * bibliography: References. (line 6) * big picture: Overview. (line 6) * bind_textdomain_codeset: Charset conversion. (line 28) * Boost format strings: xgettext Invocation. (line 254) * boost-format flag: PO Files. (line 198) * bug report address: Introduction. (line 24) * C and C-like languages: C. (line 6) * C trigraphs: xgettext Invocation. (line 241) * C#: C#. (line 6) * C# mode, and msgfmt program: msgfmt Invocation. (line 36) * C# mode, and msgunfmt program: msgunfmt Invocation. (line 19) * C# resources mode, and msgfmt program: msgfmt Invocation. (line 40) * C# resources mode, and msgunfmt program: msgunfmt Invocation. (line 23) * C#, string concatenation: Preparing Strings. (line 168) * c-format flag: PO Files. (line 90) * c-format, and xgettext: c-format Flag. (line 48) * catalog encoding and msgexec output: msgexec Invocation. (line 25) * catclose, a catgets function: Interface to catgets. (line 44) * catgets, a catgets function: Interface to catgets. (line 25) * catgets, X/Open specification: catgets. (line 6) * catopen, a catgets function: Interface to catgets. (line 13) * character encoding: Aspects. (line 67) * charset conversion at runtime: Charset conversion. (line 6) * charset of PO files: Header Entry. (line 106) * check format strings: msgfmt Invocation. (line 150) * checking of translations: Manipulating. (line 41) * clisp: Common Lisp. (line 6) * clisp C sources: clisp C. (line 6) * codeset: Aspects. (line 67) * comments in PO files: PO Files. (line 307) * comments, automatic: PO Files. (line 36) * comments, extracted: PO Files. (line 36) * comments, translator: PO Files. (line 36) * Common Lisp: Common Lisp. (line 6) * compare PO files: msgcmp Invocation. (line 8) * comparison of interfaces: Comparison. (line 6) * compatibility with X/Open msgfmt: msgfmt Invocation. (line 183) * compendium: Compendium. (line 6) * compendium, creating: Creating Compendia. (line 6) * concatenate PO files: msgcat Invocation. (line 8) * concatenating PO files into a compendium: Creating Compendia. (line 14) * concatenation of strings: Preparing Strings. (line 117) * config.h.in file: config.h.in. (line 6) * context: Contexts. (line 6) * context, argument specification in xgettext: xgettext Invocation. (line 119) * context, in MO files: MO Files. (line 71) * context, in PO files: PO Files. (line 202) * control characters: Preparing Strings. (line 190) * convert binary message catalog into PO file: msgunfmt Invocation. (line 8) * convert translations to a different encoding: msgconv Invocation. (line 8) * converting a package to use gettext: Prerequisites. (line 6) * country codes: Country Codes. (line 6) * create new PO file: msginit Invocation. (line 8) * creating a new PO file: Creating. (line 6) * creating compendia: Creating Compendia. (line 6) * csharp-format flag: PO Files. (line 145) * currency symbols: Aspects. (line 79) * date format: Aspects. (line 84) * dcngettext: Plural forms. (line 161) * dcpgettext: Contexts. (line 56) * dcpgettext_expr: Contexts. (line 112) * debugging messages marked as format strings: xgettext Invocation. (line 258) * dialect: Manipulating. (line 28) * disabling NLS: lib/gettext.h. (line 6) * distribution tarball: Release Management. (line 6) * dngettext: Plural forms. (line 153) * dollar substitution: envsubst Invocation. (line 8) * domain ambiguities: Ambiguities. (line 6) * dpgettext: Contexts. (line 56) * dpgettext_expr: Contexts. (line 112) * duplicate elimination: Manipulating. (line 45) * duplicate removal: msguniq Invocation. (line 8) * editing comments in PO files: Modifying Comments. (line 6) * Editing PO Files: Editing. (line 6) * editing translations: Modifying Translations. (line 6) * elisp-format flag: PO Files. (line 125) * Emacs Lisp: Emacs Lisp. (line 6) * Emacs PO Mode: PO Mode. (line 6) * encoding: Aspects. (line 67) * encoding conversion: Manipulating. (line 17) * encoding conversion at runtime: Charset conversion. (line 6) * encoding for your language: Header Entry. (line 135) * encoding list: Header Entry. (line 119) * encoding of PO files: Header Entry. (line 106) * environment variables: envsubst Invocation. (line 8) * envsubst program, usage: envsubst Invocation. (line 6) * eval_gettext function, usage: eval_gettext Invocation. (line 6) * eval_ngettext function, usage: eval_ngettext Invocation. (line 6) * evolution of packages: Overview. (line 127) * extracting parts of a PO file into a compendium: Creating Compendia. (line 65) * FDL, GNU Free Documentation License: GNU FDL. (line 6) * file format, .mo: MO Files. (line 6) * file format, .po: PO Files. (line 6) * files, .po and .mo: Files. (line 6) * files, .pot: Overview. (line 67) * filter messages according to attributes: msgattrib Invocation. (line 8) * find common messages: msgcomm Invocation. (line 8) * force use of fuzzy entries: msgfmt Invocation. (line 199) * format strings: c-format Flag. (line 6) * Free Pascal: Pascal. (line 6) * function attribute, __format__: xgettext Invocation. (line 205) * function attribute, __format_arg__: xgettext Invocation. (line 219) * fuzzy entries: Fuzzy Entries. (line 6) * fuzzy flag: PO Files. (line 80) * gawk: gawk. (line 6) * gcc-internal-format flag: PO Files. (line 177) * GCC-source: GCC-source. (line 6) * generate binary message catalog from PO file: msgfmt Invocation. (line 8) * generate translation catalog in English: msgen Invocation. (line 8) * gettext files: Adjusting Files. (line 6) * gettext installation: Installation. (line 6) * gettext interface: Interface to gettext. (line 6) * gettext program, usage: gettext Invocation. (line 6) * gettext vs catgets: Comparison. (line 6) * gettext, a programmer's view: gettext. (line 6) * gettext.h file: lib/gettext.h. (line 6) * gettextize program, usage: gettextize Invocation. (line 34) * gfc-internal-format flag: PO Files. (line 181) * GNOME PO file editor: Gtranslator. (line 6) * GPL, GNU General Public License: GNU GPL. (line 6) * GUI programs: Contexts. (line 6) * guile: Scheme. (line 6) * hash table, inside MO files: MO Files. (line 55) * he, she, and they: Introduction. (line 15) * header entry of a PO file: Header Entry. (line 6) * help option: Preparing Strings. (line 109) * history of GNU gettext: History. (line 6) * i18n: Concepts. (line 6) * importing PO files: Normalizing. (line 55) * include file libintl.h <1>: lib/gettext.h. (line 29) * include file libintl.h <2>: Comparison. (line 33) * include file libintl.h <3>: Importing. (line 11) * include file libintl.h: Overview. (line 57) * initialization: Triggering. (line 6) * initialize new PO file: msginit Invocation. (line 8) * initialize translations from a compendium: Using Compendia. (line 12) * installing gettext: Installation. (line 6) * interface to catgets: Interface to catgets. (line 6) * internationalization: Concepts. (line 16) * inttypes.h: Preparing Strings. (line 133) * ISO 3166: Country Codes. (line 6) * ISO 639: Language Codes. (line 6) * Java: Java. (line 6) * Java mode, and msgfmt program: msgfmt Invocation. (line 30) * Java mode, and msgunfmt program: msgunfmt Invocation. (line 16) * Java, string concatenation: Preparing Strings. (line 168) * java-format flag: PO Files. (line 141) * KDE format strings: xgettext Invocation. (line 250) * KDE PO file editor: KBabel. (line 6) * kde-format flag: PO Files. (line 194) * keyboard accelerator checking: msgfmt Invocation. (line 187) * l10n: Concepts. (line 6) * language codes: Language Codes. (line 6) * language selection: Locale Environment Variables. (line 6) * language selection at runtime: gettext grok. (line 14) * large package: Ambiguities. (line 6) * LGPL, GNU Lesser General Public License: GNU LGPL. (line 6) * libiconv library: AM_ICONV. (line 21) * libintl for C#: C#. (line 178) * libintl for Java: Java. (line 105) * libintl library: AM_GNU_GETTEXT. (line 53) * librep Lisp: librep. (line 6) * librep-format flag: PO Files. (line 129) * License, GNU FDL: GNU FDL. (line 6) * License, GNU GPL: GNU GPL. (line 6) * License, GNU LGPL: GNU LGPL. (line 6) * Licenses: Licenses. (line 6) * LINGUAS file: po/LINGUAS. (line 6) * link with libintl: Overview. (line 62) * Linux <1>: Header Entry. (line 132) * Linux <2>: Overview. (line 62) * Linux: Aspects. (line 125) * Lisp: Common Lisp. (line 6) * lisp-format flag: PO Files. (line 121) * list of translation teams, where to find: Header Entry. (line 59) * locale categories: Aspects. (line 61) * locale category, LC_ALL: Triggering. (line 23) * locale category, LC_COLLATE: Triggering. (line 53) * locale category, LC_CTYPE <1>: Triggering. (line 23) * locale category, LC_CTYPE: Aspects. (line 67) * locale category, LC_MESSAGES <1>: Triggering. (line 53) * locale category, LC_MESSAGES: Aspects. (line 108) * locale category, LC_MONETARY <1>: Triggering. (line 53) * locale category, LC_MONETARY: Aspects. (line 79) * locale category, LC_NUMERIC <1>: Triggering. (line 53) * locale category, LC_NUMERIC: Aspects. (line 94) * locale category, LC_RESPONSES: Triggering. (line 53) * locale category, LC_TIME <1>: Triggering. (line 53) * locale category, LC_TIME: Aspects. (line 84) * locale program: Header Entry. (line 112) * localization: Concepts. (line 26) * lookup message translation <1>: eval_gettext Invocation. (line 8) * lookup message translation: gettext Invocation. (line 9) * lookup plural message translation <1>: eval_ngettext Invocation. (line 8) * lookup plural message translation: ngettext Invocation. (line 8) * magic signature of MO files: MO Files. (line 9) * Makefile.in.in extensions: po/Rules-*. (line 6) * Makevars file: po/Makevars. (line 6) * manipulating PO files: Manipulating. (line 6) * marking Perl sources: Perl. (line 93) * marking string initializers: Special cases. (line 6) * marking strings that require translation: Mark Keywords. (line 6) * marking strings, preparations: Preparing Strings. (line 6) * marking translatable strings: Overview. (line 34) * markup: Preparing Strings. (line 190) * menu entries: Contexts. (line 6) * menu, keyboard accelerator support: msgfmt Invocation. (line 187) * merge PO files: msgcat Invocation. (line 8) * merging two PO files: Manipulating. (line 10) * message catalog files location: Locating Catalogs. (line 6) * messages: Aspects. (line 108) * migration from earlier versions of gettext: Prerequisites. (line 6) * mkinstalldirs file: mkinstalldirs. (line 6) * mnemonics of menu entries: msgfmt Invocation. (line 187) * MO file's format: MO Files. (line 6) * modify message attributes: msgattrib Invocation. (line 62) * msgattrib program, usage: msgattrib Invocation. (line 6) * msgcat program, usage: msgcat Invocation. (line 6) * msgcmp program, usage: msgcmp Invocation. (line 6) * msgcomm program, usage: msgcomm Invocation. (line 6) * msgconv program, usage: msgconv Invocation. (line 6) * msgctxt: PO Files. (line 202) * msgen program, usage: msgen Invocation. (line 6) * msgexec program, usage: msgexec Invocation. (line 6) * msgfilter filter and catalog encoding: msgfilter Invocation. (line 53) * msgfilter program, usage: msgfilter Invocation. (line 6) * msgfmt program, usage: msgfmt Invocation. (line 6) * msggrep program, usage: msggrep Invocation. (line 6) * msgid: PO Files. (line 56) * msgid_plural: PO Files. (line 222) * msginit program, usage: msginit Invocation. (line 6) * msgmerge program, usage: msgmerge Invocation. (line 6) * msgstr: PO Files. (line 56) * msgunfmt program, usage: msgunfmt Invocation. (line 6) * msguniq program, usage: msguniq Invocation. (line 6) * multi-line strings: Normalizing. (line 65) * N_, a convenience macro: Comparison. (line 41) * Native Language Support: Concepts. (line 51) * Natural Language Support: Concepts. (line 51) * newlines in PO files: PO Files. (line 302) * ngettext: Plural forms. (line 84) * ngettext program, usage: ngettext Invocation. (line 6) * NLS: Concepts. (line 51) * no-awk-format flag: PO Files. (line 150) * no-boost-format flag: PO Files. (line 199) * no-c-format flag: PO Files. (line 91) * no-c-format, and xgettext: c-format Flag. (line 48) * no-csharp-format flag: PO Files. (line 146) * no-elisp-format flag: PO Files. (line 126) * no-gcc-internal-format flag: PO Files. (line 178) * no-gfc-internal-format flag: PO Files. (line 182) * no-java-format flag: PO Files. (line 142) * no-kde-format flag: PO Files. (line 195) * no-librep-format flag: PO Files. (line 130) * no-lisp-format flag: PO Files. (line 122) * no-objc-format flag: PO Files. (line 110) * no-object-pascal-format flag: PO Files. (line 154) * no-perl-brace-format flag: PO Files. (line 170) * no-perl-format flag: PO Files. (line 166) * no-php-format flag: PO Files. (line 174) * no-python-format flag: PO Files. (line 118) * no-qt-format flag: PO Files. (line 187) * no-qt-plural-format flag: PO Files. (line 191) * no-scheme-format flag: PO Files. (line 134) * no-sh-format flag: PO Files. (line 114) * no-smalltalk-format flag: PO Files. (line 138) * no-tcl-format flag: PO Files. (line 162) * no-ycp-format flag: PO Files. (line 158) * nplurals, in a PO file header: Plural forms. (line 178) * number format: Aspects. (line 94) * objc-format flag: PO Files. (line 109) * Object Pascal: Pascal. (line 6) * object-pascal-format flag: PO Files. (line 153) * obsolete entries: Obsolete Entries. (line 6) * optimization of gettext functions: Optimized gettext. (line 6) * orthography: Manipulating. (line 28) * outdigits: c-format. (line 28) * output to stdout, xgettext: xgettext Invocation. (line 48) * overview of gettext: Overview. (line 6) * package and version declaration in configure.ac: configure.ac. (line 9) * package build and installation options: Installers. (line 6) * package distributor's view of gettext: Installers. (line 6) * package installer's view of gettext: Installers. (line 6) * package maintainer's view of gettext: Maintainers. (line 6) * paragraphs: Preparing Strings. (line 101) * Pascal: Pascal. (line 6) * Perl: Perl. (line 6) * Perl default keywords: Default Keywords. (line 6) * Perl invalid string interpolation: Interpolation I. (line 6) * Perl long lines: Long Lines. (line 6) * Perl parentheses: Parentheses. (line 6) * Perl pitfalls: Perl Pitfalls. (line 6) * Perl quote-like expressions: Quote-like Expressions. (line 6) * Perl special keywords for hash-lookups: Special Keywords. (line 6) * Perl valid string interpolation: Interpolation II. (line 6) * perl-brace-format flag: PO Files. (line 169) * perl-format flag: PO Files. (line 165) * pgettext: Contexts. (line 33) * pgettext_expr: Contexts. (line 112) * PHP: PHP. (line 6) * php-format flag: PO Files. (line 173) * Pike: Pike. (line 6) * plural form formulas: Plural forms. (line 198) * plural forms: Plural forms. (line 6) * plural forms, in MO files: MO Files. (line 74) * plural forms, in PO files: PO Files. (line 222) * plural forms, translating: Translating plural forms. (line 6) * plural, in a PO file header: Plural forms. (line 178) * PO files' format: PO Files. (line 6) * PO mode (Emacs) commands: Main PO Commands. (line 6) * PO template file: Template. (line 6) * po_file_domains: libgettextpo. (line 41) * po_file_free: libgettextpo. (line 36) * po_file_read: libgettextpo. (line 30) * po_message_iterator: libgettextpo. (line 50) * po_message_iterator_free: libgettextpo. (line 57) * po_message_msgid: libgettextpo. (line 70) * po_message_msgid_plural: libgettextpo. (line 75) * po_message_msgstr: libgettextpo. (line 80) * po_message_msgstr_plural: libgettextpo. (line 86) * po_next_message: libgettextpo. (line 62) * portability problems with sed: msgfilter Invocation. (line 64) * POTFILES.in file: po/POTFILES.in. (line 6) * preparing programs for translation: Sources. (line 6) * preparing shell scripts for translation: Preparing Shell Scripts. (line 6) * problems with catgets interface: Problems with catgets. (line 6) * programming languages: Language Implementors. (line 6) * Python: Python. (line 6) * python-format flag: PO Files. (line 117) * Qt format strings: xgettext Invocation. (line 246) * Qt mode, and msgfmt program: msgfmt Invocation. (line 46) * qt-format flag: PO Files. (line 186) * qt-plural-format flag: PO Files. (line 190) * quotation marks <1>: po/Rules-*. (line 11) * quotation marks: Header Entry. (line 186) * quote characters, use in PO files: Header Entry. (line 186) * range: flag: PO Files. (line 253) * recode-sr-latin program: msgfilter Invocation. (line 92) * related reading: References. (line 6) * release: Release Management. (line 6) * RST: RST. (line 6) * Scheme: Scheme. (line 6) * scheme-format flag: PO Files. (line 133) * scripting languages: Language Implementors. (line 6) * search messages in a catalog: msggrep Invocation. (line 8) * selecting message language: Locale Environment Variables. (line 6) * sentences: Preparing Strings. (line 44) * setting up gettext at build time: Installers. (line 6) * setting up gettext at run time: Locale Environment Variables. (line 6) * several domains: Ambiguities. (line 6) * sex: Introduction. (line 15) * sh-format flag: PO Files. (line 113) * she, he, and they: Introduction. (line 15) * shell format string: envsubst Invocation. (line 8) * shell scripts: sh. (line 6) * Smalltalk: Smalltalk. (line 6) * smalltalk-format flag: PO Files. (line 137) * sorting msgcat output: msgcat Invocation. (line 151) * sorting msgmerge output: msgmerge Invocation. (line 187) * sorting msgunfmt output: msgunfmt Invocation. (line 153) * sorting output of xgettext: xgettext Invocation. (line 328) * specifying plural form in a PO file: Plural forms. (line 178) * standard output, and msgcat: msgcat Invocation. (line 47) * standard output, and msgmerge program: msgmerge Invocation. (line 56) * string concatenation: Preparing Strings. (line 117) * string normalization in entries: Normalizing. (line 6) * style: Preparing Strings. (line 24) * supported languages, xgettext: xgettext Invocation. (line 56) * Tcl: Tcl. (line 6) * Tcl mode, and msgfmt program: msgfmt Invocation. (line 43) * Tcl mode, and msgunfmt program: msgunfmt Invocation. (line 26) * tcl-format flag: PO Files. (line 161) * template PO file: Overview. (line 67) * testing .po files for equivalence: xgettext Invocation. (line 338) * Tk's scripting language: Tcl. (line 6) * translated entries: Translated Entries. (line 6) * translating menu entries: Contexts. (line 6) * translation aspects: Aspects. (line 6) * Translation Matrix: Installing Localizations. (line 6) * Translation Project: Why. (line 17) * turning off NLS support: lib/gettext.h. (line 6) * tutorial of gettext usage: Overview. (line 6) * unify duplicate translations: msguniq Invocation. (line 8) * untranslated entries: Untranslated Entries. (line 6) * update translations from a compendium: Using Compendia. (line 20) * upgrading to new versions of gettext: Prerequisites. (line 6) * version control for backup files, msgmerge: msgmerge Invocation. (line 71) * wxWidgets library: wxWidgets. (line 6) * xargs, and output from msgexec: msgexec Invocation. (line 14) * xgettext program, usage: xgettext Invocation. (line 6) * xmodmap program, and typing quotation marks: Header Entry. (line 198) * YaST2 scripting language: YCP. (line 6) * YCP: YCP. (line 6) * ycp-format flag: PO Files. (line 157)  Tag Table: Node: Top2956 Node: Introduction17401 Node: Why19024 Ref: Why-Footnote-122238 Node: Concepts22394 Node: Aspects25815 Node: Files32349 Node: Overview34258 Node: Users44194 Node: System Installation45105 Node: Setting the GUI Locale46797 Node: Setting the POSIX Locale48173 Node: Locale Names49112 Node: Locale Environment Variables51517 Node: The LANGUAGE variable53730 Node: Installing Localizations55630 Node: PO Files56985 Ref: PO Files-Footnote-169122 Node: Sources69249 Node: Importing70475 Node: Triggering71158 Node: Preparing Strings74358 Node: Mark Keywords83401 Node: Marking87861 Node: c-format Flag95591 Node: Special cases99510 Node: Bug Report Address102253 Node: Names104218 Node: Libraries108503 Node: Template111540 Node: xgettext Invocation112265 Node: Creating127823 Node: msginit Invocation128708 Node: Header Entry131610 Node: Updating140573 Node: msgmerge Invocation140788 Node: Editing146578 Node: KBabel146936 Node: Gtranslator147074 Node: PO Mode147216 Node: Installation148870 Node: Main PO Commands150834 Node: Entry Positioning155922 Node: Normalizing161390 Node: Translated Entries165884 Node: Fuzzy Entries167242 Node: Untranslated Entries170423 Node: Obsolete Entries172355 Node: Modifying Translations175580 Node: Modifying Comments183549 Node: Subedit187976 Node: C Sources Context191872 Node: Auxiliary196996 Node: Compendium200212 Node: Creating Compendia200827 Node: Using Compendia203311 Node: Manipulating204251 Node: msgcat Invocation208079 Node: msgconv Invocation212833 Node: msggrep Invocation216288 Node: msgfilter Invocation222446 Node: msguniq Invocation228985 Node: msgcomm Invocation233150 Node: msgcmp Invocation237471 Node: msgattrib Invocation239628 Node: msgen Invocation244589 Node: msgexec Invocation248441 Node: Colorizing251020 Node: The --color option252049 Node: The TERM variable253681 Node: The --style option255133 Node: Style rules256441 Node: Customizing less263183 Node: libgettextpo264586 Node: Binaries269702 Node: msgfmt Invocation270046 Node: msgunfmt Invocation277198 Node: MO Files281636 Node: Programmers290214 Node: catgets291396 Node: Interface to catgets292810 Node: Problems with catgets294819 Node: gettext295734 Node: Interface to gettext297237 Node: Ambiguities299567 Node: Locating Catalogs302282 Ref: Locating Catalogs-Footnote-1303512 Ref: Locating Catalogs-Footnote-2303738 Node: Charset conversion303887 Node: Contexts306341 Node: Plural forms311847 Ref: Plural forms-Footnote-1327784 Node: Optimized gettext327906 Node: Comparison329245 Node: Using libintl.a333515 Node: gettext grok333958 Node: Temp Programmers336599 Node: Temp Implementations337127 Node: Temp catgets338507 Node: Temp WSI340208 Node: Temp Notes342210 Node: Translators342713 Node: Trans Intro 0343248 Node: Trans Intro 1345997 Node: Discussions347961 Node: Organization351619 Node: Central Coordination353695 Node: National Teams354838 Node: Sub-Cultures357365 Node: Organizational Ideas358302 Node: Mailing Lists359323 Node: Information Flow361146 Node: Translating plural forms363400 Node: Prioritizing messages366769 Node: Maintainers371076 Node: Flat and Non-Flat373032 Node: Prerequisites374525 Node: gettextize Invocation378682 Node: Adjusting Files386091 Node: po/POTFILES.in387880 Node: po/LINGUAS389129 Node: po/Makevars390821 Node: po/Rules-*391763 Node: configure.ac393234 Node: config.guess396256 Node: mkinstalldirs397611 Node: aclocal398016 Node: acconfig400030 Node: config.h.in400530 Node: Makefile401998 Node: src/Makefile404595 Node: lib/gettext.h409316 Node: autoconf macros411564 Node: AM_GNU_GETTEXT412406 Node: AM_GNU_GETTEXT_VERSION416371 Node: AM_GNU_GETTEXT_NEED416826 Node: AM_GNU_GETTEXT_INTL_SUBDIR417719 Node: AM_PO_SUBDIRS418374 Node: AM_XGETTEXT_OPTION419169 Node: AM_ICONV420039 Node: CVS Issues422254 Node: Distributed CVS422845 Node: Files under CVS424773 Node: autopoint Invocation428049 Node: Release Management429893 Node: Installers430406 Node: Programming Languages431633 Node: Language Implementors432459 Node: Programmers for other Languages437287 Node: Translators for other Languages437871 Node: c-format439568 Node: objc-format441287 Node: sh-format441642 Node: python-format442447 Node: lisp-format442888 Node: elisp-format443217 Node: librep-format443710 Node: scheme-format444113 Node: smalltalk-format444392 Node: java-format444895 Node: csharp-format445346 Node: awk-format445724 Node: object-pascal-format446052 Node: ycp-format446438 Node: tcl-format446840 Node: perl-format447138 Node: php-format447886 Node: gcc-internal-format448254 Node: gfc-internal-format449309 Node: qt-format450006 Node: qt-plural-format450447 Node: kde-format450802 Node: boost-format451215 Node: Maintainers for other Languages451763 Node: List of Programming Languages453001 Node: C454284 Node: sh455584 Node: Preparing Shell Scripts456858 Node: gettext.sh460250 Node: gettext Invocation460800 Node: ngettext Invocation462724 Node: envsubst Invocation464485 Node: eval_gettext Invocation465906 Node: eval_ngettext Invocation466367 Node: bash466881 Node: Python468860 Node: Common Lisp471183 Node: clisp C471983 Node: Emacs Lisp472698 Node: librep473424 Node: Scheme474159 Node: Smalltalk474943 Node: Java475977 Node: C#481773 Node: gawk490999 Node: Pascal491911 Node: wxWidgets493219 Node: YCP494126 Node: Tcl494865 Node: Perl496275 Node: General Problems499283 Node: Default Keywords504771 Node: Special Keywords505726 Node: Quote-like Expressions507242 Node: Interpolation I509520 Node: Interpolation II513313 Node: Parentheses515681 Node: Long Lines517202 Node: Perl Pitfalls519050 Node: PHP523295 Node: Pike524226 Node: GCC-source524887 Node: List of Data Formats525634 Node: POT526103 Node: RST526361 Node: Glade526587 Node: Conclusion526947 Node: History527453 Node: References531723 Node: Language Codes533370 Node: Usual Language Codes533885 Node: Rare Language Codes538247 Node: Country Codes539916 Node: Licenses545805 Node: GNU GPL547650 Node: GNU LGPL566833 Node: GNU FDL594972 Node: Program Index617361 Node: Option Index619247 Node: Variable Index668348 Node: PO Mode Index671605 Node: Autoconf Macro Index685441 Node: Index686248  End Tag Table  Local Variables: coding: utf-8 End: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ELF ���������>���� @�����@�����������������@�8��@���������@�������@�@�����@�@������������������������������������@�����@������������������������������������������@�������@������������������������������������P�����P�����������H�������������������������P�����P������������������������������������@�����@��������������������������Ptd���������@�����@��������������������������/libexec/ld-elf.so.1�������������FreeBSD�8 �������������� ������������ ������������������������������������������������������������������������������������� ����������������������������������� ����������������� �������������������������������������l @�������������������| @������������������ @�������������.������ @����������������� @������������������ @������������?������ @������������������ @�������������w�����%P������������&������ @�����������R������ @����������������� @����������������P������������Z������ @�������������K����� P������������d�����0P�����������������, @������������������< @�����Q�������������L @������������������\ @�����/�������D������l @�����<������������| @����������������%P�������������5�����%P�����������������%P������������������ @�����g������������ @�����/������������� @���������������� ��������������������_Jv_RegisterClasses�libc.so.7�chroot�sysconf�getenv�__stderrp�errx�malloc�optarg�strtoul�setgroups�_DefaultRuneLocale�environ�chdir�optind�__progname�setgid�execlp�getopt�err�_init_tls�getpwnam�atexit�strsep�fwrite�getgrnam�execvp�setuid�_end�FBSD_1.0����������������������������������������������������(z���������� P�������������������0P�������������������%P�������������������%P�������������������xP�������������������P�������������������P�������������������P�������������������P�������������������P�������������������P�������������������P�������������������P�������� �����������P�������� �����������P�������� �����������P�������������������P�������������������P�������������������P�������������������P�������������������P��������������������P�������������������P�������������������P�������������������P�������������������HO��z��H�5 �% �% �h����% �h���% �h���% �h���% �h���% �h���% �h���% �h���p% �h���`% �h ���P% �h ���@% �h ���0% �h ��� % �h ���% �h����% �h���% �h���%~ �h���%v �h���%n �h���%f �h�������UHAULoATSHHcÅLdL%�~:HWHt1H�t#H</H�HDH�HuḨP�Ht+Hj@�`LL���b֐H=Q��t$HH-�H$�HHu)�HffffffH=��t����Ht XP�IAÐHH �`@�J������]���cfffffAWIAVAUATUSH@�Lt^gtut>Gt fffH�Hx�8�uH�Hs�8�ufffH�HR�8�u벋-�)É$<��H=)�H=��wHqP���H=�`H��@D$���L`J<����uHI@��E1@�%P�'HHtiIcI9~Xtw HqP�uHH��@AAHt$1HAHD$8�tff��H=C�H_��wHqP���H=�H��hHc$IH;tu @�tfEuuH=��t|$��H=��tP���H{HsHN��AHS@����1,H@����1LDw@����1fffffHt$1`D$HD$8�. Ht$1=HD$8�fffffD$����ff1Hھ@����1"@����1[@����1J@����1@����1(Hm�@����1`H]�@����1H)@�HHø/@�HDغ7@�1HH1Hھ@����1Ha�SHt1H0P�HHu[ÐH_ELF ���������>����@�����@�����������������@�8��@���������@�������@�@�����@�@������������������������������������@�����@������������������������������������������@�������@�����lE�����lE������������������E�����ES�����ES�����D������ا�������������������y�����yS�����yS��������������������������������������@�����@��������������������������Ptd���dE�����dEC�����dEC��������������������������/libexec/ld-elf.so.1�������������FreeBSD�8 ������������4���������������'��I��������������i����� �������������������M�������������������Z���������o��������������������������������������J�������������������R������������y���������,����t�������������� ������\������t���� ����=��-�������a��L�����j������`����������������;��B��?���������k�����������������������K��x�������G�������������^��E������S�������������z���������������<��v�������D��/�������W����&������������X��h������3������������������s�����������M�����������������������P�����������������������d���T����/���[����������X��������$�������������������������)����F����9������0��������������������C������C������������H�������w��q����(��e�� ��������c��:��}���������������������������|��.��l��{�����������x����������~���������k����������������������7������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������'������� ������������������������������������������������������������������������������������������������(���<����������������������������������5������� ��������������-�������������������������������H�������.�����������&���������������$�������a���c��������������������������������������K���������������������� �������Q��������������������������p���R�����������������?���3�������o���D�����������g�������q�������#�������h����������[����������������������Y���y�������|�������������������������������%���Z���^����������������������L���j��� �����������u�����������f������������������������������G������:����������2������{�������E������������������7������@�������������������������������������S�������>�������������������������������������������*���w���������A���������������������������������]�������������������;�����������������1�����������}���������~���0������������������������������m��������������������N�������B������T���������������������=��������������,������������������"�������������_������F���"���������������� ������������e��������������������������)�������\�������������J��v���Q������z�����@���������W������Y��*�����l���V���2��#�������������������+��I���������!���n���4�����������`��������� ��������U���������f���������������6�����������������������1�����5��U�����������m��N����9���n��b����������������]��O����r��V��������������������p�����������_��O���A��6��������%�����r������+�������i������b���������g��������������P����������������������8����������� ��������u������ ���>��!�������8���s�������������������d���������������������������������������������� ������,@�����������������<@������������J������L@������������,������\@����� �������Y������l@�����4�������h������|@�����<������������@�����|�������~������@�����������������@����� ������������@������������e�����̈@�����9�������������܈@������������7�����@������������������@�����V������������ @������������������@������������������,@�����I�������������<@�����6������������L@�����A�������#�����\@����� �������=�����l@������������E�����|@�����5������� �����@�������������@�����@������������Z�����@������������w�����@�����E�������_�����̉@�����������������܉@�����8�������g�����@�����$������������@���������������� @�����������������@�����K�����������,@�����$������������<@�����h������r�����L@����������������\@�����������������l@����� ������������|@�����������������@������������v�����@������������W�����@������������������@�����������������̊@�����1������������܊@����������������@������������������@������������'����� @�����4�������=����`S������������J�����@�����N������T���yS������������������,@������������������<@�������������]�����L@�����.������r�����\@������������?�����l@������������������|@�����������������@������������������@������������������@����������������@�����������������̋@�����������������܋@�����(������������@�����������������@������������P����� @�����{�������+�����@�����!�������t�����,@�����������%�����<@������������A�����L@�����m�������N�����\@����������� �����l@�����Z�����������|@�����Y�����������@�������������^�����@�����C�������p�����@�����t�������z�����@�����������������̌@�����������������܌@����������������@�����������������@�����4������������ @�����U������������@�����������������,@�����������������<@�����:������������L@������������R�����\@������������������l@�����������������|@������������������@�����4������������@�����������������@�����N�����������@�����������������̍@������������%�����܍@�����E������9�����@������������F�����@����������������� @�������������[�����@�����c������q�����,@������������4�����<@�����O�������|�����L@�����+������������\@�����0������������l@�����������������|@�����J���������� �`@�����������������@�����������������@�����������������@�����������������@�����������������̎@�����I������������܎@�����d�����������@�����1������������@������������� ����� @�����������*�����@�����������������,@������������������<@������������7�����L@�����r������W�����\@�������������2�����l@������������A�����|@�����2������������@������������M�����@����������������pS�����@�������[�����@�����������������@�����^�������r�����̏@������������7����S�����������������܏@�����������������@����������������S�����p������������@������������������ @�����������������@������������������,@�����������������<@�����������s�����L@����������������\@�����������������l@����������������|@������������������@�����������������@�����0������������@�����$������������@�����(������� �����̐@������������#�����ܐ@����� ������F�����@�����������������@�������������4����� @������������W�����@������������R�����,@�����4�������g�����<@�����Z�����������L@�����������������\@�����q�����������l@����������������|@����������������@�����������������@�����������������@�����N������������@����������������̑@�����)������������ܑ@������������# ��� �@������������������@����������������@�����$������������ @�����������������@�����������������,@������������"�����<@������������q�����L@����� ������������\@�������������]�����l@������������?�����|@�����+�������S�����@�����������r�����@�����������������@�����&�����������@�����1������������̒@����������������ܒ@�����P�������"�����@�����}�����������@����������������� @�����������������@�����O�������5�����,@����������������<@������������������L@������������-�����\@�����������D�����l@�����������V��� �0B�����������������|@�������������i�����@������������s�����@�����������������@�����������������@�����Y������������̓@�����������������ܓ@�����4������^�����@������������& �����@������������ ����� @������������c�����@������������5 �����,@�����v������D �����<@������������)����S�����������������L@�����[������������\@�����L������������l@������������M �����|@������������Y �����@�����"�������p �����@�����0������� �����@�����d������� �����@�����W������� �����̔@������������ �����ܔ@�����;������� �����@����������� �����@���������������� @������������� �����@�����������D�����,@������������l�����<@�����)������� �����L@����� ������ ��� �B�����w�����������\@�����������$ �����l@������������ �����|@�������������L �����@������������] �����@�����������������@������������t �����@�����!�������c�����̕@�����m������������ܕ@�����������������@�������������!���� S������������ �����@����������������$S������������ ����� @������������ �����@�����9������� �����,@�����j������� �����<@�����?�������.�����L@����������� �����\@������������ �����l@�����N�������!�����|@�����������������@����� ������������@������������ ����ES�����������������@����������� �����@�����m������������̖@�������������* �����ܖ@�����6������������@������������3 �����@������������I ����� @�����N�������o �����@�����$������������,@�������������2�����<@������������� �����L@�����(�����������(S������������ �����\@�����������i�����l@����� ������������|@������������ �����@�����+������ �����@������������ �����@�����L������ �����@����������� �����̗@�����!������?�����ܗ@�����T������� �����@�����2������������@����� ������) ����� @�����Y������Z �����@�����������@ �����,@�����d������f�����<@�������������r �����L@�����<������������\@������������ �����l@�����Z�����������|@�����J������ �����@�����!������� �����@����������� �����@�����������������@������������������̘@����������� �����ܘ@�����(������� �����@������������ �����@������������ ����� @�����A�����������@������������3 �����,@�����!�������) �����<@������������@ �����L@����������������\@�����g�������P �����l@����� �������n �����|@����� ������������@�������������4�����@�����������������@�����L������ �����@�����`������� �����̙@����� ������ �����ܙ@�����s������������@����� ������� �����@�����}������~����� @�����~�������8�����@������������ �����,@������������ �����<@������������ �����L@�����(������������\@������������ �����l@�����������I�����|@��������������XS������������������@������������������@�����������������@����� ������� �����@�����H������������̚@������������'�����ܚ@������������>�����@������������8�����@����������������� @�����Q�������N�����@�����+�����������,@�����,�������\�����<@�����������v�����L@�����+������������\@����� ������������l@�����������������|@�����B�����������@������������^�����@�����>�����������@�����w�����������0S�����������������@������������������̛@�����������������ܛ@�����������������@�����e������������@����������������� @�����Q������� �����@������������"����8S������������2�����,@������������T�����<@����� �������r�����L@�����s������������\@�����������������l@������������v�����|@�����%���������� �HB������������������@����������������@������������t�����@�����������������@������������{����@S�����������������̜@������������������ܜ@�����j������-�����@�����������������@������������������ @����������������@�����������������,@�����;������������<@�����[������������L@������������������\@�����N�������F����S������������������l@�����������������|@������������� �����@������������1�����@�����_�������>�����@�����Y�������U�����@�����3�������p�����̝@������������B�����ܝ@�����[������������@�����������������@������������������ @�����(������������@�����������������,@����� �����������<@����������������L@�����������%�����\@�����"������� �����l@�����t�������T�����|@�����a������� ����HS�����������������@�����������-����PS������������>�����@������������I�����@������������g�����@�����5������s�����̞@�����������������ܞ@�����������������@����� �����������@�����9������������ @�����5������������@�����/������������,@�����?������������<@������������������L@�����������������\@�����������������l@�����@����������`S�����p������������|@���������������XS�������������o�����@�����<�������0�����@�����J����������|S������������������@�����f����������XS�������������J�����@������������� �����̟@����������������ܟ@������������$�����@������������;�����@����������������� @������������������@�����l�������X�����,@������������K�����<@�����C�������a�����L@������������s�����\@������������D����ЋS�����������������l@�����N������������|@�����������������@�����,������������@�����/�����������@�����!�������~����؋S�����������������@�����0�������\�����̠@������������������ܠ@�����������������@�����������"�����@�����!�������9����� @�����f�������V�����@�����/�������f�����,@����������������<@�����������������L@����� �������z�����\@�����n�����������l@�����������������|@�����������������@�����/������������@������������� �����@�����������������@�����7�����������̡@������������������ܡ@������������q�����@����������������@�����������e����� @�����������������@����������������,@����������������<@����� �����������L@������������������\@������������ �����l@�������������6�����|@�����L�������R�����@�����{�������`�����@�����������v�����@����������������@����� �������k�����̢@������������������ܢ@�����N�����������@�������������� ������������������������@������������ ����� @������������������@�����"������������,@�����8������������<@�����M�������O�����L@�������������@�����\@������������N�����l@�������������U�����|@�����`������u�����@�����G������������@�����l�������(�����@�����!�����������@�����+�����������̣@�����������������ܣ@�����!������������@�����O�����������@����������������� @�����������������@�����a��������� �B������������1�����,@�������������=�����<@����������������L@����������������\@�����J������������l@������������<�����|@������������libssh.so.5�ssh_convtime�ssh_match_pattern�ssh_packet_get_connection_out�ssh_match_user�EVP_DigestInit�ssh_log_facility_name�ssh_kexgex_hash�ssh_SSLeay_add_all_algorithms�BN_rand�ssh_channel_prepare_select�ssh_key_generate�ssh_kex_setup�ssh_channel_by_id�ssh_chan_rcvd_eow�ssh_dh_new_group�ssh_packet_get_connection_in�ssh_channel_request_start�ssh_channel_permit_all_opens�ssh_channel_lookup�ssh_buffer_append�ssh_enable_compat20�ssh_key_cert_check_authority�ssh_cipher_name�ssh_key_new_private�ssh_debug2�ssh_a2tun�EVP_DigestFinal�ssh_buffer_clear�ssh_channel_close_all�ssh_compat13�BN_bin2bn�_DYNAMIC�ssh_key_load_private�ssh_set_nonblock�ssh_packet_get_bignum�ssh_sanitise_stdfd�ssh_channel_input_port_open�BN_CTX_new�ssh_debug3�ssh_packet_get_keyiv�ssh_channel_add_permitted_opens�ssh_buffer_append_space�ssh_buffer_put_bignum�ssh_xrealloc�ssh_key_to_blob�ssh_cleanhostname�BN_bn2bin�ssh_buffer_put_char�ssh_dh_new_group14�ssh_channel_after_select�ssh_kex_finish�ssh_logit�ssh_packet_get_encryption_key�EVP_MD_size�ssh_get_canonical_hostname�ssh_mysignal�ssh_key_load_public�ssh_msg_send�ssh_packet_remaining�ssh_packet_disconnect�ssh_pwcopy�ssh_a2port�ssh_get_local_ipaddr�ssh_buffer_put_cstring�ssh_cleanup_exit�ssh_key_equal�ssh_verbose�ssh_channel_output_poll�ssh_buffer_get_char�ssh_addr_match_list�ssh_channel_set_fds�ssh_buffer_len�ssh_xmalloc�ssh_mac_valid�ssh_channel_still_open�ssh_packet_read�ssh_error�ssh_packet_get_string�ssh_incoming_stream�ssh_packet_put_bignum2�DH_size�ssh_packet_have_data_to_write�ssh_packet_get_keycontext�ssh_packet_put_bignum�ssh_packet_close�ssh_packet_set_alive_timeouts�ssh_channel_free_all�ssh_compat_cipher_proposal�ssh_choose_dh�ssh_kex_derive_keys�ssh_xasprintf�ssh_packet_get_ssh1_cipher�ssh_percent_expand�BN_num_bits�ssh_hpdelim�ssh_packet_get_maxsize�ssh_unset_nonblock�ssh_packet_set_authenticated�ssh_packet_get_char�ssh_channel_input_open_failure�ssh_hostfile_read_key�ssh_addr_match_cidr_list�ssh_buffer_get_int64�ssh_packet_get_state�ssh_chan_mark_dead�ssh_key_type_from_name�ssh_packet_start_compression�ssh_packet_set_interactive�ssh_match_pattern_list�ssh_mm_receive_fd�ssh_add_recv_bytes�ssh_debug�ssh_channel_input_close_confirmation�ssh_packet_set_encryption_key�ssh_packet_process_incoming�ssh_packet_put_cstring�ssh_channel_open_message�ssh_channel_add_adm_permitted_opens�DH_compute_key�ssh_key_demote�EVP_sha1�ssh_get_u32�ssh_packet_read_expect�ssh_buffer_get_int�ssh_buffer_put_int64�ssh_packet_send_ignore�ssh_tun_open�ssh_packet_set_state�ssh_key_in_file�ssh_packet_write_wait�ssh_dh_pub_is_valid�BN_div�ssh_roaming_write�ssh_channel_not_very_much_buffered_data�ssh_packet_start�ssh_packet_get_newkeys�ssh_buffer_get�ssh_sigdie�ssh_packet_put_int�ssh_get_remote_name_or_ip�ssh_buffer_check_alloc�ssh_version_get�ssh_dispatch_run�ssh_cipher_by_name�__progname�ssh_packet_need_rekeying�MD5_Init�ssh_packet_get_output�ssh_channel_clear_adm_permitted_opens�ssh_enable_compat13�ssh_packet_get_keyiv_len�ssh_permanently_set_uid�ssh_chan_write_failed�ssh_proto_spec�ssh_rsa_public_encrypt�ssh_packet_connection_is_on_socket�ssh_strdelim�ssh_chop�ssh_channel_input_data�ssh_packet_set_connection�ssh_temporarily_use_uid�ssh_log_level_name�ssh_dh_gen_key�ssh_buffer_consume�ssh_fmt_scaled�ssh_kex_send_kexinit�ssh_channel_setup_remote_fwd_listener�ssh_restore_uid�ssh_check_host_in_hostfile�ssh_log_init�MD5_Final�ssh_seed_rng�ssh_channel_new�ssh_packet_get_protocol_flags�EVP_DigestUpdate�ssh_key_verify�ssh_tty_parse_modes�ssh_sock_set_v6only�ssh_mm_send_fd�BN_CTX_free�ssh_key_free�ssh_packet_set_iv�ssh_packet_send�ssh_xfree�ssh_key_ssh_name�ssh_put_u32�ssh_dispatch_set�ssh_packet_set_server�ssh_mac_setup�ssh_tilde_expand_filename�ssh_packet_put_char�ssh_match_hostname�ssh_get_local_port�ssh_log_facility_number�ssh_xcalloc�DH_free�ssh_get_remote_ipaddr�ssh_compat_datafellows�ssh_channel_input_oclose�ssh_datafellows�ssh_channel_cancel_rport_listener�ssh_packet_set_protocol_flags�ssh_channel_print_adm_permitted_opens�ssh_channel_input_window_adjust�_fini�ssh_buffer_ptr�ssh_xmmap�ssh_set_newkeys�ssh_init_rng�ssh_xstrdup�ssh_fatal�ssh_rsa_generate_additional_parameters�ssh_key_sign�ssh_packet_set_timeout�ssh_channel_cancel_cleanup�ssh_packet_put_string�ssh_channel_input_close�ssh_packet_set_keycontext�ssh_get_progname�ssh_channel_input_open_confirmation�ssh_kex_dh_hash�ssh_key_read�ssh_match_host_and_ip�ssh_compat20�ssh_current_keys�ssh_xcrypt�ssh_packet_inc_alive_timeouts�ssh_key_new�ssh_dh_new_group1�ssh_packet_set_nonblocking�ssh_ciphers_valid�ssh_buffer_get_string�ssh_outgoing_stream�ssh_packet_set_maxsize�_GLOBAL_OFFSET_TABLE_�ssh_msg_recv�ssh_shadow_pw�ssh_channel_input_ieof�ssh_key_is_cert�ssh_buffer_put_string�ssh_dispatch_init�ssh_channel_set_af�ssh_channel_clear_permitted_opens�ssh_channel_find_open�ssh_buffer_free�ssh_buffer_get_bignum�ssh_get_remote_port�ssh_packet_write_poll�ssh_read_passphrase�ssh_buffer_get_bignum2�ssh_channel_register_cleanup�ssh_buffer_init�ssh_key_fingerprint�ssh_packet_send_debug�ssh_packet_get_bignum2�ssh_buffer_get_string_ret�ssh_channel_connect_to�ssh_packet_is_interactive�ssh_channel_free�ssh_derive_ssh1_session_id�ssh_rsa_private_decrypt�ssh_dispatch_protocol_error�BN_clear_free�ssh_kex_input_kexinit�ssh_read_keyfile_line�ssh_cipher_mask_ssh1�ssh_version_set_addendum�_Jv_RegisterClasses�ssh_channel_input_port_forward_request�ssh_gai_strerror�ssh_buffer_put_int�ssh_packet_not_very_much_data_to_write�ssh_packet_get_input�ssh_channel_input_extended_data�ssh_key_type�BN_new�MD5_Update�ssh_packet_get_int�ssh_buffer_put_bignum2�ssh_key_equal_public�ssh_log_level_number�BN_cmp�ssh_key_from_blob�ssh_roaming_read�ssh_atomicio�ssh_dispatch_protocol_ignore�ssh_x11_create_display_inet�libutil.so.8�login_getpwclass�auth_timeok�logwtmp�login_getcapstr�auth_hostok�openpty�login�login_getcapbool�logout�login_close�login_getclassbyname�setusercontext�libz.so.5�libwrap.so.6�hosts_access�sock_host�request_init�allow_severity�deny_severity�refuse�libpam.so.5�pam_get_item�pam_getenvlist�pam_end�pam_chauthtok�pam_authenticate�pam_close_session�pam_setcred�pam_open_session�pam_putenv�pam_set_item�pam_acct_mgmt�pam_strerror�pam_start�libcrypto.so.6�SSLeay_version�RAND_seed�BN_mask_bits�libcrypt.so.5�libc.so.7�putchar�chroot�unsetenv�__stdoutp�waitpid�ioctl�strmode�popen�sysconf�sigemptyset�geteuid�arc4random_stir�__stdinp�pclose�munmap�__stack_chk_guard�getgrgid�getenv�fchmod�execve�getpid�fchown�fgets�dirname�memcpy�execl�perror�__stderrp�readlink�dup2�getuid�tcsendbreak�isatty�endpwent�optarg�vsnprintf�rmdir�readdir�setgroups�fflush�ftruncate�realpath�lseek�sigaddset�strncasecmp�freeaddrinfo�__stack_chk_fail�getnameinfo�alarm�pipe�accept�rename�strrchr�environ�fstat�fprintf�kill�ctime�bind�madvise�chdir�fstatvfs�setsockopt�setproctitle�optind�umask�innetgr�lstat�__error�strlcpy�strtonum�strncmp�strncpy�unlink�strcasecmp�strtok�listen�fdopen�fork�sscanf�execv�__res_init�symlink�gettimeofday�fopen�__isthreaded�getopt�localtime�memset�_init_tls�strlcat�fclose�tcgetattr�opendir�getgrouplist�strcmp�shutdown�ttyname�getpwuid�getcwd�__res_state�getpwnam�gethostname�atexit�strcspn�optreset�getpeername�futimes�strsep�getsockopt�getaddrinfo�socketpair�strftime�mkdtemp�fwrite�getgrnam�atoi�fileno�user_from_uid�strspn�daemon�strlen�strchr�group_from_gid�arc4random_buf�fputs�setsid�closedir�fcntl�mkdir�closefrom�arc4random_uniform�sigprocmask�_edata�__bss_start�FBSD_1.1�FBSD_1.0�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Y���������(z��������(z���������`S��������0�����������pS��������|�����������S������������������� S�������������������$S�������������������(S������������������0S��������I����������8S��������Q����������@S��������]����������HS��������{����������PS��������}����������`S������������������ЋS������������������؋S������������������(|S�������������������0|S�������������������8|S�������������������@|S�������������������H|S�������������������P|S�������������������X|S�������������������`|S�������������������h|S�������� �����������p|S�������� �����������x|S�������� �����������|S�������� �����������|S�������� �����������|S�������������������|S�������������������|S�������������������|S�������������������|S�������������������|S�������������������|S�������������������|S�������������������|S�������������������|S�������������������|S�������������������|S�������������������|S�������������������|S��������������������}S�������������������}S�������������������}S�������������������}S������������������� }S�������� �����������(}S��������!�����������0}S��������"�����������8}S��������#�����������@}S��������$�����������H}S��������%�����������P}S��������&�����������X}S��������'�����������`}S��������(�����������h}S��������)�����������p}S��������*�����������x}S��������+�����������}S��������,�����������}S��������-�����������}S��������.�����������}S��������/�����������}S��������1�����������}S��������3�����������}S��������4�����������}S��������5�����������}S��������6�����������}S��������7�����������}S��������8�����������}S��������9�����������}S��������:�����������}S��������;�����������}S��������<�����������}S��������=������������~S��������>�����������~S��������?�����������~S��������@�����������~S��������A����������� ~S��������B�����������(~S��������C�����������0~S��������D�����������8~S��������E�����������@~S��������F�����������H~S��������G�����������P~S��������H�����������X~S��������I�����������`~S��������J�����������h~S��������K�����������p~S��������L�����������x~S��������M�����������~S��������N�����������~S��������O�����������~S��������P�����������~S��������Q�����������~S��������R�����������~S��������S�����������~S��������T�����������~S��������U�����������~S��������V�����������~S��������W�����������~S��������X�����������~S��������Y�����������~S��������Z�����������~S��������[�����������~S��������\�����������~S��������]������������S��������^�����������S��������_�����������S��������`�����������S��������a����������� S��������b�����������(S��������c�����������0S��������d�����������8S��������e�����������@S��������f�����������HS��������g�����������PS��������h�����������XS��������j�����������`S��������k�����������hS��������l�����������pS��������m�����������xS��������n�����������S��������o�����������S��������p�����������S��������q�����������S��������r�����������S��������s�����������S��������t�����������S��������u�����������S��������v�����������S��������w�����������S��������x�����������S��������y�����������S��������z�����������S��������{�����������S��������}�����������S��������~�����������S��������������������S�������������������S�������������������S�������������������S������������������� S�������������������(S�������������������0S�������������������8S�������������������@S�������������������HS�������������������PS�������������������XS�������������������`S�������������������hS�������������������pS�������������������xS�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������ȀS�������������������ЀS�������������������؀S�������������������S�������������������S�������������������S�������������������S��������������������S�������������������S�������������������S�������������������S������������������� S�������������������(S�������������������0S�������������������8S�������������������@S�������������������HS�������������������PS�������������������XS�������������������`S�������������������hS�������������������pS�������������������xS�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������ȁS�������������������ЁS�������������������؁S�������������������S�������������������S�������������������S�������������������S��������������������S�������������������S�������������������S�������������������S������������������� S�������������������(S�������������������0S�������������������8S�������������������@S�������������������HS�������������������PS�������������������XS�������������������`S�������������������hS�������������������pS�������������������xS�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������ȂS�������������������ЂS�������������������؂S�������������������S�������������������S�������������������S�������������������S��������������������S�������������������S�������������������S�������������������S������������������� S�������������������(S�������������������0S�������������������8S�������������������@S�������������������HS�������������������PS�������������������XS�������������������`S�������������������hS�������������������pS�������������������xS�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S�������������������S������������������ȃS������������������ЃS������������������؃S������������������S������������������S������������������S������������������S�������� �����������S�������� ����������S�������� ����������S�������� ����������S�������� ���������� S������������������(S������������������0S������������������8S������������������@S������������������HS������������������PS������������������XS������������������`S������������������hS������������������pS������������������xS������������������S������������������S������������������S������������������S������������������S������������������S������������������S�������� ����������S��������!����������S��������"����������ȄS��������#����������ЄS��������$����������؄S��������%����������S��������&����������S��������'����������S��������(����������S��������)�����������S��������*����������S��������+����������S��������,����������S��������-���������� S��������.����������(S��������/����������0S��������0����������8S��������1����������@S��������2����������HS��������3����������PS��������4����������XS��������6����������`S��������7����������hS��������8����������pS��������9����������xS��������:����������S��������;����������S��������<����������S��������=����������S��������>����������S��������?����������S��������@����������S��������A����������S��������B����������S��������C����������ȅS��������D����������ЅS��������E����������؅S��������F����������S��������G����������S��������H����������S��������J����������S��������K�����������S��������L����������S��������M����������S��������N����������S��������O���������� S��������P����������(S��������R����������0S��������S����������8S��������T����������@S��������U����������HS��������V����������PS��������W����������XS��������Y����������`S��������Z����������hS��������[����������pS��������\����������xS��������^����������S��������_����������S��������`����������S��������a����������S��������b����������S��������c����������S��������d����������S��������e����������S��������f����������S��������g����������ȆS��������i����������ІS��������j����������؆S��������k����������S��������l����������S��������m����������S��������n����������S��������o�����������S��������p����������S��������q����������S��������r����������S��������s���������� S��������t����������(S��������u����������0S��������v����������8S��������w����������@S��������x����������HS��������y����������PS��������z����������XS��������|����������`S��������~����������hS������������������pS������������������xS������������������S������������������S������������������S������������������S������������������S������������������S������������������S������������������S������������������S������������������ȇS������������������ЇS������������������؇S������������������S������������������S������������������S������������������S�������������������S������������������S������������������S������������������S������������������ S������������������(S������������������0S������������������8S������������������@S������������������HS������������������PS������������������XS������������������`S������������������hS������������������pS������������������xS������������������S������������������S������������������S������������������S������������������S������������������S������������������S������������������S������������������S������������������ȈS������������������ЈS������������������؈S������������������S������������������S������������������S������������������S�������������������S������������������S������������������S������������������S������������������ S������������������(S������������������0S������������������8S������������������@S������������������HS������������������PS������������������XS������������������`S������������������hS������������������pS������������������xS������������������S������������������S������������������S������������������S������������������S������������������S������������������S������������������S������������������S������������������ȉS������������������ЉS������������������؉S������������������S������������������S������������������S������������������S�������������������S������������������S������������������S������������������S������������������ S������������������(S������������������0S������������������8S������������������@S������������������HS������������������PS������������������H_�� �H�5�%�%�h����%�h���%�h���%�h���%�h���%�h���%�h���%�h���p%�h���`%�h ���P%�h ���@%�h ���0%�h ��� %�h ���%�h����%~�h���%v�h���%n�h���%f�h���%^�h���%V�h���%N�h���%F�h���%>�h���p%6�h���`%.�h���P%&�h���@%�h���0%�h��� %�h���%�h����%�h���%�h ���%�h!���%�h"���%�h#���%�h$���%�h%���%�h&���%�h'���p%�h(���`%�h)���P%�h*���@%�h+���0%�h,��� %�h-���%�h.����%~�h/���%v�h0���%n�h1���%f�h2���%^�h3���%V�h4���%N�h5���%F�h6���%>�h7���p%6�h8���`%.�h9���P%&�h:���@%�h;���0%�h<��� %�h=���%�h>����%�h?���%�h@���%�hA���%�hB���%�hC���%�hD���%�hE���%�hF���%�hG���p%�hH���`%�hI���P%�hJ���@%�hK���0%�hL��� %�hM���%�hN����%~�hO���%v�hP���%n�hQ���%f�hR���%^�hS���%V�hT���%N�hU���%F�hV���%>�hW���p%6�hX���`%.�hY���P%&�hZ���@%�h[���0%�h\��� %�h]���%�h^����%�h_���%�h`���%�ha���%�hb���%�hc���%�hd���%�he���%�hf���%�hg���p%�hh���`%�hi���P%�hj���@%�hk���0%�hl��� %�hm���%�hn����%~�ho���%v�hp���%n�hq���%f�hr���%^�hs���%V�ht���%N�hu���%F�hv���%>�hw���p%6�hx���`%.�hy���P%&�hz���@%�h{���0%�h|��� %�h}���%�h~����%�h���%�h���%�h���%�h���%�h���%�h���%�h���%�h���%�h���p%�h���`%�h���P%�h���@%�h���0%�h��� %�h���%�h����%~�h���%v�h���%n�h���%f�h���%^�h���%V�h���%N�h���%F�h���%>�h���p%6�h���`%.�h���P%&�h���@%�h���0%�h��� %�h���%�h����%�h���%�h���%�h���%�h���%�h���%�h���%�h���%�h���%�h���p%�h���`%�h���P%�h���@%�h���0%�h��� %�h���%�h����%~�h���%v�h���%n�h���%f�h���%^�h���%V�h���%N�h���%F�h���%>�h���p%6�h���`%.�h���P%&�h���@%�h���0%�h��� %�h���%�h����%�h���%�h���%�h���%�h���%�h���%�h���%�h���%�h���%�h���p%�h���`%�h���P%�h���@%�h���0%�h��� %�h���%�h����%~�h���%v�h���%n�h���%f�h���%^�h���%V�h���%N�h���%F�h���%>�h���p%6�h���`%.�h���P%&�h���@%�h���0%�h��� %�h���%�h����%�h���%�h���%�h���%�h���%�h���%�h���%�h���%�h���%�h���p%�h���`%�h���P%�h���@%�h���0%�h��� %�h���%�h����%~�h���%v�h���%n�h���%f�h���%^�h���%V�h���%N�h���%F�h���%>�h���p%6�h���`%.�h���P%&�h���@%�h���0%�h��� %�h���%�h����%�h���%�h���%�h��%�h��%�h��%�h��%�h��%�h��%�h��p%�h��`%�h ��P%�h ��@%�h ��0%�h �� %�h ��%�h���%~�h��%v�h��%n�h��%f�h��%^�h��%V�h��%N�h��%F�h��%>�h��p%6�h��`%.�h��P%&�h��@%�h��0%�h�� %�h��%�h���%�h��%�h ��%�h!��%�h"��%�h#��%�h$��%�h%��%�h&��%�h'��p%�h(��`%�h)��P%�h*��@%�h+��0%�h,�� %�h-��%�h.���%~�h/��%v�h0��%n�h1��%f�h2��%^�h3��%V�h4��%N�h5��%F�h6��%>�h7��p%6�h8��`%.�h9��P%&�h:��@%�h;��0%�h<�� %�h=��%�h>���%�h?��%�h@��%�hA��%�hB��%�hC��%�hD��%�hE��%�hF��%�hG��p%�hH��`%�hI��P%�hJ��@%�hK��0%�hL�� %�hM��%�hN���%~�hO��%v�hP��%n�hQ��%f�hR��%^�hS��%V�hT��%N�hU��%F�hV��%>�hW��p%6�hX��`%.�hY��P%&�hZ��@%�h[��0%�h\�� %�h]��%�h^���%�h_��%�h`��%�ha��%�hb��%�hc��%�hd��%�he��%�hf��%�hg��p%�hh��`%�hi��P%�hj��@%�hk��0%�hl�� %�hm��%�hn���%~�ho��%v�hp��%n�hq��%f�hr��%^�hs��%V�ht��%N�hu��%F�hv��%>�hw��p%6�hx��`%.�hy��P%&�hz��@%�h{��0%�h|�� %�h}��%�h~���%�h��%�h��%�h��%�h��%�h��%�h��%�h��%�h��%�h��p%�h��`%�h��P%�h��@%�h��0%�h�� %�h��%�h���%~�h��%v�h��%n�h��%f�h��%^�h��%V�h��%N�h��%F�h��%>�h��p%6�h��`%.�h��P%&�h��@%�h��0%�h�� %�h��%�h���%�h��%�h��%�h��%�h��%�h��%�h��%�h��%�h��%�h��p%�h��`%�h��P%�h��@%�h��0%�h�� %�h��%�h���%~�h��%v�h��%n�h��%f�h��%^�h��%V�h��%N�h��%F�h��%>�h��p%6�h��`%.�h��P%&�h��@%�h��0%�h�� %�h��%�h���%�h��%�h��%�h��%�h��%�h��%�h��%�h������UHAULoATSHHcÅLdL%�~:HWHt1H�t#H</H�HDH�HuyS�Ht+HHB�LL��֐H=��t$HHE�H<�HHuy�HffffffH=��t����Ht |S�IAÐHcH=�fffD)�SE~JH5RE�LCE�DO11E1#ffffIHt98t$HID9t AwH1[fffÅt[Kfff1fffffffff���vffffy1;=�}HD�HcHfSH=�Ht��fffATISHHwD�H@Hp H`D�H@Hx _~HHD�H@Hx H:D�H@Hx 9���HD�LL1HP>HD�LLHP#H[A\ffffHC�H@Hx HC�H@Hx r9���HC�LLHPH|C�LLHPSNH[A\HXC�H@Hx AH9C�H@Hx A���HDڿB�1wHC�H@Hx AHB�H@Hx A���HDڿB�1+fffffffffffAT�USH~FE11HB�H9(t*AHD9%\�~!HnuHwB�H9(u[]DA\[A]DA\ffffffffUSHH=3B�HteHB������~[11HB�H<Ht7HB�H����HA�H<HtHA�H����H9-�HA�����HA�����HA�����HA�����HA�����H[]ffffffffUSHH=��t3 :@�~)11fHi�<tH9-@�H[]ffff5�S~ 1ff<S�CH9�[�ffffffS1���H ����[ffffffSP@����H����Z[fffATAHUSHH DЭB�1XB� HhHHHH2@�Ht8tG1HI1HD���HЭB�JB�1H []A\fffH���H?�HH@Hp(H?�HH@Hp H?�HH@Hp0H?�HH@HpXHp?�HH@Hp8|HY?�HH@Hp@e'ЭB�2B�1ffAT1IB�USSB�H H$H#��H$��Ht$H4MHtT$HLHbHJ���H=>�Ht1H>�H@HHp(#Hp>�HH@Hp HY>�HH@Hp0HB>�HH@HpXH+>�HH@Hp8H>�HH@Hp@H=�HxHxB�JB�1H []A\þB�hB�1-B�B�1HH==���B�B�B�HD1 H=}=�Ht5e�1rB�HZ=�1 ���(S�HffffffffUSHA(H\$���H޿�}fff8tؾЭ@����(H[]ffffffAW���AVAUATUS1H���L$���H�H$���1L#���B<+HHuHr<�H@Hx 1jHW<�H@Hx(HC<�H@Hx H7<�H@Hx 'H<�H@Hx(H<�H@Hx ���1=,�D1�DJ�׃EE =4�DEEH;�H@Hx CHn;�H@Hx -ډƿB�1���1A���D��E1ffC,9t B�1"IIuD`ڦB�H1q|HI��HH~$ƿPB�1��B� B�1D <�E��LuG���LVL.PH ��2 ���HƉڿB�1 LHl$`PHLcLB�I1iLLHLLH ���(S�HHHH���HHcLLHU ���(S�HCH}HL1LJL1fff*2D*PS�HHuD�Et PS�}h�LD ���H1B�HD$`����HD$h����HD$p����HD$x����q���gBH$���H32����HĘ���[]A\A]A^A_Lbj�"B�1fHl$`HcLHD$`����HD$h����Hu HD$p����HD$x����H)HJ8�LPS�H@Hp H;8�H@Hx R1fffPS�0*HHuNB�1bffffH�t"H�Htx ~���1fff@B�H1fffffffffATH=7�UHStH=7�HHu7�O�~_Ht7�E11H<*Ht9}HHW7�H<(zHE7�H*H07�HDH%7�AHD9%�[]A\fffffAWAVIAUAATUSHX��H>HO�H$H��1DŽ$�����DŽ$���DŽ$��H(�A}���D-3�D-�Hc01EH`6�~31E1LK<4HJ6�ID9HuIcH����H$6�H����{X��H$��S�E1K��HD$(����HD$0����B�LD7E��4AvM1HH=�HHپB�1H {�������B����$ŸB�n����X����pE����m#��H=z�V��HcHS�C�9H=U�T�H �yB����������fffH�H���������������������"��H=�YU��HcHS�C]�uH=�1ɺ������TJ�R'����C ����4HP�H$��B�HHI 8����B�LH��Ix8I��������H=�11��=���E�H \�B�������d���H����d�����U�����F��������^!��H=F�eډȔS�C�ȔS�H �gB����������ffH=� E1E11ɺӧB�HƿS�HHD$����H$����S��H2H=�o�kH /�hB�#������7���]���B�LHuIx~HD$0���B�LH��IxRHD$(:�(�118M%B�H1.v���-�����-c�u#�tIHt8/t B�1DE�E�����D"����Eu 1Ƀ=��f�5d����H=�DЃDB�Ht B�$=�H0�����H0�����0�����0�����x ��HD$(H D$0L t!H|$(���H|$0���M ��`S�D T�E��`S����D5�B�`S�S�EHD5NJ�E1E11j��AS�J��=����D�=�s�B�A9 �� B�H1O!B�HH�W��HXH1HHlH=�HxH� H�<B�HCHc=3����#�HL/����11H����H9 �D5�E���1<H/�/����HxHDB�1dEH;�}tH<S�1ҾB�L$����AHH.�HJ ���t|.����D%Z�E����tD-d.�E��tD%T.�E����Hc=����-�H.�~11H����H9 �����E1J<S�1HI��H��D~�11EFffCHH9_�~0H-�LHt�Ut;?�Hp-�Ld���J4S�B�1LmAFI; �M^�t6��=�~��e��H,�H@Hx 9��D�E��=�~8H|$(�t&Mt!H|$0�ftHT$0Ht$(LS�Gh��S�]9��Dj�E ��11��=�D��?���5#�t !������� �k�5i�H=��uS�uI�u?11~9��1��B�x1Ҿqt� 18 ��5�H=�p���'B���� ���.D���B�*�p��1���D$D$11���ȨB� t!1\���P~tT$t$B�1AZ1B�C��u���G�;��|$������1|$������111���&1���1���1���1���1���u@��t$|$.D5*�E��A��1HD$ �m��n)�utGH�H$0 ��DD$E1ɹ������H11H1H��Ht$ 1DСB�@����D-�E��m���[�B�B�EAHDۃL$ ��AIDdB����L1H,$\LHH�Ht$HH@��H=�HH9�����1L1Efffff< �������t$���Il@��H�� ��< u Ƅ ���uwB� ���L�� ���J4S�B�1LJ4S�XB�1H4S�1&B�~H'�J ����LL$(A$H޿B�17H=�`S�;�� 5�u �!B�hB�1HD$(H D$0L  B�1vH$@��XB�4t$H��%���=�@��ttXB�HB�18���N17D=�D$D$E������%�D$D$Yj�G8D$L��Eu XB�xB�1Ƅ ���LH$ ��H$��Ƅ$���vH$��HH�I1H龄B�rl��$��$��1HٿB�\H���@���Q��$������H=�uH5�B�1t$ ���pB�@�|$|$HE�L%F�%B�H1HL���z= ����HcHH$��~DH$�11H1~B�\H$�H $�HH�H9HHB�HD����6�HX�DŽ$�����H��L$ ��L$ ��L$��tH[(H��Cu=5���sH{ A ���M��L$ ���t ҨB�H1랋S s{a���0���A���L�����t��{^��1LLB�SHs :x@Hco����a�,S�%��LL@B�1Q8ffLHLB�1!8ffB�H111 ���%Q8aB�H1B1�fffH=�{H5�1B��uD%S�EtH=^"�� ��_`������S�H@PS�IH]�D#~��|���DV�E��H6�HtH|�H|�H=|�H=|�H|�H|�H�HtH|�H|�E�7��H|�,B�Hw|�,B�L$��LDP�E���E11Hk!�H\�H���w0L ��HHH,HމLH$!�H\�Ht:w0L\k��HHHHމL褿AHD9%�Q���B�L}L5HLHH޿GB�1ES�H3{�肾HHǀ���P1B�Hǀ���P1B�Hǀ���5B�Hǀ���5B�Hsp@$���H%�H1Hǃ��� @�Hǃ���0@�Hǃ���P@�H�H���H�H���:H^B�H�C�1KLב��D `z�E��11���`=�AF���t�D�Et���<�跍�=z�tCIF0pt �%��y�����H=K��U[�u5�=�L!��L$��1111L$��111���H$��H$��1�B�DHt$ 1D0B�0�t�\*y�tP�1H3�HWD5P�E ��� ��P@����Э@����@����@����D-۾�E^ ��5�DŽ$��DŽ$��D$<����~#11ҋS�9D$<MD$<H9D$<uHc=����BD%o�IH�E~11A�H9G�D$8����E1E1D$L$AH|�H ��MtL\$<���HcH?H-��IŅ~/1 S����Hcу?HHI D�FH9̽�D�E~AL۽�11fffffA 0tHcѸ���?HHI D�H9=c�E111҉L ��H�H ��DT$8EtH�H��D �E~dLA�11H9-�~HA<tHcljH?ID�HtrL�AAH9-�D�E��1EH9���<S�HcljH?ID�HtH$��H$��DŽ$�����ZA��x��=�A9|` �A9y��5�dj��d���D)))d���ЉD$0 DÉ¿B�1mA9(��H$��!��=du���=�~3H5û�>Z��HV1fHH>��9u5Q�M���[�����HcB�1$��t�e��^�t*D$8u" @����ɼ=�.D$8���DnEH9̺�-�yfffffDB�1-D%fff8f8#f8#fw8B�H1!$��$��9D$<MD$<AD$<H$���1Ҿ������=D8舾ҩB�H1蹽Da$��U$��I$���`S�'$���'$��m8ffC�H1H0H�����D$8����a8S8̽B�H11B�$��$��1� r���D|$D|$肏�$���@� �5�H=r�/r�t$���D|$D|$B�1D$���D�DT$t$1B�¿1D舻1���|=b������c$�����R$��v=,�tfH5�H>'8[H�B�H2H1肻1���j ��5�H=q�$���������1ѻ1҉D$���1ȨB�:t1芺���~��L$D$���1DL�PB�ʉ肾D$D$R|$H$��A��������8CB�H1tff+B�1kk=p�?A���B�c���g<B�H1護���H8�"�H@Hx 94H�H@Hx ʻ���B�15�r$��c �/!��f ffff1B����Y1B���%H=)�L¾B�16���\fffG8B�H1h^ff8萹B�H1;8pcB�H1QT$���`S�/$���/D|$D|$H=}�C�_HHE��>HHcоbB�1LHaff���/���B�L�gB�11>������迵H5�H>@8tH�B�H2H1+���H5�B�1}H=�蝼��� �H@S�H�j{����HcŪB�1ȱHm�8H5_�L^ 6�HM�xH=>�q5�&8Z1H豴xEH �B����������H �VB����������H k�9B�������s������B�LG~HJl�1B�H7l�1B�ffff[L~��ffdB�1{H=0��H$�H�C B ����zH\$@X'nH߾���AH߾���I~0/��pB�1誳H�xAt���H\$@Y������HӴ���HvXB���B�į��H@�B�Pp1°H'�H$�����@$����H=�B�C�1H�B�H1H���t$���B�@�|$|$>H5K�H¿HB�1許���I8´H5�H¿`B�1HH=ү�B�I1ެV6B�1m���7辿B�H1/���м8ILHL/B�1H a�BB�������i���0B�1Ӱ���yHV�=B�H1H諰���HcgB�1±HG�8褽S� H=/�1�1H=�G�1أB�1H8lB�H1-B�CH1)MB�1 踻81B�H1蝻8B�H1׿肻8XB�H¿B�1跿IB�1衿AWAVAUIATUSH��H�H$��1Ht$@���HT$8HL$0LD$(1t?Ht$Pt%D$X%���=���tDHt$(LB�131H$��H3�R��H��[]A\A]A^A_É裳(B�ǻHHtH$��H$��H$ ��HT$HHHD$ HT$fffH���H H���$ ��< t}< Htvfff<#t< tȄtmB����HtL$���H$��H$��1uB�H7tRD��t^rLB�1#h��^HH< t< xHff1Ht$(H$�����$��Ld$D$L���<-t<+LEd$����DD$L$��<-���<+L$��IA$ttE7Etk<@���Ht$@L���A@���Ht$0LùHӿT$L���1LhB�g��1L8B�1g��<4LB�1f�� L|$ D$L���AHT$0I113kHt$@I11Lt#E7*Ht$8LHt$811L٨ffAWIAVAUAB�ATUHB�S1H��H�H$��1Ht$H$L$���Lt$H脶LffHHB�HH���HM0IǰB����L1̸LLaxDEE���LE�HL$LH4$B�ttH4$LȮB�1ne�����H$��H38�H��HĨ��[]A\A]A^A_藶LB�ڴzLհB�Ŵ1҅cLE�HL$LH4$հB�3��H}0L苴��=q�t=D$t,;Et'Hu�pB�1茪Hu�pB�1d��10D$uH1QfffD$���;E���Hu�ȯB�1L3LB�1Hd��L,HB�HM���HM0MǰB����L1$LL蹳x5�{ m�tLB�1c��LE�HL$LH4$LxLB�1c��LE�HL$LH4$8B�1c�����ffffD$xff´1fffH4$LհB��B�1Cc�����HU0Hu�(B�1HU0Hu�(B�1c��1fffH\$Ld$ILl$HI=I�H0HLLH$Ld$HLl$Ha�������� ����ÐUHSHWHG0uLHX;�u }�����t%;�u'XB�HbHHǴH[]À{�HuΐHtHffH\$Hl$HLd$HHG0DgDHEu=f�����DE>�uD�1Et&=`�t1Hm�1Ʌt1EffffH$Hl$Ld$HHKŅu1E!萐AWAVAUATUSHX ��HT$Ht$H.�H$H ��1H|$HD$0����轱H|$h��[B�HI1�Ht$Lb��HI��1Ll$@IfffffLD$0� ��LLL��D$@Ll$(< tJ< LtCt< t<#t0< wN1Ht$<H|$(L菫���HT$0L濰B�eLfffHHl$(E�< t< uHT$(1Hфu#ffff<"tCHQHHT$(@Hфtu< t< l<\ùz"HBuHHD$(뽅IGHt$Hx IIGHx x;D$<t*IG\$<Hx ٩HT$0ALرB�1`HL$0H|$LH迃��辰L���qLH|$�t!HT$L:蒰L1HLLȱH$H ��H3�u#HX ��[]A\A]A^A_L1 Dffff藸ffffffffH\$Hl$HLl$Ld$H���IHH�H$���1_��1҅t@H$���H3_���H$���H$���L$���L$���H���ÐHCHx =��$HCHx k���ƿ B�1h1HLPIB���Ld$`HcHHD$`����HD$h����It$ HD$p����HD$x����H)آH�L ���HL$���ȹ���PS�H趹HL+���LLֿhB�1/ffHl$Ld$IH\$HAHHt]11Ҿ���HhtT?HHtQID$1IHHHH 讪t@H肯HH$Hl$Ld$HÿB�1蠲вB�薲�B�1芲0B�耲fffAUIATUSH(Hl�HD$1茸HH���Z����LIIULHHe���;HsH1$菩����+HHun~$ƿPB�1���B�¡ B�1fY�tCHLL+�L贶HT$H3�u-H([]A\A]Le,�I2HLL2`B�1FfffffffS1HDGHO0Et'=fY�u#HT$Ht#~��1H[HT$H,�uH|$_u+B�1B�豴H|$臭H1[ffH|$1Ҿ���[H|$H讶HHƿyB�1謡H购H|$:1B�NH���[ÐH\$Hl$HLd$Ll$IH(HIHD[��t 1H\$Hl$Ld$Ll$ H(fffHLtы�E1#B�LHLB�LD_��H\$Hl$HLd$Ll$1H(Lo0@B�IH諥K���H���H}����=�衟B�HH1oW�uYHHLLtYB�1?1B�1fffH\$Hl$Ld$Ll$ H(fffffHHLL=�uHNuH޿HB�蹞11fffIu�HL⿐B�1Ɵ1B�z���tHl$Ld$IH\$Ll$B�H���H聪H���XA��HHF��At$9t$ tZHG���D$A%��9tH蓰xCH$���H$���L$���L$���HĨ���9\$uffA\$A��mW8u D$$���@8蹠HHB�1u 8u;D$ A;D$tfu*8~AT$IHhB�1U!ۨ8TAT$IHhB�1 趨8/HHB�1 葨8ffHH¿B�1ŬffffffH1f4$fT$gtHfL$fDD$%HfffAT1I��UHB�Sx1Ҿqt� 1t߬���1��B�ƫxB�1蔞=1B�1}�11at� 萞|���1���Lyx)1���B�]x-[]A\ިfg8LH¿CB�1G8[]A\HƿB�1'8蠞*B�H1ѝd8耞B�H1豝S11H_x7��H辭x[æ8fff7HH¿xB�[1d蟦8HH¿XB�1FffffffH\$Hl$E1Ld$HH1I1Hx4;艥HtGHHLv���H$Hl$Ld$Hf8萝RB�H11̿B�CSHH1HR�HHQ�H[ S�ffffffffH\$Ld$Hl$H��IHHH�H$��1R�H$��HL貰H$��H3�$��u H$��H$��L$��H��effffffH\$Hl$HLd$Ll$���Lt$L|$Hh��HL�H$(��1�AH$!��I1MMΈ$ ��胣����LLHDxQ�$p��HLHO�H{P�HQ�H$(��H3ĕ�)��H$8��H$@��L$H��L$P��L$X��L$`��Hh��ffffH$ �����HYHHD$RH|$ B�HH �$ ���t{HD$ L$ ��HٺB����HD$H16HT$ H!ကtHt$ S���DHBHD�HH+T$)HD$ HٺзB����HD$H1älHy�Ht&1Ƀu $9hB�tHH`B�HuB�fffAVAAUAATUSt1HE1H]�DAHC�H1HH辣E9u[]A\A]A^fffHSHtbHHƿHC�[1鋣[fffffffffStj���*���,���t "OB�t!]B�t&B�tB����HHƿHC�[1fB�t܃ B�tһB�B�HE*B�t&B�tB�`ffff^B�t;B�~B�pC�f?B�Y3WB�JfffS(Hƿ`B�[1RffffAUATUHSHX��H�H$H��1t#1fffffؿgB�t19]�w拵��*���v�����fH��H���L$ ��Ld$/fffff ��HƿҨB�1]H[(HtMsH{ A ���M��L$ ����u{��1LL濇B�PH[(Hu`U�����8�����<�����@�����\�����$U��1���{(U��2���k<U��7���[@U��8���KD�����+H�����L��'��� �� �����5�����6����� �����-������������������P�����{T�����kX�����[`�����Kp�����;t�����+���������� �� �����"�����,���8U��4�����!���5J�C���H0��+���jHh��.���YHx��(���HH��)���7H0U��3���&HHU��9���HPU��:���HXU��A���HpU��B���HU��H���HxU��G�����葜 ���H��詌���H ��H �����)(��H( �������H��#�����H��$���$��H�%��%����-��H-��&���M��HM��=���5��t.1ffؿB�HE��H5��1k95��w׋U��U��1 U��B�EdU��1���1 fff9twHH�B�u1>���Y0H$H��H3E�uKHX��[]A\A]fffכ8PHLLpB�1趜HHB�ϣffATAUHS��Ht����t����t����t����t����t����t����t��D��tD����t����t����t����t��\��t\��X��tX��`��t`��(U��t(U��$U��t$U��H0U���tH0U��HtқH0U��H0U��E���HXU���tHXU��Ht蠛HXU��HXU��HpU���tHpU��HtwHpU��HpU��HU���tHU��HtNHU��HU��HxU���tHxU��Ht%HxU��HxU��[]A\ffffAUHIB�ATUSHùB�H��H�H$��1覊(B�HHI���LHBfff#���H/Htf� �ӹB�HH\�HۡHމL螉L���H螒Hu���B�LwL迟LB�¿׹B�1H$��H3ى�u H��[]A\A]H荣���c莠fSU��H1 ǃ`U������C����Hǃ������ǃ��ǃ ������ǃ(������Hǃ0������ǃ8��ǃ<��ǃ@��ǃD��ǃH��ǃL��ǃP��ǃT��ǃX��ǃ\��ǃ`��Hǃh������ǃp��ǃt��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ��ǃ������ǃ������ǃ$������ǃ�-������Hǃx������Hǃ������ǃ������ǃ��ǃ5������ǃU��ǃU��ǃ U��ǃ$U��ǃ(U��Hǃ0U������ǃ8U��ǃ<U��ǃ@U��HǃHU������HǃPU������ǃM������ǃdU��ǃhU��HǃXU������HǃpU������ǃ��HǃxU������HǃU������[ffffffAUA���IATL ���UHSHxH�HD$h1HLd$@HLB���D$���D$1M$1膖HL$8HLL賞uCHT$8HHB(HuH��HB(HD$8H��HD$hH3 �u0Hx[]A\A]É襞MB�B�LDH1Lט貜ffffATIUS7Hu G��������t8u% t1LHߋT9+w[]A\HL[]A\ǃ������ffffS`U��HE��D��Eu ǃ�����D ��Eu-��tHǃ ��B�ǃ �������ffff;u C������H�����H0�����8����<����@����D����H��s��L��W��P��;��T����X����\����`����Hh�����p����t��j����M����0����������������������������e����H����+������������������������}����`����C����&���� ���������� U����U����U��x��$U��[��(U��>��8U��!��<U����@U�����HPU������HHU������dU��ts��t^==����[E=�=�Ë ��HcHDŽ ��'B�B ��HHDŽ ��AB� LJ`U�����ǃ������ǃdU������ffHPU���ǃ@U�����OHHU��B�HHEHHU���HPU��5HǃHU��B�%ǃ<U������ǃ8U�����ǃ(U�� ���ǃ$U����� U��U��wǃU��d���[ǃ U�� ���?ǃ������"ǃ�����ǃ�����ǃ�����ǃ������ǃ������ǃ������tǃ�����Wǃ������:ǃ������ǃ������ǃ������ǃ������ǃ�����ǃ�����ǃ������oǃ�����Rǃ�����5ǃ������ǃ������ǃ������ǃ�����ǃ�����ǃt�����ǃp�����jHh���ǃ`�����DHǃh��mB�4ǃ\�� ��� ǃX�����ǃT�����ǃP�����ǃL������ǃH�����~ǃD������bǃ@����Fǃ<��x���*ǃ8����� Hǃ0��[B�11HfffffffffffUSHHH߉T8/Ht=11sHHt6H|$HH¾B�1tH茎H脎Hl$HH[]8YB�H¿B�1ffffffAWMAVMAUIATUSH8H|$(HT$L$ D$4����Ht$(%HHHD$ �������<#���H5�H���1HH`B�H���H;uۉHhB�DlB�?M���At ���ufAfu^M ��H|$ �tH|$(oHHD$ u1H8[]A\A]A^A_H|$(JHHHD$ t�t(fffKvDHL$ T$ AHt$B�1躏T$ Ht$H1B�1E1 ���5$ňB�HL$ LD$(ºB�T$ Ht$1}AL|$4D$4���8�tCA�-�����6��H!I-��CA�-��H|$(cHHD$ uH|$(OHHD$ 8�T$ Ht$H B�1Ўfff8�tA$�������H蜎I�%��CA$��H|$(ވHHD$ uvff8�jA�����5��HHI��CA��H|$(芈HHD$ u"8�A�����c��HI��CA��H|$(9HHD$ u8�=���H蔅Hf��AM�����>��E7EH脍IM��CAM��H|$(ƇHHHD$ u[HL$ T$ 1Ht$B�J}H|$ �5H|$(脇HHD$ uH|$(B�6H莒H|$(THHD$ 8�uIU��1H|$()HHD$  ��8� ��EEH;�HHHE�IxU��1A(��=�����HI(��I( ��yI��H|$(蛆HIHD$ t 8�A��T$ Ht$hB�1 I��»ES�H|$(VHHHD$ B��8�9��EEIpU���轋IpU��fffHl$(H��B�HQIXU���vH|�qIXU��1`I��I<U��H|$(覅HHD$ t 8���T$ Ht$(B�1.I��I��I8U��I0U��1I(U��H|$(;HHD$ t 8���T$ Ht$�B�1ÊI$U��H|$(�HHHD$ t 8�1 ��T$ Ht$B�1腊I��$I��I�� I���I��H|$(菄HHD$ ��A��A��H|$(UHHD$ ��A��A��H|$(HIHD$ t 8�� ��T$ Ht$B�1蠉I@��4I<��(I8��A ��=�����HI ��I ��qE]E2I�����A}������H|$(qHHHD$ t 8� ��T$ Ht$B�1I`U��IT��IP��sH|$(HHHD$ t 8���T$ Ht$B�1蓈H|$(قHHHD$ t 8���T$ Ht$B�1^I��I��I��I��I`��I\��!IX��IH��I��Ip��It��A5�����i��H|$(HHHD$ t 8� ��T$ Ht$0B�1蔇Ih��1I��%H|$(HIHD$ t 8�V��T$ Ht$B�1EI0��1TH|$(}HHHD$ t 8�^��T$ Ht$1B�1H|$(HHHHD$ tԀ8�tyff ��I���H|$ 讆I��ffffH|$(HHHD$ z8�qcp��Ix���dH|$ SIx��NI��I��I��H|$(yHIHD$ t 8���T$ Ht$B�1HL$ T$ 1Ht$B�uH|$ �H|$(HHD$ uIL��^H|$(HHD$ t 8���T$ Ht$B�1聅H|$(HHHD$ t 8�h��T$ Ht$HB�1LDd$4E ��Ht$(MHt$��H|$x�LD$xXB�LB�LDH|$p�HEL$p1\sA���H|$<HH1��8�(��H|$HH��8���HP +C�HI`w���Mt1DHLsz:��E1|IPU��IHU��H|$(9HE~HHD$ ���8����E?E'H;�聇H|$ HI@U�� I�����Lƿ&B�H���8���A?;3T$ Ht$hB�1螃}B�HQv���Mt:LfffrHT��pH8跥��6��T$ LB�jyE1��G���Lƿ]B�H18MT$ Ht$LB�1fffffHnEE;TB�Hu1��H|$p�<H|$pDH薀#L$ Ht$pH8B�1xfffH4muT$ Ht$HB�1ZHL$ T$ (B�Ht$1@L$ HLB�1Jx/HQ��}��L$ HLB�1x1E11!fffHHD�B�A��HHHB�\~uAdU��EdU��A��E5��E1LEt$H5��H~ ��AHE9uHEDH|$(I5��{HHHD$ t 8�b��T$ Ht$B�1I�����B�Hs�����A��A��H޿_B�14sT$ Ht$B�1诀MtEB�B�HD𿈻B�1nHD$E/HD$(r[���H>xH��H|$ tHH��zoH|$ HH��qf��HLSt$ L@B�)v���Lƿ?B�H���8~��AA��A��y��A��A��B�HDr��H|$xHq��hL$ Ht$xHpB�1fuKfff���LƿOB�H���8��A��A��B����HEhU����A/AexADžhU���������Lƿ*B�H���8��EEzAD��lAD��`IU��IU��M U��1OB�Xxt-uLAU��A U��"T$ Ht$B�1~AU��A; U��AU��dT$ Ht$B�1}H|$("xHD$ A5��}I=��H|$ }HH?HXB8�tT/H\H���HZlHھ3B�HHlHt$ HHkH|$(wHHHD$ uA5��A5��IE��T$ Ht$HPB�1 }B�1`k B�Ho���B�Ho1҅T$ Ht$Hٿ�B�1|ffffT$ Ht$B�1|L$ HL�B�1rP�����Lƿ&B�H���8<���Lƿ]B�H18T$ Ht$LB�1|T$ Ht$8B�1|T$ Ht$`B�1{���LƿB�H���8:���Lƿ&B�H���8���Lƿ]B�H18T$ Ht$LB�1j{T$ Ht$(B�1U{T$ Ht$�B�1@{A]�lڃADA]�T$ Ht$B�1 {AALd$ @Ņt@ttHD$ HLd$ nLAoHH��iH|$ HHY��kJ��@tEEtH*qAhU��H|$(tHHD$ b8�Y뇸���Lƿ&B�H���8]���Lƿ]B�H18;T$ Ht$LPB�1zHL$ T$ *B�Ht$B�HHD1yT$ Ht$xB�1yT$ Ht$B�1y1~T$ Ht$hB�1y:���HXqHHx:���AqH1HLMT$ Ht$HB�1AyT$ Ht$ B�1,yHL$ T$ *B�Ht$B�HHD1yHL$ T$ *B�Ht$B�HHD1xT$ Ht$���0B�1xT$ Ht$���B�1x)H޿B�1jB�1uxT$ Ht$B�1`xT$ Ht$�B�1KxT$ Ht$HXB�5xT$ Ht$ֺB�1 xT$ Ht$hB�1 xHL$ T$ *B�Ht$B�HHD1wHL$ T$ *B�Ht$B�HHD1wffAWIAVAUATIUSHHHH|$(HLD$ LL$Ll$8Lt$DiLB�1B�~dH߻���vHIwHD$0HD$81M1D$D7ffHT$H|$(MMHHT$HT$ H$LB�LuHuH|$0,tHH[]A\A]A^A_ÉL濐B�1vfffffffffH\$Ld$ILl$Lt$IL|$HU��IIHMMLH`S�B�HL1tH$U��L$U��L$U��L$U��L$U��HĸU��ÐHcH=e�fffH S�j���=e�1������dt6=e�1������dt=|e�c=ue�Hc_q8hHB�H1 h=Ge�r=@e�r-e�'e�Hq8h$B�H1gʐH1@B�\k1xp,A����r2A����r1A� ���xr@����ir@����Zr @����Kr,@����<r@����-r@����HrffffffffffHnb�uF|a�t H/*pB�1j@����q@����Hq1XB�\j|@�w@�a���q @�^���q@�`���uq|@�_���fq�.A�Z���Wq,@�[���Hq@�\���9q,A�b���*ql@�]���q@*A�P��� q *A�c���p *A�d���p *A�Q���p *A�R���p@����HpH1B�Xi1Hf1Hl$Ll$H\$Ld$Lt$L|$HHD$����{eHhH¿pB�A1hB����H���Ha�L`0Mt D@Eu B�1r1eIxDB�D1Lh=~�8��5b�*��Eu f��Cf=w AL$�� ~�HT$DLmA���ffB����H���B����HE18u `����AEt*E���Q���i|$~Wjn=iHnH\$Hl$ Ld$(Ll$0Lt$8L|$@HHffff1cHwDH1DᾀB�@B�rgDHpHA|n[B�1E1uL`n?R���1ifffPffffffffH1B� gwa~$ƿPB�1��pB�` B�1oa_����HfffH\$Hl$Ld$Ll$H(v1cIeL޿B�A1f\HH���B����LtzE� tOtJ1Et׃d@h}hmLH\$Hl$Ld$Ll$ H(3mfffffH���K+C����uLH{��T`ffff~$ƿPB�1��pB�_ B�1F`H^[1S޿�B�1)`ffffffHl$Lt$H\$Ld$Ll$L|$HhH|$4aHuAuD$$uL$$D$ AH0B�1D*eK+C����H(��1B�es_~$ƿPB�1��pB�^ B�1k_D ]�E5��AE1ɾ ���DD¿K+C�D$���HD$B�D$����$���MjH=*]�pHX����sB�1cdHr1HB�Ld\���BfDf���f[���jH6kH\$8Hl$@Ld$HLl$PLt$XL|$`HhfffffB� ���H ��1/`It1`IsA^~$ƿPB�1��pB�r] B�1^ALALB�1jcB�LHqLHmjLejH1HB�-cD$$; Ds���D$ ���[���e{ze{re���ge���\eiffff,B����H[rÍCv60B�1kp;pB�1]{1ҾA�o,�tJr‹ �tKtA9t?1ۿB�1 p@B�nbB�dbPB�1o‰މCcxA�� �A¾���<B�D$���HD$<B�D$����$���gHHǀ�����n\ffffffH\$Hl$Ld$Ll$H(qAqAqqLB�1Za[~$ƿPB�1��pB�[ B�1[=Z�t(A؉DDH\$Hl$Ld$Ll$ H(H\$Hl$Ld$Ll$ H(fffSH=LZ�taH|$ $]H,[~$ƿPB�1��pB�Z B�1$[T$ H޿S�VT$ H1dHgH[ffffffffDX�1ҿ���EHE_a�1 cAWAVIAUIATIUHSDH8W�t E��E1E1LLLHeUW��� iY�Hu����D$ ����Hcу?HHH ֋ MY�tHcѸ���?HHH \t Y�I4$���Hcу?HHH HBX�H`��1t-غMbi��)i��HD$HD$HL$A>I$1Hu�I*W��uAEt<#j;q���k7�����dB�TefffffD5V�EtXHu�=JX�tHcljH?HH���H8[]A\A]A^A_Ë�mi��A���_Dl$ EtD%OW�Et<W�m��Hu�D-W�Et W����Hcу?HHH SH\$/zB�1T=W����HlHuH8[]A\A]A^A_ÿS�Y;TW���imD$ ����t_HzV�D$ V�u W�Hu����Hcу?HHH ֋fV�u V�Hu����Hcу?HHH փ=V�t7S�Yt) V�I4$���Hcу?HHH Hu�OHu�Flft Eff1ɸ�ff QV�Hu����Hcу?HHH rP���^dB�\���TdAU�H}�1`AU�I<$1`a8a8gYB�H1XHu�^t U�Hu����Hcу?HHH OB�1U���nffffffffH\$Hl$HLd$H8@��=UU�HR�H$@��1HcljH?HH���WS�uRT�u U�Hc?HHH��\T�u T�Hc?HHH���H$@��H3R���H$ @��H$(@��L$0@��H8@��fffHl$HL$ �@��D$ ����HA\�����t$ u7cB�H1U ~R�S����k���zm1`H\$�����=T��@��Hci�|}���H޿S�P���HZ_Ld$�����=S��@��L i�|e���LЌS�`PHcHS�_8~_8#t t_8#uHR�HR����{K_8Dffff7_8#tffff'_8#uH_R�HhR����^8^8#^8#f^8JVHaHHƿB�10TkffffffffS^���:A�HQ����*S=|R�t���B�N[^[ffffffffH\$Hl$HLd$Ll$Lt$HhDQP�HrO�HD$81Eu& Q�tHc?HHHuVffff Q�Hc?HHHteHD$8H3O���H\$@Hl$HLd$PLl$XLt$`HhÿS�aS�IS=kQ�LAM�IƉ|f���=P�t;Et6A}� t/=2Q�HMuD$ %��=���u DXm^S�\HcH{P�\8\8#\8#f=P�;=P�t3^P�d���SfffffUSH8HHl$`���HPHH���OHO�HuH1ҿ���OH8[]H\$,B�1V���H޿P�~ t$,;>��}fffff\8tH;O�����ffffffAV1HB�AUATUSH HD$����HD$����D$����*V:A����[PHN�����KO�JD�O�EC��kO�9aO�Lt$MUO�[O�Ll$Ld$Hl$9M‰D$$H|$D {N�E���H|$#HV�Ht Hxp����t e1ۅupE1LLLH HN�H���'uHt$H|$NKXkB�1UH=V�HGp����ZFf15PH|$Ht[H|$Ht[[R1E��H []A\A]A^þ@'A����N@'A����N@'A����NH5JM�B�1BN���,gfffffffffAW1AVAUATAUSH(<$B�HD$����HD$����D$$����D$ ����T:A����HL�����,N �"��߉RM�-PM�D%MM�K=>M�K=7M�tyKOK���gIM�Ll$ Lt$$RHM�L|$6aS�%������L�`ЌS�`S�`=L����EL�E1L�]D$����K����=sL�t{S�Num=]L�;=[L���YBL�J���v ���������TS�[H\mY޿S�WH-K�S�PNt4bt+S�9N`uP9ÉvPÉ눿ЌS�NB=�����A9Խ �����ЌS�MAa?��J�tJ�7��dK�9ZK�H|$MNK�<K�ALL9LЋ,K�9LЋ%K�9LЋ*K�9MLD$$IHZJ�Hx��Ht$H|$KH|$pH|$<���v ���������.SЌS�4ZHZ[W޿ЌS� VH-J�ЌS�Lt5`t+ЌS�L)_u`O9ÉvUOÉ1LffffMfffЌS�lLS�ZLL���D\$Ey3���pB�S�FPHH^Hމ¿S�tFH<WD$���1ff���L-H5H�B�1I���b=VI�[���DH�H� @'A����I@'A����I@'A����IH|$Ht fffVH|$HtVЌS�>KtB���PQЌS�&KЌS�JXHpY VЌS�KH,H�S�JtB����QS�JS�WH YUS�JHG�3PH G�HG�1H5G�LG�B�NS�[ЌS�[S�}[=G�tmU=G�G�CG����tIU=G�G�#G����t%UH\$G�K1���EH1H޿&Hy'}S8tsS8JB�H1]H;$tHc$Hc�B�1Jt$t2tƿPB�1%Ht$'B�1HH([]A\A]A^A_10B�gM���]O|$O,TNI!ffu B�1.MHP���1@S�gQHE�HF�B�HF�hB�HF�B�Ht>BF�BF�HF�B�@S�HF�B�HF�B�HÐaF�fffffffffffH^�tPS�HCfffPS�Y4����Hfffff"�Su+[ff1PS��XC�HH1YH6SPS�Gu[fffffffSH��H$@��H$H��H����GA�H$8��L$P��L$X��H)H$��)x)p)h)`)X)P)H)@ e�HfB�H$(��1tNH$��H\$ H���H$���HD$H$0��HD$0���HD$IH޿PS�FH$(��H3A�u H��[XffffffffHl$H\$HH5�HHt 18Lu1H\$Hl$Hffffft+t B�1T1B�F���fffff1Ҿ���HXHHrZHHƿB�1FHxQ���|fH\$Hl$HLd$Ll$���Lt$L|$HH ��H@�H$ ��1IvSG��H$���Z��$���%���=�����eH(B�PHI��=K_�uWH$ ��H3x@�L ��H$ ��H$ ��L$( ��L$0 ��L$8 ��L$@ ��HH ��fffffH$���LDmHEH��H}0L$���LE5@�HŅD��AHY���D$ ���D$���HXH�����HHY1H޿B�@HHNL��D$ t A9 ��D$���HtHLNh��B����HB����H\fffA9=H$� ��HٺB����1HOLE1THB�1ABHu�LPB�1AE1N L R?ME18�.M8DLH¿0B�1G;UH$� ��HٺB����1HlNSL8H$� ��SDLIB����H19N NtH$� ��B����H NH޿B�+?CfffffffHJ\�tQtat'fffffOPB�H1@1HfffH= A��t1(B�f@���Hø+C�H ���Ht���HÐH\$Hl$HLd$Ll$HLt$L|$H���I>IMQQE1HHHLIzKtOMtJAwLMD[�IE���LhJE1LHLL4KKLLL]L۸M C� B�HEL1B�~<H$���H$���L$���L$���L$���L$���Hĸ���HHHaD$ u$D$LI7LpB�1>XA;GuffffffffffffUE1H+C�SH��HV0LH;�H$��1C�B8/Ht5HM0IB�1���HK=��w6HKH\NHH$��H3^;�Hu H��[]&RB�1:NffffffffffHH=ƚ�AHH=�1H\$Hl$؉Ll$Lt$HLd$L|$HHD"�IIE���DE t DUE���Al@�EA B�tcPLDM'B�B�LE LLl$$B�EIHDL1AH\$Hl$ Ld$(Ll$0Lt$8L|$@HHAB�۸ B�LDffff�9E[ ���+C�LHA@�8:/G��fffDE E\ffffffHl$H\$HLd$Ll$Lt$H���H��LMx��2�HGuHt 8�1��H=%�H���,B�?���`�u%vX�up�unh�E1��=�L<IJIŋ?`����1ffCH9#`����H ݸS�H}�LL6tHu�1LB�;1_H}8>B�?�HDKHHHTE��T$%���=���`��Hu�HڿxB�1R;HH1H$���H$���L$���L$���L$���HĨ���D%QW�1E���To�uBg����tuH}�5m�� ��5'o���5g����S�l�����zk��Hu�1LB�:1DHAD$9V�v*H ݰS�H}�LLAA5t9V�KHu�1LB�>:1���5B�HHLƿ0B�1:ff1IH4GffHu�Hڿ8B�j�����Hu�L@B�91lS�~k��qj��Hu�1LB�91;fffffUHSHG=�H9HHHS�H8HHt7Hyu H1[]H4HH�t.HH[]9GHH¿hB�18H1[]HFB�>릐H=��t1 `B�t)11ffffB�H 9tHB��u1HcHH`B�ffUSHHH|$:H8~$ƿPB�1���B�E8 B�18HHB_��T$Hr���BHSEH[]ffffffffffS:`��H1Hu[H޿lB�=(���?H+>HEDI?[ffffH\$Hl$Ld$Ll$ILt$H8IH|$ I91H7�HHMHEHx(g5HEHx Z5HEHx ;x9tHEHx ;ډƿB�1H87~$ƿPB�1���B�6 B�17H57�HLHCH 6�LLB�1CHl$H\$Ld$ Ll$(Lt$0H8fffffffUSHHLHHtSH~46~$ƿPB�1���B�M6 B�16HHHLKH[]ÿB�1FffffffffUHSHH|$y8H6~$ƿPB�1���B�5 B�1y6�t3HH8��ŋT$H1@HBH[]fffffHH腍ːAVAUATUH���SH ��Hb2�H$��1o<H|$ 7H5~$ƿPB�1��B�!5 B�15:���H<Ht��HHE86�H] ��H2��HHE0E��E����B�p=C�B�HDЋEB�HD1HIE�tD5�E��H��D-�E��DeHU 'B�B�B�EHD1`:RP�t6Ds�E��B�HtD�EM��Lt$���1<@u;���fffEE1;H�}7DHHy��H@D�E���HsB�1E14DH��HPHLDhH=3�Ht@H3�����E��EE;�}G���T;/@:DD$�}5'A5),HY��fffHu @B�13맺���LHSAt}u$Hu B�1B HE0p�� B��o���Hu 1B�4S�L4@B����S�.S�\A۾B�t0HƉHL09 u!HT0H~HH< uH9�u1C�2DHPB�D@���S�1>S�1D �E4��"��B�B����Hn���9k>8H$��H3[.����H ��[]A\A]A^D濨B�121HBB�H����H6��D-/�E}=DpHE0HfaXD9QHB�1Z1@H{�E1H޿ B�16lHE0ff��8DSH|@�CP]A����=HH1[9fffUHSHH|$2H0~$ƿPB�1��� B�/ B�10HtzB� ���HuH}��t/H޿B�15H޿B�1M0H<H[]f bA�2���<���7H5f<6fff뽿pB�1N?f=-��SHy[Ð5���R7H5B�5<[�B�B�1)5fffffffffAUATIUSHH(DGE��H��fffLB�HS ������{��CC;���H1BL.�M��1A,B�L(FS�HM���I0���LHtI@Htϋ�tH(0'��H FS�HHBHމHp*뗾l@�2���_;4���6:k5H���H([]A\A]ÄHG0x���5`� ������S�z/���Hs B�1b=ffff���B�H)Hr<H*=HHO@3���E5H}31::4HD:H([]A\A]ú���B�HW)Hs @B�1-DL��2H1A,B����LLHw 1B�x<���B�S�(S�;H3ffffffffLd$Ll$1H\$Hl$H���H=�1E1;AtVHB���Hl$HH���`H}-HHDl@�IBDH8H9u>AD-��LH$���H$���L$���L$���HĨ���DE18LE18D8ffffffffffffffAWAVAUATIUSH=�p+H$9MHD$��1-1I-1I~-LHLB�I11AT$At$1B�0:���L2HHt��HAD$AD$}��Il$ LH.7��I\$(MLHHXB�1+I|$0HtL%HH��HT$H4$H.��1>&HHS'd��H;LS��MAD$ ����HD$J$C����H�Ll$Htz1H(FS�HHteHCHtDEtH3LN6uAD$1;�}ILpB�1&LS0I\$(LH6Ht$@B�1d&1LLKL6Lw6HL[]A\A]A^A_a6_�9��L_��ID$0L8I|$0�ID$ tB����L��L0B�1(ID$0p�t����L���A\$B�B�p=C�B�HDЅIE1<LX8ID$(1HtHD8D�ID$8E���H=�H,B�*=%��DM�E���HHHH5qLVffffL��ffID$0H$B�H01' B�1C(sID$0HL$B�H$H01q'B�1(+HL��AD$���LB�1H$qIt$018H��HB�17AWAVAUATIUSH���Hl$PLl$pHt$L$���L$���Hq:Li:L(L5HL #D$$���D$(���D$,���D$0���D$4���HD$8����D$D����HffJB����H���D$(����H7(���H#H_3LW3L(=��LL :HH���LL9HI���$���HH7"$���1H޿8B�$HI:$���H9*��4B����H'HD$,����s'<H޿B�1'QbB����Hu D$$����yB� ���H���D$0����E1B�1y'H���MtL.2H8L7HĨ���[]A\A]A^A_ËD$$ T%�D$( N%�D$, H%�D$0 B%�D$4 <%�H|$8�tH=5%�Ht1HD$8H%�1끿hB�1&UB����HuD$4�����Hw12B����HuSH$���H 8HHD$��H|$8$���H9��H|$8�Z��HD$HD$8B����H!��H$���H7HD$2H|$�HD$H���H|$"8$���H9���D$D���Ht$H|$H(u9HD$HT$HxB�H01:#Ht$HB�1MH|$_0tfffftD$D���H|$300B�1U%H|$0@B�1:%H|$�0B�1%H޿B�1 %H޿`B�1$yB�1$H|$/^B�1$MH޿B�$;ffffffSH"�"�����"�����"�����"�����H"�����"�����t.fffffHH{H"�/H/H~"�HuH=j"�Ht.HU"�����[�4fffffffffAWIAVAUIATIUHSH1Ht]�u���H[]A\A]A^A_À t t���B�H%u3H!����]��� t t,7��H둺���B�H$uB�H_!����]�뫺���B�H$u!�B�H/!����]�t���B�H\$u!-B�H ����]�=���FB�H%$��� ���fB�H $���B�H 9 ����]�HL$H��LLXB�1&B�LL1L-HLLB�1HLL1B�H1[]A\A]A^A_ÿMB�H ����]�RB�1`/ ���qB�H.#w�� l;�tp ���B�H #uZH H3Hx!!1H HHU�Ȅ��"��\Huuր}"HuuHu"ź���B�H"tv ���B�H"[��HH 03Hx 1I B1HHU�ȄN��"��\HuuՀ}"HuuHB1",=z�H$lHIH2Hx$ 1H HHU�Ȅ���"$��\Huuր}"HuuHu"H Hc2Hx1H]�HT� HHM�t^"���\HuuӀ}"HuuH�Hu"LL1B�u#LLB�1gH{*nLLB�1D#LLB�16H=�F*H�����.HcH�{B�H�H5�1]�HHL�H4$-t8 ��1>LLB�1"LLB�1H)H $I7L@B�1W1LB�l1���B�H  H]H0Hx"IEt+1<"u��JH<"j��B2D* HuLLB�1H!LLB�1L(�HH|$HB0�Lt$HH<��H0H=���(��HH|$HHC��&:n7�tHLb(]�LL1B�'!LLB�1L-( HH޿B��1HH޿B�1 ���Hc�HXHHU�]�~HH']�iHc1LA�LL�'5A�t^B�1Hki["LLL1B�G LL(B�19LM'@B� 1wLL濰B�1H LL濰B�1�USH�~F11HH5�B�H���HcF D���INVH$619-d�H[]ffR�S~'H>�1HÅt9���t'H���9u1hB�1:YH[É18B�"H[ÐHl$H\$HLd$H��D x�H�H$��1E���Dg4�EtMH=k4�H���Hn"}���=4����H�������1^B�11B�}1H$��H3P�M��H$��H$��L$��HĨ��ÿB� ,11�B�+110B�+1띋���53�H���=3�L���.��H���1ۋ8t 1Ҿ`wA�K+H���ڋ<uL$�����L)���5+3�t���L$��D���B����1LH$���r$���D���HߺB����1Q$L 'HH���&H������*H$��D���D���LẦB����H1#H1pB�1TZ"8wB�H1&ffffffH\$Hl$H7HHtC1޿B�&}tHH\$Hl$HfH\$Hl$HÐHl$H\$B�1H0fffAU1ATUB�SHR;&5�U��H�1H���H*��DE��u��P��H9us1B�H ��H���E1E1tBsB�1{H���A| �9t H���ADL,����uH`"H���Hǃ�������HtD"Hǃ�������H���Ht("Hǃ�������H���Ht "Hǃ�������H���Ht!Hǃ�������H[]A\A]ÃH���9HB�1xB�1g$ffffffffAUIATUSHH����:�K�����E11IL�EEt?Ax4t8IXL���B�HHutIXQ=��uQ���H޿S�yAH���D9%�=��tWIES�B�H0H1[]A\A](���B�S�&뙾/���HHzHXq���B�S�A*듋wHB�[]A\A]1fffffffH\$Hl$HHH���4t@HoLw1B�H{ uEJ&t*{8t fxcC4H\$Hl$HÐHxw{8uHCHH_x%uffffH\$Hl$B�1H8s8H¿B�1z�t�� ffffffffAU1AATLcLUB�SH+�~"H�1 t;k t;H���9uL8B�1@HLXB�[]A\A]1Ht⋻���O�� HI��HcK ���1sB�D9��������1ҾB�} 'B�t,B�tu1B�tk5B�ta>B�tW9B�tM =B�tC BB�t9GB�t/ LB�t%QB�tVB�t[B�`B�HEAADB�B�D'B�15���1B�A|$���A�#A|$tLo{4tHC ����H[]A\A]Ë���1ҾB�AI D 녋���sB�1ffffffHI= �ADt7A���t7A���ADD$�� �A$sHÿ B�1AqpB�1ffffAVIAUD-j�ATEUS~;HR�E1DHEt{4tH{LLt2AH���E9uL1xB�;1X[H]A\A]A^LDPB�[H]A\A]A^USHH}����4t1B�s1H[]H|$0- �HC(���$C<$C@$CD$H{(CH?����1B�D�E���HkLHs4H{0@���H耣�����H{(HtasHC(����1C0C4�B�lH1[]fffff1B��H1[]2$C@*$C<4ffffHkLHs4H{0@���HrbHC(����s1H0B�DJ �Et{{4Ht$D �EtTKDS@s<{0DCHp ~$ƿPB�1k��XB� B�1 H���;H{Htny D$wfffUSH���H �H$���1H= ��t,B�1H$���H3 �4��HĨ���[]Ð7B�mHH_ �^H��� HE �HcȾB�PS�1e1Ҿ������DU��H\$ 1j���HH5 �H{h���D$!"j���Hމ=2��`���4E��A���A���B�D$���HD$B�D$����$�@��mH=j �HnH������8B�H1=H=- �|H �����fffH= �Ht[H=� �HtZH= �>t1H �����H �����)8 B�H1* 5fffffW8 B�H1 [28fff B�H1 7>fU1C�B�SH f�9};-- �|D$ �꾤C�B�1Hcݺ���1H[HHHH= �`H ��k����ǃ���C0C4C8CHǃ�������-�H[]fffAT1UHSHcW w@B�}4tH(H}(HtH���HtH���HtH���HtsH���HtbH���HtQH����tN���t8E1H���DAHH<H���H|D9���wH���HU[}]A\IffffffAT �IUS~.11HH=q �tMtAԃH���9-[ �[]A\fffS1HB�\5 ����  �uyH����tjd�ubCtYH=��H{0t-H=�H=�)H�����I�u [@zA���u[��ffffff��ffffffATUS%HI���HcP B�1 A|$ ufA$���I$���Ht48t-11I$���H����<uADŽ$���L[]A\X1޿B� A|$4t[]LA\޿hB�1[]A\ []A\fffffffffff=�S~�����9}TxPHcH@HH����Hd�DE���Cs#�C�;����1C_ H[Ë b�AC�@B�1  b��19~1C�B� 5�H=����HcHt1=�H�G�dC��C�1�C� B�NH\$Hl$HLd$HADHſ;�C�1| Ht\HC0H]HHEt DKEuuB�1.fu1DpB�: D������H$Hl$Ld$H1T�C�_1fffffffffffSH��H�H$��1HHGt���H$��H3�uQHĐ��[HH0H$���e�C�f�1HH=yb�1Ҿm�C�)uHH*.fHS�>uHú���C�S�