mirror of
https://github.com/mpv-player/mpv
synced 2025-03-26 22:42:47 +01: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 <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "font_load.h"
|
||||
@ -42,6 +45,7 @@ unsigned char sor[1024];
|
||||
unsigned char sor2[1024];
|
||||
font_desc_t *desc;
|
||||
FILE *f;
|
||||
struct stat fstate;
|
||||
char section[64];
|
||||
int i,j;
|
||||
int chardb=0;
|
||||
@ -51,10 +55,12 @@ int version=0;
|
||||
desc=malloc(sizeof(font_desc_t));if(!desc) return NULL;
|
||||
memset(desc,0,sizeof(font_desc_t));
|
||||
|
||||
desc->fpath=get_path("font/");
|
||||
|
||||
f=fopen(fname,"rt");if(!f){ printf("font: can't open file: %s\n",fname); return NULL;}
|
||||
|
||||
desc->fpath=get_path("font/");
|
||||
|
||||
if (stat(desc->fpath, &fstate)!=0) desc->fpath=DATADIR"/font";
|
||||
|
||||
// set up some defaults, and erase table
|
||||
desc->charspace=2;
|
||||
desc->spacewidth=12;
|
||||
|
Loading…
x
Reference in New Issue
Block a user