Copyright 2010, SIL International All rights reserved.
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 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 Lesser General Public License for more details.
You should also have received a copy of the GNU Lesser General Public License along with this library in the file named "LICENSE". If not, write to the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA or visit their web page on the internet at http://www.fsf.org/licenses/lgpl.html.
Alternatively, the contents of this file may be used under the terms of the Mozilla Public License (http://mozilla.org/MPL) or 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.
*/ #include"graphite2/Font.h" #include"inc/Face.h" #include"inc/FileFace.h" #include"inc/GlyphCache.h" #include"inc/CmapCache.h" #include"inc/Silf.h" #include"inc/json.h"
inline
uint32 zeropad(const uint32 x)
{ if (x == 0x20202020) return 0; if ((x & 0x00FFFFFF) == 0x00202020) return x & 0xFF000000; if ((x & 0x0000FFFF) == 0x00002020) return x & 0xFFFF0000; if ((x & 0x000000FF) == 0x00000020) return x & 0xFFFFFF00; return x;
}
}
extern"C" {
gr_face* gr_make_face_with_ops(constvoid* appFaceHandle/*non-NULL*/, const gr_face_ops *ops, unsigned int faceOptions) //the appFaceHandle must stay alive all the time when the gr_face is alive. When finished with the gr_face, call destroy_face
{ if (ops == 0) return 0;
Face *res = new Face(appFaceHandle, *ops); if (res && load_face(*res, faceOptions)) returnstatic_cast<gr_face *>(res);
unsignedshort gr_face_n_fref(const gr_face* pFace)
{
assert(pFace); int res = 0; for (int i = 0; i < pFace->numFeatures(); ++i) if (!(pFace->feature(i)->getFlags() & FeatureRef::HIDDEN))
++res; return res;
}
const gr_feature_ref* gr_face_fref(const gr_face* pFace, gr_uint16 i) //When finished with the FeatureRef, call destroy_FeatureRef
{
assert(pFace); int count = 0; for (int j = 0; j < pFace->numFeatures(); ++j)
{ const FeatureRef* pRef = pFace->feature(j); if (!(pRef->getFlags() & FeatureRef::HIDDEN)) if (count++ == i) returnstatic_cast<const gr_feature_ref*>(pRef);
} return 0;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.