mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-06 03:00:43 +00:00
Some FreeSans font magic
This commit is contained in:
parent
e7f358461f
commit
d0f4269ee6
@ -96,6 +96,9 @@
|
|||||||
<Unit filename="../../src/SleepyHeadMain.cpp" />
|
<Unit filename="../../src/SleepyHeadMain.cpp" />
|
||||||
<Unit filename="../../src/SleepyHeadMain.h" />
|
<Unit filename="../../src/SleepyHeadMain.h" />
|
||||||
<Unit filename="../../src/WxWizFrame.fbp" />
|
<Unit filename="../../src/WxWizFrame.fbp" />
|
||||||
|
<Unit filename="../../src/graphs/freesans.c">
|
||||||
|
<Option compilerVar="CC" />
|
||||||
|
</Unit>
|
||||||
<Unit filename="../../src/graphs/graph.cpp" />
|
<Unit filename="../../src/graphs/graph.cpp" />
|
||||||
<Unit filename="../../src/graphs/graph.h" />
|
<Unit filename="../../src/graphs/graph.h" />
|
||||||
<Unit filename="../../src/libs/sleeplib/binary_file.cpp" />
|
<Unit filename="../../src/libs/sleeplib/binary_file.cpp" />
|
||||||
|
@ -8306,7 +8306,7 @@
|
|||||||
<sleeplib/machine.h>
|
<sleeplib/machine.h>
|
||||||
<list>
|
<list>
|
||||||
|
|
||||||
1307816862 /home/mark/projects/git/sleepyhead/src/version.h
|
1307848442 /home/mark/projects/git/sleepyhead/src/version.h
|
||||||
|
|
||||||
1307627540 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.h
|
1307627540 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.h
|
||||||
"machine.h"
|
"machine.h"
|
||||||
@ -8344,7 +8344,7 @@
|
|||||||
"sleeplib/profiles.h"
|
"sleeplib/profiles.h"
|
||||||
"sleeplib/machine_loader.h"
|
"sleeplib/machine_loader.h"
|
||||||
|
|
||||||
1307816469 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
|
1307848441 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
|
||||||
<wx/settings.h>
|
<wx/settings.h>
|
||||||
<wx/dcbuffer.h>
|
<wx/dcbuffer.h>
|
||||||
<wx/graphics.h>
|
<wx/graphics.h>
|
||||||
@ -8354,6 +8354,7 @@
|
|||||||
<math.h>
|
<math.h>
|
||||||
"graph.h"
|
"graph.h"
|
||||||
"sleeplib/profiles.h"
|
"sleeplib/profiles.h"
|
||||||
|
"freesans.c"
|
||||||
|
|
||||||
1307623396 source:/home/mark/projects/git/sleepyhead/src/libs/sleeplib/binary_file.cpp
|
1307623396 source:/home/mark/projects/git/sleepyhead/src/libs/sleeplib/binary_file.cpp
|
||||||
<wx/filename.h>
|
<wx/filename.h>
|
||||||
@ -10888,3 +10889,7 @@
|
|||||||
<qcolor.h>
|
<qcolor.h>
|
||||||
<ft2build.h>
|
<ft2build.h>
|
||||||
|
|
||||||
|
1307847400 source:/home/mark/projects/git/sleepyhead/src/graphs/freesans.c
|
||||||
|
|
||||||
|
1307847400 /home/mark/projects/git/sleepyhead/src/graphs/freesans.c
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
<CodeBlocks_layout_file>
|
<CodeBlocks_layout_file>
|
||||||
<ActiveTarget name="Debug-wx29" />
|
<ActiveTarget name="Debug" />
|
||||||
<File name="../../src/GUIFrame.cpp" open="0" top="0" tabpos="14">
|
<File name="../../src/GUIFrame.cpp" open="0" top="0" tabpos="14">
|
||||||
<Cursor position="1300" topLine="24" />
|
<Cursor position="1300" topLine="24" />
|
||||||
</File>
|
</File>
|
||||||
@ -16,11 +16,14 @@
|
|||||||
<File name="../../src/SleepyHeadMain.h" open="1" top="0" tabpos="3">
|
<File name="../../src/SleepyHeadMain.h" open="1" top="0" tabpos="3">
|
||||||
<Cursor position="602" topLine="12" />
|
<Cursor position="602" topLine="12" />
|
||||||
</File>
|
</File>
|
||||||
<File name="../../src/graphs/graph.cpp" open="1" top="0" tabpos="7">
|
<File name="../../src/graphs/freesans.c" open="1" top="0" tabpos="10">
|
||||||
<Cursor position="11827" topLine="199" />
|
<Cursor position="0" topLine="0" />
|
||||||
|
</File>
|
||||||
|
<File name="../../src/graphs/graph.cpp" open="1" top="1" tabpos="7">
|
||||||
|
<Cursor position="1108" topLine="39" />
|
||||||
</File>
|
</File>
|
||||||
<File name="../../src/graphs/graph.h" open="1" top="0" tabpos="8">
|
<File name="../../src/graphs/graph.h" open="1" top="0" tabpos="8">
|
||||||
<Cursor position="8777" topLine="237" />
|
<Cursor position="8777" topLine="0" />
|
||||||
</File>
|
</File>
|
||||||
<File name="../../src/libs/sleeplib/binary_file.cpp" open="0" top="0" tabpos="11">
|
<File name="../../src/libs/sleeplib/binary_file.cpp" open="0" top="0" tabpos="11">
|
||||||
<Cursor position="7148" topLine="269" />
|
<Cursor position="7148" topLine="269" />
|
||||||
@ -43,8 +46,8 @@
|
|||||||
<File name="../../src/libs/sleeplib/machine_loader.h" open="0" top="0" tabpos="14">
|
<File name="../../src/libs/sleeplib/machine_loader.h" open="0" top="0" tabpos="14">
|
||||||
<Cursor position="222" topLine="0" />
|
<Cursor position="222" topLine="0" />
|
||||||
</File>
|
</File>
|
||||||
<File name="../../src/libs/sleeplib/profiles.cpp" open="0" top="0" tabpos="10">
|
<File name="../../src/libs/sleeplib/profiles.cpp" open="1" top="0" tabpos="9">
|
||||||
<Cursor position="2681" topLine="49" />
|
<Cursor position="601" topLine="1" />
|
||||||
</File>
|
</File>
|
||||||
<File name="../../src/libs/sleeplib/profiles.h" open="0" top="0" tabpos="13">
|
<File name="../../src/libs/sleeplib/profiles.h" open="0" top="0" tabpos="13">
|
||||||
<Cursor position="757" topLine="15" />
|
<Cursor position="757" topLine="15" />
|
||||||
|
38368
src/graphs/freesans.c
Normal file
38368
src/graphs/freesans.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -14,6 +14,7 @@ License: LGPL
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "graph.h"
|
#include "graph.h"
|
||||||
#include "sleeplib/profiles.h"
|
#include "sleeplib/profiles.h"
|
||||||
|
#include "freesans.c"
|
||||||
|
|
||||||
#if !wxUSE_GLCANVAS
|
#if !wxUSE_GLCANVAS
|
||||||
#error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the wx library"
|
#error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the wx library"
|
||||||
@ -47,13 +48,25 @@ bool gfont_init=false;
|
|||||||
FTGLPixmapFont *normalfont=NULL;
|
FTGLPixmapFont *normalfont=NULL;
|
||||||
FTGLTextureFont *rotfont=NULL;
|
FTGLTextureFont *rotfont=NULL;
|
||||||
|
|
||||||
|
list<wxString> font_paths;
|
||||||
|
|
||||||
// Must be called from a thread inside the application.
|
// Must be called from a thread inside the application.
|
||||||
void GraphInit()
|
void GraphInit()
|
||||||
{
|
{
|
||||||
if (!gfont_init) {
|
if (!gfont_init) {
|
||||||
const char *fontfile="/usr/share/fonts/truetype/freefont/FreeSans.ttf";
|
wxString fontfile=pref.Get("{home}{sep}FreeSans.ttf");
|
||||||
normalfont=new FTGLPixmapFont(fontfile);
|
if (!wxFileExists(fontfile)) {
|
||||||
rotfont=new FTGLTextureFont(fontfile);
|
wxFFile f;
|
||||||
|
f.Open(fontfile,wxT("wb"));
|
||||||
|
long size=sizeof(FreeSans_ttf);
|
||||||
|
if (!f.Write(FreeSans_ttf,size)) {
|
||||||
|
wxLogError(wxT("Couldn't Write Font file.. Sorry.. need it to run"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
f.Close();
|
||||||
|
}
|
||||||
|
normalfont=new FTGLPixmapFont(fontfile.mb_str());
|
||||||
|
rotfont=new FTGLTextureFont(fontfile.mb_str());
|
||||||
if (normalfont->Error()) {
|
if (normalfont->Error()) {
|
||||||
delete normalfont;
|
delete normalfont;
|
||||||
normalfont=NULL;
|
normalfont=NULL;
|
||||||
|
@ -16,14 +16,14 @@ namespace AutoVersion{
|
|||||||
//Standard Version Type
|
//Standard Version Type
|
||||||
static const long MAJOR = 0;
|
static const long MAJOR = 0;
|
||||||
static const long MINOR = 7;
|
static const long MINOR = 7;
|
||||||
static const long BUILD = 5007;
|
static const long BUILD = 5012;
|
||||||
static const long REVISION = 10634;
|
static const long REVISION = 10657;
|
||||||
|
|
||||||
//Miscellaneous Version Types
|
//Miscellaneous Version Types
|
||||||
static const long BUILDS_COUNT = 4412;
|
static const long BUILDS_COUNT = 4422;
|
||||||
#define RC_FILEVERSION 0,7,5007,10634
|
#define RC_FILEVERSION 0,7,5012,10657
|
||||||
#define RC_FILEVERSION_STRING "0, 7, 5007, 10634\0"
|
#define RC_FILEVERSION_STRING "0, 7, 5012, 10657\0"
|
||||||
static const char FULLVERSION_STRING[] = "0.7.5007.10634";
|
static const char FULLVERSION_STRING[] = "0.7.5012.10657";
|
||||||
|
|
||||||
//These values are to keep track of your versioning state, don't modify them.
|
//These values are to keep track of your versioning state, don't modify them.
|
||||||
static const long BUILD_HISTORY = 0;
|
static const long BUILD_HISTORY = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user