Coder Social home page Coder Social logo

sippy-ftgl's Introduction

This is a Python binding for the FTGL library.  

It requires the following:
* FTGL v2.1.3~rc5 
* Freetype v2.3.9

Once installed (see INSTALL for instructions), your Python application can use FTGL as follows.

First, import the module:
        import FTGL

Usage is the same as the C++ API, with the following caveats:

* font.BBox method
  * Instead of font.BBox(...), one first creates a BBox
        bbox = FTGL.BBox()
  * now pass in the font and string value
        bbox.setValuesUsingFont(font, str)

sippy-ftgl's People

sippy-ftgl's Issues

Building on Windows

I'm trying to make a Windows 64-bit build, since PyFTGL was giving me fits with 
linking against Boost. Unfortunately I'm running into problems with sippy-ftgl 
too. 

I had to hand-hack the generated Makefile because Visual Studio's nmake doesn't 
recognize the /L parameter and thus wasn't finding the FTGL .lib file to link 
against. Thus the lines defining LFLAGS and LIBS are now this:

LFLAGS =  /NOLOGO /DLL /MANIFEST /MANIFESTFILE:$(TARGET).manifest 
/SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' 
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' 
publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" 
/INCREMENTAL:NO
LIBS = /LIBPATH:C:\Python27x64\libs python27.lib 
/LIBPATH:C:\omxBuildDependencies\ftgl-2.1.3~rc5\msvc\Build ftgl.lib
.SUFFIXES: .c .cpp .cc .cxx .C

When I build, I get a bunch of link errors (pasted at the end). If I try to 
build again after these errors, then I get this error:
fatal error LNK1149: output filename matches input filename 
'C:\omxBuildDependencies\sippy-ftgl-0.1\FTGL.lib'

It appears that the build process is generating an "FTGL.lib" in the sippy 
directory as a prelude (or replacement?) for generating the .pyd file, which is 
causing confusion on repeat builds. "make clean" doesn't remove these files 
either, though I can of course delete them by hand. If I change the TARGET 
variable from "FTGL.pyd" to "FTGLpy.pyd" to remove the naming conflict, then I 
consistently get the link errors. 

I've attached my hand-hacked makefile for your perusal. Please let me know if 
you can see what's going wrong.

Here's the link errors:

link /NOLOGO /DLL /MANIFEST /MANIFESTFILE:FTGL.pyd.manifest /SUBSYSTEM:WINDOWS 
"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' 
version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' 
processorArchitecture='*'" /INCREMENTAL:NO /OUT:FTGL.pyd 
@C:\Users\admin\AppData\Local\Temp\nm5BC1.tmp
   Creating library FTGL.lib and object FTGL.exp
