mirror of
https://github.com/mpv-player/mpv
synced 2025-05-09 10:21:43 +02:00
DATADIR/font/ patch by Adam Tla/lka atlka@pg.gda.pl
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1447 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e532f050ac
commit
65a1786c01
@ -2,6 +2,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "font_load.h"
|
#include "font_load.h"
|
||||||
@ -42,6 +45,7 @@ unsigned char sor[1024];
|
|||||||
unsigned char sor2[1024];
|
unsigned char sor2[1024];
|
||||||
font_desc_t *desc;
|
font_desc_t *desc;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
struct stat fstate;
|
||||||
char section[64];
|
char section[64];
|
||||||
int i,j;
|
int i,j;
|
||||||
int chardb=0;
|
int chardb=0;
|
||||||
@ -51,9 +55,11 @@ int version=0;
|
|||||||
desc=malloc(sizeof(font_desc_t));if(!desc) return NULL;
|
desc=malloc(sizeof(font_desc_t));if(!desc) return NULL;
|
||||||
memset(desc,0,sizeof(font_desc_t));
|
memset(desc,0,sizeof(font_desc_t));
|
||||||
|
|
||||||
|
f=fopen(fname,"rt");if(!f){ printf("font: can't open file: %s\n",fname); return NULL;}
|
||||||
|
|
||||||
desc->fpath=get_path("font/");
|
desc->fpath=get_path("font/");
|
||||||
|
|
||||||
f=fopen(fname,"rt");if(!f){ printf("font: can't open file: %s\n",fname); return NULL;}
|
if (stat(desc->fpath, &fstate)!=0) desc->fpath=DATADIR"/font";
|
||||||
|
|
||||||
// set up some defaults, and erase table
|
// set up some defaults, and erase table
|
||||||
desc->charspace=2;
|
desc->charspace=2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user