Échange de polices d'emballage d'addons rapides et simples.
"Font Stash permet un rendu de chaîne facile dans les applications OpenGL. Il prend en charge les polices TrueType et les chaînes localisées codées UTF-8. Tous les glyphes sont mis en cache dans les atlas de texture OpenGL. La rasterisation de la police est effectuée à l'aide de STB_TRUETYPE.H de Sean Barrett."
Caractéristiques principales:
J'ai apporté de minuscules modifications à Fontstash pour rendre le texte retourné verticalement, pour jouer plus agréable dans l'univers OpenFrameWorks en général. Il rapportera également chaque fois qu'une nouvelle texture est créée. D'autres modifications ont été apportées à la prise en charge des MIPMAP, de l'espacement des caractères, de la création et du support de rétine.
OFXFONTSTASH prend en charge le dessin de texte en une ligne de base, le rendu de texte multiligne basé sur « n», et également les mots pour dessiner un paragraphe contraint à une certaine largeur. Il propose également des calculs BBOX sur toutes les options de dessin. Il nécessite une branche particulière de OFUnicode.
J'ai apporté d'autres modifications à Fontstash pour permettre la création de MIPMAP et pour permettre l'utilisation des informations de transactions spécifiées par la police, de sorte que l'espacement entre les paires de caractères est indiqué comme son concepteur prévu.
OFXFONTSTASH est assez rapide pour dessiner du texte. Si vous devez dessiner une colonne de texte alignée gauche d'une certaine largeur, OFXFontstash peut être ~ 10x plus rapide que OFXFTGL.
Font Stash a été créé à l'origine et publié par Mikko Mononen.
Pour faire fonctionner cela sur un Raspberry Pi, vous devez renommer "LIBS / FONTSTASH / SRC / FONTSTASH.C" et "LIBS / FONTSTASH / SRC / STB_TrueType.c" de * .c à * .cpp.
OFXFONTSTASH.CPP et OFFONTSTASH.H ont été créés par Oriol Ferrer Mesià et libérés sous la licence du 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.
Les fichiers Fontstash.c, Fontstash.h et Main.c sont concédés sous licence 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.
Pour le décodage UTF-8, la réserve de police utilise le décodeur UTF-8 flexible et économique de Björn Höhrmann (inclus dans Fontstash.c). Son code est autorisé sous la licence du 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.
Enfin, Font Stash utilise Rasterizer STB_TRUETYPE.H du domaine public de Sean Barrett.