mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Qual: Work to allow externalizing of fonts.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
/*
|
||||
* PHP-Barcode 0.3pl1
|
||||
/* Copyright (C) 2001,2002,2003,2004 Folke Ashberg <folke@ashberg.de>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* PHP-Barcode 0.3pl2
|
||||
*
|
||||
* PHP-Barcode generates
|
||||
* - Barcode-Images using libgd2 (png, jpg, gif)
|
||||
@@ -15,8 +17,6 @@
|
||||
* I25, 128RAW, CBR, MSI, PLS
|
||||
* genbarcode is available at www.ashberg.de/bar
|
||||
*
|
||||
* (C) 2001,2002,2003,2004 by Folke Ashberg <folke@ashberg.de>
|
||||
*
|
||||
* The newest version can be found at http://www.ashberg.de/bar
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -60,14 +60,15 @@ $text_color=Array(0,0,0);
|
||||
/* SAMPLE2 :
|
||||
* use font specified by full-path
|
||||
*/
|
||||
$font_loc = DOL_DOCUMENT_ROOT.'/includes/barcode/php-barcode/fonts/AerialBd.ttf';
|
||||
|
||||
if (defined('DOL_DEFAULT_TTF_BOLD')) $font_loc=constant('DOL_DEFAULT_TTF_BOLD');
|
||||
/* Automatic-Detection of Font if running Windows
|
||||
* kick this lines if you don't need them! */
|
||||
// DOL_CHANGE LDR
|
||||
if (isset($_SERVER['WINDIR']) && @file_exists($_SERVER['WINDIR'])){
|
||||
$font_loc=$_SERVER['WINDIR']."\Fonts\arialbd.ttf";
|
||||
}
|
||||
if (empty($font_loc)) die('DOL_DEFAULT_TTF_BOLD must de defined with full path to a TTF font.');
|
||||
|
||||
|
||||
/* ******************************************************************** */
|
||||
/* GENBARCODE */
|
||||
@@ -76,15 +77,10 @@ if (isset($_SERVER['WINDIR']) && @file_exists($_SERVER['WINDIR'])){
|
||||
* leave blank if you don't have them :(
|
||||
* genbarcode is needed to render encodings other than EAN-12/EAN-13/ISBN
|
||||
*/
|
||||
|
||||
// DOL_CHANGE LDR
|
||||
if (isset($_SERVER['WINDIR']) && empty($conf->global->GENBARCODE_LOCATION))
|
||||
{
|
||||
$genbarcode_loc = DOL_DOCUMENT_ROOT.'/includes/barcode/php-barcode/genbarcode/genbarcode.exe';
|
||||
}
|
||||
else
|
||||
{
|
||||
$genbarcode_loc = $conf->global->GENBARCODE_LOCATION;
|
||||
}
|
||||
if (defined('PHP-BARCODE_PATH_COMMAND')) $genbarcode_loc=constant('PHP-BARCODE_PATH_COMMAND');
|
||||
else $genbarcode_loc = $conf->global->GENBARCODE_LOCATION;
|
||||
//dol_syslog("genbarcode_loc=".$genbarcode_loc." - env_windows=".$_SERVER['WINDIR']);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user