Back to index

tetex-bin  3.0
epdf.c
Go to the documentation of this file.
00001 /*
00002 Copyright (c) 1996-2002 Han The Thanh, <thanh@pdftex.org>
00003 
00004 This file is part of pdfTeX.
00005 
00006 pdfTeX is free software; you can redistribute it and/or modify
00007 it under the terms of the GNU General Public License as published by
00008 the Free Software Foundation; either version 2 of the License, or
00009 (at your option) any later version.
00010 
00011 pdfTeX is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU General Public License for more details.
00015 
00016 You should have received a copy of the GNU General Public License
00017 along with pdfTeX; if not, write to the Free Software
00018 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020 $Id: //depot/Build/source.development/TeX/texk/web2c/pdftexdir/epdf.c#7 $
00021 */
00022 
00023 #include "ptexlib.h"
00024 #include <kpathsea/c-vararg.h>
00025 #include <kpathsea/c-proto.h>
00026 
00027 integer pdfbufmax = pdfbufsize;
00028 
00029 extern void epdf_check_mem(void);
00030 
00031 int is_subsetable(fm_entry *fm)
00032 {
00033     return is_included(fm) && is_subsetted(fm);
00034 }
00035 
00036 int is_type1(fm_entry *fm)
00037 {
00038     return is_t1fontfile(fm);
00039 }
00040 
00041 void mark_glyphs(fm_entry *fm, char *charset)
00042 {
00043     char *new_charset = fm->charset;
00044     if (charset == NULL)
00045         return;
00046     if (new_charset == NULL)
00047         new_charset = xstrdup(charset);
00048     else {
00049         new_charset = xretalloc(new_charset, 
00050                                 strlen(new_charset) + strlen(charset) + 1,
00051                                 char);
00052         strcat(new_charset, charset);
00053     }
00054     fm->charset = new_charset;
00055 }
00056 
00057 void embed_whole_font(fm_entry *fm)
00058 {
00059     fm->all_glyphs = true;
00060 }
00061 
00062 integer get_fontfile(fm_entry *fm)
00063 {
00064     return fm->ff_objnum;
00065 }
00066 
00067 integer get_fontname(fm_entry *fm)
00068 {
00069     if (fm->fn_objnum == 0)
00070         fm->fn_objnum = pdfnewobjnum();
00071     return fm->fn_objnum;
00072 }
00073 
00074 void epdf_free(void)
00075 {
00076     epdf_check_mem();
00077 }