1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
/*
* Copyright (C) 2003 Martin Budaj
*
* $Date: $
* $RCSfile: $
* $Revision: $
*
* --------------------------------------------------------------------
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* --------------------------------------------------------------------
*/
#ifndef thtexfonts_h
#define thtexfonts_h
#include <string>
#include <list>
#include <vector>
#include <map>
std::string select_lang(std::string s, std::string lang);
struct fontrecord {
int id = {};
std::string rm,it,bf,ss,si;
bool opt = {};
};
extern std::list <fontrecord> FONTS;
int get_enc_id(const char* enc);
void print_tex_encodings (void);
void print_fonts_setup(void);
void init_encodings();
std::string utf2texoctal(std::string s);
std::string utf2texhex(std::string s);
std::string utf2tex (std::string s, bool b=false);
int tex2uni(std::string font, int ch);
std::string replace_all(std::string s, std::string f, std::string r);
struct encodings_new {
private:
std::vector<int> v_fon; // tex - unicode
std::map<int,int> m_fon; // unicode - tex
int i_fon; // last position
public:
int NFSS, t1_convert;
std::string otf_file[5];
encodings_new();
int get_enc_pos(int ch);
int get_enc_count();
int get_uni (int f, int ch);
void write_enc_files();
};
extern encodings_new ENC_NEW;
#endif
|