473,785 Members | 2,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PyOpengl text rendering with autocad font

I must use text in Opengl, Python
This text is for architecture design then I need to use AutoCad fonts
(extension .shx).
I have two troubles:

I don't find a guide, a good program, something for use any kind of
fonts in PyOpengl. The nehe tutorial has some bugs in translation to
Python.
I need to scale rotate the text.

I don't know anything about handling fonts, I must use this .shx but I
don't know. In which way can I take this file and put them in my
programs?

In two afternoons in Google I don't find anything.

If somebody wants to help me :-)
Thanks.
Marco Bonifazi

http://www.marcobonifazi.com

Dec 15 '05 #1
1 3447
Marco wrote:
I must use text in Opengl, Python
This text is for architecture design then I need to use AutoCad fonts
(extension .shx).
I have two troubles:

I don't find a guide, a good program, something for use any kind of
fonts in PyOpengl. The nehe tutorial has some bugs in translation to
Python.
I need to scale rotate the text.

For general font rendering you can choose two major approaches, either
use a built-in platform-Dependant system (such as seen in the NeHe
tutorial) or code your own to render the individual characters using
either one of the cross-platform GUI libraries (2D text) or TTFQuery
(3D/polygonal text (i.e. you can rotate in all 3 dimensions)). There is
a NeHe tutorial translation for the font-rendering demo in
OpenGLContext's tests directory. To render text in general, see the
OpenGLContext/scenegraph/text/* modules. However, none of those knows
how to handle .shx files, they load TTF fonts instead.
I don't know anything about handling fonts, I must use this .shx but I
don't know. In which way can I take this file and put them in my
programs?

If you can find a format specification you may be able to write an
importer (IIRC SHX fonts are just series of lines, so would be very easy
to render once you have the format read). You might find it easier to
redefine the process as "tell autocad to use truetype, then render
truetype" if whoever is asking for .shx will allow it.
If somebody wants to help me :-)
Thanks.

HTH,
Mike

--
_______________ _______________ _______________ ___
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com

Dec 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2897
by: Gilles Leblanc | last post by:
Hi I have started a small project with PyOpenGL. I am wondering what are the options for a GUI. So far I checked PyUI but it has some problems with 3d rendering outside the Windows platform. I know of WxPython but I don't know if I can create a WxPython window, use gl rendering code in it and then put widgets on top of that...
3
4538
by: peter pilsl | last post by:
When putting a picture with an alt-text to Internetexplorer, the content of the ALT-Text is displayed when the mouse is moving over the picture. This is not what I expected. The ALT-text should appear when the images cannot be displayed but IE displays both. All other browers (firefox, konqueror, safari ...) do well. This gets especially annoying if the picture is actually displaying a text and the alt-text is the same text and you see...
0
1300
by: Matt Feinstein | last post by:
Poking around in the PyOpenGL tarball... I can see that the wrapper for the WGL pixel format function includes flags for rendering to a bitmap and for hardware acceleration... so maybe I could get hardware-accelerated off-screen rendering under win32.. but what about linux? Matt Feinstein -- There is no virtue in believing something that can be proved to be true.
3
4279
by: Frustrated Developer via DotNetMonster.com | last post by:
I have posted a couple times on here already and found the user community to be very helpful. I took on a project before I realized how difficult a time I'm having working with a database. Assistance would be greatly appreciated! I am trying to allow certain users to be able to preview a database's contents without being able to update which I've accomplished. I've created a "Preview" button and set the datagrid to READ ONLY. Now I want...
29
5145
by: Michael Bulatovich | last post by:
Is there a way to use CSS to format "plain" text in an html document. By plain I mean text which is not contained by <por <h#tags. Is there no way to control how this stuff is rendered? tia
20
5671
by: Jukka K. Korpela | last post by:
I recently noticed, once again, how the common implementation of italics can really disturb. I'm referring to the common phenomenon that there is by default too little spacing after italics text, so that if you have, say, <em>Bill</emWatterson then the last "l" of "Bill" hits the "W" - they may even slighly overlap. I noticed this long ago, and I discuss it briefly at http://www.cs.tut.fi/~jkorpela/math/#it in the context of mathematical...
28
40642
by: eastcoastguyz | last post by:
I'm a newbie to CSS, so be kind. :-) I have looked at examples of CSS and have not seen this yet. How can you change the colors of the text in the same word in CSS? For example, when how can you take the word "infosystems" and make the "info" part red, and the "systems" part blue? I don't want to have to hard-code this in HTML which is why I'm looking to CSS to do this. Thanks!
12
2883
by: Boris Borcic | last post by:
Hello, I am trying to use UI Automation to drive an MS Windows app (with pywinauto). I need to scrape the app's window contents and use some form of OCR to get at the texts (pywinauto can't get at them). As an alternative to integrating an OCR engine, and since I know the fonts and sizes used to write on the app's windows, I reasoned that I could base a simple text recognition module on the capability to drive MSWindows text...
0
1230
by: sub2072 | last post by:
hi everyone, i'm not sure if this is the best place for this post, but since i'm a novice at pyopengl, i thought this might be the place. i have this piece of code which is giving some errors and would like some feedback as to why this is so. using pyopengl. i have a simple list and would like with my mousebutton select the one of the items from the list when the button is pressed. any help on this would be great. thank you in advance... ...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9485
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9958
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7506
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5390
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5523
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2890
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.