mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge branch 'master' of http://github.com/oy/teeworlds
This commit is contained in:
commit
d6b898c84a
BIN
data/fonts/DejaVuSans.ttf
Normal file
BIN
data/fonts/DejaVuSans.ttf
Normal file
Binary file not shown.
BIN
data/fonts/FreeSansBold.ttf
Normal file
BIN
data/fonts/FreeSansBold.ttf
Normal file
Binary file not shown.
99
data/fonts/LICENSE
Normal file
99
data/fonts/LICENSE
Normal file
|
@ -0,0 +1,99 @@
|
|||
Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
|
||||
Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below)
|
||||
|
||||
Bitstream Vera Fonts Copyright
|
||||
------------------------------
|
||||
|
||||
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
|
||||
a trademark of Bitstream, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of the fonts accompanying this license ("Fonts") and associated
|
||||
documentation files (the "Font Software"), to reproduce and distribute the
|
||||
Font Software, including without limitation the rights to use, copy, merge,
|
||||
publish, distribute, and/or sell copies of the Font Software, and to permit
|
||||
persons to whom the Font Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright and trademark notices and this permission notice shall
|
||||
be included in all copies of one or more of the Font Software typefaces.
|
||||
|
||||
The Font Software may be modified, altered, or added to, and in particular
|
||||
the designs of glyphs or characters in the Fonts may be modified and
|
||||
additional glyphs or characters may be added to the Fonts, only if the fonts
|
||||
are renamed to names not containing either the words "Bitstream" or the word
|
||||
"Vera".
|
||||
|
||||
This License becomes null and void to the extent applicable to Fonts or Font
|
||||
Software that has been modified and is distributed under the "Bitstream
|
||||
Vera" names.
|
||||
|
||||
The Font Software may be sold as part of a larger software package but no
|
||||
copy of one or more of the Font Software typefaces may be sold by itself.
|
||||
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
|
||||
TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
|
||||
FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
|
||||
ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||
THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE
|
||||
FONT SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the names of Gnome, the Gnome
|
||||
Foundation, and Bitstream Inc., shall not be used in advertising or
|
||||
otherwise to promote the sale, use or other dealings in this Font Software
|
||||
without prior written authorization from the Gnome Foundation or Bitstream
|
||||
Inc., respectively. For further information, contact: fonts at gnome dot
|
||||
org.
|
||||
|
||||
Arev Fonts Copyright
|
||||
------------------------------
|
||||
|
||||
Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the fonts accompanying this license ("Fonts") and
|
||||
associated documentation files (the "Font Software"), to reproduce
|
||||
and distribute the modifications to the Bitstream Vera Font Software,
|
||||
including without limitation the rights to use, copy, merge, publish,
|
||||
distribute, and/or sell copies of the Font Software, and to permit
|
||||
persons to whom the Font Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright and trademark notices and this permission notice
|
||||
shall be included in all copies of one or more of the Font Software
|
||||
typefaces.
|
||||
|
||||
The Font Software may be modified, altered, or added to, and in
|
||||
particular the designs of glyphs or characters in the Fonts may be
|
||||
modified and additional glyphs or characters may be added to the
|
||||
Fonts, only if the fonts are renamed to names not containing either
|
||||
the words "Tavmjong Bah" or the word "Arev".
|
||||
|
||||
This License becomes null and void to the extent applicable to Fonts
|
||||
or Font Software that has been modified and is distributed under the
|
||||
"Tavmjong Bah Arev" names.
|
||||
|
||||
The Font Software may be sold as part of a larger software package but
|
||||
no copy of one or more of the Font Software typefaces may be sold by
|
||||
itself.
|
||||
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
|
||||
TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Tavmjong Bah shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Font Software without prior written authorization
|
||||
from Tavmjong Bah. For further information, contact: tavmjong @ free
|
||||
. fr.
|
||||
|
||||
$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $
|
|
@ -1368,14 +1368,14 @@ int str_utf8_forward(const char *str, int cursor)
|
|||
{
|
||||
if(!buf[1]) return cursor+1;
|
||||
if(!buf[2]) return cursor+2;
|
||||
return cursor+2;
|
||||
return cursor+3;
|
||||
}
|
||||
else if((*buf & 0xF8) == 0xF0) /* 11110xxx */
|
||||
{
|
||||
if(!buf[1]) return cursor+1;
|
||||
if(!buf[2]) return cursor+2;
|
||||
if(!buf[3]) return cursor+3;
|
||||
return cursor+3;
|
||||
return cursor+4;
|
||||
}
|
||||
|
||||
/* invalid */
|
||||
|
@ -1399,16 +1399,16 @@ int str_utf8_encode(char *ptr, int chr)
|
|||
else if(chr <= 0xFFFF)
|
||||
{
|
||||
ptr[0] = 0xE0|((chr>>12)&0x0F);
|
||||
ptr[1] = 0xC0|((chr>>6)&0x3F);
|
||||
ptr[2] = 0xC0|(chr&0x3F);
|
||||
ptr[1] = 0x80|((chr>>6)&0x3F);
|
||||
ptr[2] = 0x80|(chr&0x3F);
|
||||
return 3;
|
||||
}
|
||||
else if(chr <= 0x10FFFF)
|
||||
{
|
||||
ptr[0] = 0xF0|((chr>>18)&0x07);
|
||||
ptr[1] = 0xC0|((chr>>12)&0x3F);
|
||||
ptr[2] = 0xC0|((chr>>6)&0x3F);
|
||||
ptr[3] = 0xC0|(chr&0x3F);
|
||||
ptr[1] = 0x80|((chr>>12)&0x3F);
|
||||
ptr[2] = 0x80|((chr>>6)&0x3F);
|
||||
ptr[3] = 0x80|(chr&0x3F);
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
|
|
@ -150,7 +150,8 @@ void CInput::Update()
|
|||
{
|
||||
// handle keys
|
||||
case SDL_KEYDOWN:
|
||||
if(Event.key.keysym.unicode < 255) // ignore_convention
|
||||
// skip private use area of the BMP(contains the unicodes for keyboard function keys on MacOS)
|
||||
if(Event.key.keysym.unicode < 0xE000 || Event.key.keysym.unicode > 0xF8FF) // ignore_convention
|
||||
AddEvent(Event.key.keysym.unicode, 0, 0); // ignore_convention
|
||||
Key = Event.key.keysym.sym; // ignore_convention
|
||||
break;
|
||||
|
|
|
@ -247,9 +247,9 @@ class CTextRender : public IEngineTextRender
|
|||
m_FontTextureFormat, GL_UNSIGNED_BYTE, pData);
|
||||
}
|
||||
|
||||
// 8k of data used for rendering glyphs
|
||||
unsigned char ms_aGlyphData[(4096/64) * (4096/64)];
|
||||
unsigned char ms_aGlyphDataOutlined[(4096/64) * (4096/64)];
|
||||
// 32k of data used for rendering glyphs
|
||||
unsigned char ms_aGlyphData[(1024/8) * (1024/8)];
|
||||
unsigned char ms_aGlyphDataOutlined[(1024/8) * (1024/8)];
|
||||
|
||||
int GetSlot(CFontSizeData *pSizeData)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// copyright (c) 2007 magnus auvinen, see licence.txt for more info
|
||||
#include <base/math.h>
|
||||
#include <base/system.h>
|
||||
#include <engine/storage.h>
|
||||
#include "datafile.h"
|
||||
|
@ -158,7 +159,7 @@ bool CDataFileReader::Open(class IStorage *pStorage, const char *pFilename, int
|
|||
m_pDataFile = pTmpDataFile;
|
||||
|
||||
#if defined(CONF_ARCH_ENDIAN_BIG)
|
||||
swap_endian(m_pDataFile->m_pData, sizeof(int), min(Header.m_Swaplen, Size) / sizeof(int));
|
||||
swap_endian(m_pDataFile->m_pData, sizeof(int), min(static_cast<unsigned>(Header.m_Swaplen), Size) / sizeof(int));
|
||||
#endif
|
||||
|
||||
//if(DEBUG)
|
||||
|
|
|
@ -228,6 +228,9 @@ int CHuffman::Decompress(const void *pInput, int InputSize, void *pOutput, int O
|
|||
// {C} load symbol now if we didn't that earlier at location {A}
|
||||
if(!pNode)
|
||||
pNode = m_apDecodeLut[Bits&HUFFMAN_LUTMASK];
|
||||
|
||||
if(!pNode)
|
||||
return -1;
|
||||
|
||||
// {D} check if we hit a symbol already
|
||||
if(pNode->m_NumBits)
|
||||
|
|
|
@ -246,7 +246,7 @@ void CGameClient::OnInit()
|
|||
//default_font = gfx_font_load("data/fonts/sazanami-gothic.ttf");
|
||||
|
||||
char aFilename[512];
|
||||
IOHANDLE File = Storage()->OpenFile("fonts/vera.ttf", IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
|
||||
IOHANDLE File = Storage()->OpenFile("fonts/DejaVuSans.ttf", IOFLAG_READ, IStorage::TYPE_ALL, aFilename, sizeof(aFilename));
|
||||
if(File)
|
||||
io_close(File);
|
||||
pDefaultFont = TextRender()->LoadFont(aFilename);
|
||||
|
|
Loading…
Reference in a new issue