迅速でシンプルなアドオンラッピングフォントスターシュ。
「Font Stashは、OpenGLアプリケーションで簡単な弦レンダリングを可能にします。TrueTypeFontsとUTF-8エンコードされたローカライズされた文字列をサポートします。すべてのグリフはOpenGLテクスチャアトラーゼでキャッシュされます。SeanBarrettのSTB_TrueType.Hを使用してフォントラスター化が行われます。」
主な機能:
フォントスタッシュに小さな変更を加えて、テキストを垂直に裏返し、一般的にOpenFrameWorksのユニバースでより良く再生するようにしました。また、新しいテクスチャが作成されるたびに報告します。 MIPMAP、キャラクター間隔、カーニング、および網膜サポートをサポートするために、その他の変更が行われています。
OfxFontStashは、「 n」に基づいた基本的な1行のテキスト図面、LineHeeight、Multiline Textレンダリング、および特定の幅に制約された段落を描くためのワードラーピングをサポートしています。また、すべての描画オプションに関するBBOX計算も提供します。 ofxunicodeの特定の分岐が必要です。
MIPMAPの作成を可能にし、フォント指定のカーニング情報の使用を可能にするために、FontStashをさらに変更したため、デザイナーが意図したように、文字ペア間の間隔が表示されます。
OfxFontStashは、テキストを描画するのが非常に速いです。一定の幅の左並置されたテキスト列を描画する必要がある場合、ofxfontstashはofxftglよりも〜10倍高速になる可能性があります。
Font StashはもともとMikko Mononenによって作成および公開されました。
これをRaspberry Piで動作させるには、「libs/fontstash/src/fontstash.c」と「libs/fontstash/src/stb_truetype.c」を *.cから *.cpp。
ofxfontstash.cppおよびofxfontstash.hは、Oriol FerrerMesiàによって作成され、MITライセンスの下でリリースされました。
Copyright (c) 2012 Oriol Ferrer Mesià
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ファイルfontstash.c、fontstash.h、およびmain.cは、ZLIBライセンスの下でライセンスされています。
Copyright (c) 2011 Andreas Krinke [email protected]
Copyright (c) 2009 Mikko Mononen [email protected]
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
UTF-8デコードには、Font StashはBjörnHöhrmannの柔軟で経済的なUTF-8デコーダー(fontstash.cに含まれています)を使用します。彼のコードは、MITライセンスに基づいてライセンスされています。
Copyright (c) 2008-2009 Bjoern Hoehrmann <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
最後に、Font StashはSean BarrettのパブリックドメインTrueType Font Rasterizer STB_TRUETYPE.Hを使用します。