Page MenuHomePhabricator (Chris)

Use-system-Liberation-font-instead-of-bundled-Arial
No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None

Use-system-Liberation-font-instead-of-bundled-Arial

Description: Use system Liberation Sans font instead of bundled Arial.ttf
The original package has the proprietary Arial font in ttf format.
Replacing this with Liberation Sans means:
- we are using a font that's availabkle for both red hat and debian systems
- the font is installed by default on some systems (ubuntu I think)
- smaller binary package
- warm feelings
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2021-04-04
--- comecocos-1.0.orig/SRC/AlmacenDeFuentes.cpp
+++ comecocos-1.0/SRC/AlmacenDeFuentes.cpp
@@ -3,6 +3,6 @@
AlmacenDeFuentes::AlmacenDeFuentes()
{
- if (!arial.loadFromFile("./Fonts/arial.ttf"))
+ if (!liberation.loadFromFile("/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf"))
std::cout<<"fallo al leer la fuente "<<std::endl;
}
--- comecocos-1.0.orig/SRC/AlmacenDeFuentes.hpp
+++ comecocos-1.0/SRC/AlmacenDeFuentes.hpp
@@ -7,7 +7,7 @@ class AlmacenDeFuentes
private:
AlmacenDeFuentes();
- sf::Font arial;
+ sf::Font liberation;
public:
static const AlmacenDeFuentes& getInstancia()
@@ -16,7 +16,7 @@ public:
return instancia;
}
- const sf::Font& getArial() const {return arial;}
+ const sf::Font& getLiberation() const {return liberation;}
};
#endif // ALMACENDEFUENTES_H
--- comecocos-1.0.orig/SRC/Puntuacion.cpp
+++ comecocos-1.0/SRC/Puntuacion.cpp
@@ -8,7 +8,7 @@
Puntuacion::Puntuacion()
{
//ctor
- marcador.setFont(AlmacenDeFuentes::getInstancia().getArial());
+ marcador.setFont(AlmacenDeFuentes::getInstancia().getLiberation());
marcador.setPosition(300,640);
marcador.setCharacterSize(24);
marcador.setColor(sf::Color::White);
--- comecocos-1.0.orig/SRC/main.cpp
+++ comecocos-1.0/SRC/main.cpp
@@ -40,7 +40,7 @@ int main()
int nivel = 1;
sf::Text vidas_y_nivel;
- vidas_y_nivel.setFont(AlmacenDeFuentes::getInstancia().getArial());
+ vidas_y_nivel.setFont(AlmacenDeFuentes::getInstancia().getLiberation());
vidas_y_nivel.setCharacterSize(24);
vidas_y_nivel.setPosition(50,RESOLUCIONY-40);

File Metadata

Mime Type
text/x-diff
Expires
Sun, Nov 15, 1:49 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
133652
Default Alt Text
Use-system-Liberation-font-instead-of-bundled-Arial (2 KB)

Event Timeline