sipFTGLFTGLPolygonFont.obj : error LNK2001: unresolved external symbol "public: 
virtual class FTBBox __cdecl FTFont::BBox(unsigned short const *,int,class 
FTPoint,class FTPoint)" (?BBox@FTFont@@UEAA?AVFTBBox@@PEBGHVFTPoint@@1@Z)
sipFTGLFTGLOutlineFont.obj : error LNK2001: unresolved external symbol "public: 
virtual class FTBBox __cdecl FTFont::BBox(unsigned short const *,int,class 
FTPoint,class FTPoint)" (?BBox@FTFont@@UEAA?AVFTBBox@@PEBGHVFTPoint@@1@Z)
sipFTGLFTGLPixmapFont.obj : error LNK2001: unresolved external symbol "public: 
virtual class FTBBox __cdecl FTFont::BBox(unsigned short const *,int,class 
FTPoint,class FTPoint)" (?BBox@FTFont@@UEAA?AVFTBBox@@PEBGHVFTPoint@@1@Z)
sipFTGLFTGLTextureFont.obj : error LNK2001: unresolved external symbol "public: 
virtual class FTBBox __cdecl FTFont::BBox(unsigned short const *,int,class 
FTPoint,class FTPoint)" (?BBox@FTFont@@UEAA?AVFTBBox@@PEBGHVFTPoint@@1@Z)
sipFTGLFTGLBitmapFont.obj : error LNK2001: unresolved external symbol "public: 
virtual class FTBBox __cdecl FTFont::BBox(unsigned short const *,int,class 
FTPoint,class FTPoint)" (?BBox@FTFont@@UEAA?AVFTBBox@@PEBGHVFTPoint@@1@Z)
sipFTGLFTGLExtrdFont.obj : error LNK2001: unresolved external symbol "public: 
virtual class FTBBox __cdecl FTFont::BBox(unsigned short const *,int,class 
FTPoint,class FTPoint)" (?BBox@FTFont@@UEAA?AVFTBBox@@PEBGHVFTPoint@@1@Z)
sipFTGLFTGLPolygonFont.obj : error LNK2001: unresolved external symbol "public: 
virtual float __cdecl FTFont::Advance(unsigned short const *,int,class 
FTPoint)" (?Advance@FTFont@@UEAAMPEBGHVFTPoint@@@Z)
sipFTGLFTGLOutlineFont.obj : error LNK2001: unresolved external symbol "public: 
virtual float __cdecl FTFont::Advance(unsigned short const *,int,class 
FTPoint)" (?Advance@FTFont@@UEAAMPEBGHVFTPoint@@@Z)
sipFTGLFTGLPixmapFont.obj : error LNK2001: unresolved external symbol "public: 
virtual float __cdecl FTFont::Advance(unsigned short const *,int,class 
FTPoint)" (?Advance@FTFont@@UEAAMPEBGHVFTPoint@@@Z)
sipFTGLFTGLTextureFont.obj : error LNK2001: unresolved external symbol "public: 
virtual float __cdecl FTFont::Advance(unsigned short const *,int,class 
FTPoint)" (?Advance@FTFont@@UEAAMPEBGHVFTPoint@@@Z)
sipFTGLFTGLBitmapFont.obj : error LNK2001: unresolved external symbol "public: 
virtual float __cdecl FTFont::Advance(unsigned short const *,int,class 
FTPoint)" (?Advance@FTFont@@UEAAMPEBGHVFTPoint@@@Z)
sipFTGLFTGLExtrdFont.obj : error LNK2001: unresolved external symbol "public: 
virtual float __cdecl FTFont::Advance(unsigned short const *,int,class 
FTPoint)" (?Advance@FTFont@@UEAAMPEBGHVFTPoint@@@Z)
sipFTGLFTGLPolygonFont.obj : error LNK2001: unresolved external symbol "public: 
virtual class FTPoint __cdecl FTFont::Render(unsigned short const *,int,class 
FTPoint,class FTPoint,int)" (?Render@FTFont@@UEAA?AVFTPoint@@PEBGHV2@1H@Z)
sipFTGLFTGLOutlineFont.obj : error LNK2001: unresolved external symbol "public: 
virtual class FTPoint __cdecl FTFont::Render(unsigned short const *,int,class 
FTPoint,class FTPoint,int)" (?Render@FTFont@@UEAA?AVFTPoint@@PEBGHV2@1H@Z)
sipFTGLFTGLPixmapFont.obj : error LNK2001: unresolved external symbol "public: 
virtual class FTPoint __cdecl FTFont::Render(unsigned short const *,int,class 
FTPoint,class FTPoint,int)" (?Render@FTFont@@UEAA?AVFTPoint@@PEBGHV2@1H@Z)
sipFTGLFTGLTextureFont.obj : error LNK2001: unresolved external symbol "public: 
virtual class FTPoint __cdecl FTFont::Render(unsigned short const *,int,class 
FTPoint,class FTPoint,int)" (?Render@FTFont@@UEAA?AVFTPoint@@PEBGHV2@1H@Z)
sipFTGLFTGLBitmapFont.obj : error LNK2001: unresolved external symbol "public: 
virtual class FTPoint __cdecl FTFont::Render(unsigned short const *,int,class 
FTPoint,class FTPoint,int)" (?Render@FTFont@@UEAA?AVFTPoint@@PEBGHV2@1H@Z)
sipFTGLFTGLExtrdFont.obj : error LNK2001: unresolved external symbol "public: 
virtual class FTPoint __cdecl FTFont::Render(unsigned short const *,int,class 
FTPoint,class FTPoint,int)" (?Render@FTFont@@UEAA?AVFTPoint@@PEBGHV2@1H@Z)
FTGL.pyd : fatal error LNK1120: 3 unresolved externals

Original issue reported on code.google.com by [email protected] on 16 May 2011 at 4:39

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.