CONSTABLE DE FUNTA CONTRACIÓN DE ADÓN CÁRCO Y SIMPLE.
"Font Stash permite una representación de cadenas fácil en aplicaciones OpenGL. Admite fuentes TrueType y cadenas localizadas codificadas UTF-8. Todos los glifos se almacenan en caché en atlas de textura OpenGL. La rasterización de fuentes se realiza utilizando el STB_Truetype de Sean Barrett.h".
Características principales:
Hice pequeñas modificaciones para fontstash para hacer que el texto se voltee verticalmente, para jugar más agradable en el universo OpenFrameworks en general. También informará cada vez que se cree una nueva textura. Se han realizado otras modificaciones para admitir mipmaps, espaciado de personajes, kerning y soporte de retina.
OfXFontStash admite dibujo de texto básico de una línea, lineHeight, representación de texto multilínea basada en ' n', y también envolviendo palabras para dibujar un párrafo limitado a cierto ancho. También ofrece cálculos de Bbox en todas las opciones de dibujo. Requiere una rama particular de Ofxunicode.
Hice algunas modificaciones adicionales a FontStash para permitir la creación de MIPMAPS, y para permitir el uso de la información de kerning especificada por la fuente, por lo que el espacio entre los pares de caracteres se muestra como su diseñador previsto.
OfXFontStash es bastante rápido para dibujar texto. Si necesita dibujar una columna de texto alineada a la izquierda de cierto ancho, OfXFontStash puede ser ~ 10 veces más rápido que OFXFTGL.
Font Stash fue creado y publicado originalmente por Mikko Mononen.
Para que esto funcione en una Raspberry Pi, debe cambiar el nombre de "libs/fontstash/src/fontstash.c" y "libs/fontstash/src/stb_truetype.c" de *.c a *.cpp.
OfXFontStash.cpp y OfXFontStash.h han sido creados por Oriol Ferrer Mesià y lanzado bajo la licencia 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.
Los archivos fontstash.c, fontstash.h y main.c tienen licencia bajo la licencia 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.
Para la decodificación de UTF-8, Font Stash utiliza el decodificador UTF-8 flexible y económico de Björn Höhrmann (incluido en FontStash.c). Su código tiene licencia bajo la licencia 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.
Finalmente, Font Stash utiliza el rasterizador de fuentes de dominio público de Sean Barrett stb_truetype.h.