Programming :: Determining Python Font Pixel Size?

Feb 17, 2010

I am trying to scroll text from a text file across a wx.panel. This is the code so far:

Code:
def scrolling(self, text, rate):
def scroll(): charList = []
dc = wx.ClientDC(self.panel_1)
open_text = open(text, "rb")
my_text = open_text.read()
charList.append(my_text) open_text.close()
x,y = self.panel_1.GetClientSizeTuple()
while 1: for z in charList: for r in range(2000):
dc.DrawText(z,x-r,0) time.sleep(rate) dc.Clear()
net3 = threading.Thread(target=scroll)
net3.setDaemon(1) net3.start()

It scrolls but I am guessing where the range is (2000). I need to be able to determine the total number of pixels that the text in the file is. Is there a python way to determine this?

View 1 Replies


ADVERTISEMENT

Programming :: Tell Printer (HP 1020) What Font And Size To Use

May 17, 2011

The last time I got involved with printers and fonts, printers had tractors and ribbons and the only codes in use were ascii and ebcdic. So even if I could remember it would be out of date. I've written a C program that writes a text file. I want to print it. I run it through expand and send it to lp, but it comes out in an undesirable primitive font.

Once upon a time, one sent a string of commands to the printer telling it what font to use and what size, etc. I dont think this is done anymore, and if it is I dont remember how to do it. I assume programs embed in their output instructions in some common format which tell this stuff to the printer - in my case a HP1020. I've been looking on the search engines but I haven't found the magic words to find what I want. how to get my output formatted. If it involves some escape sequences in the file, maybe a pointer to a description of which does what?

View 2 Replies View Related

Programming :: Editing Font Size In Evolution Xml File?

Mar 29, 2010

I am trying to increase the font size in the evolution xml file to make the sub-menu easier to read (the menu with new, send/receive, reply, reply to all, forward) I found where the xml file is located but i can not seem to adjust the font. is there a different syntax for xml for changing font than html/css?

View 2 Replies View Related

Programming :: Increase Font Size In GTK2 C Program?

Jul 14, 2010

I am writing a program in C to create a GUI application using GTK 2. My actual program is quite large, so I am using a modified version of the sample program from GNOME library for trial. I wish to increase the font size, and I have using PangoFontDescription. I have made that section of the code bold and italic below for quick reference to the code that affects fonts. But it does not make any difference. I am compiling the C file using gcc. The code is as follows(hello.c):

#include <gtk/gtk.h>
#include <glib.h>
#include <gdk/gdk.h>

[code]....

View 5 Replies View Related

Ubuntu Multimedia :: How To Resize Photo And Increase / Decrease Pixel Size

Apr 11, 2011

I want to make my photo less than 40 kb. My photo on scanning is 313 kb also I want to decrease pixel size to 110*140. How is it possible?

View 3 Replies View Related

OpenSUSE :: Can't Change Font - Font Size FIrefox 3.6.8

Aug 16, 2010

I can't change fonts in Firefox preferences (Content).

My OS is openSUSE 11.3, KDE 4.4.4. release 8.

Any type and size of font I use, nothing happens. It's still same font which I choose for the first time I've started Firefox afer installing openSUSE 11.3.

View 4 Replies View Related

Programming :: Get Pixel Color From Screen In Bash Script?

Nov 25, 2010

I would like to get the pixel color from screen at (320,240) and if the color = 0xFFFFFFFF , i would like to execute a command.

View 3 Replies View Related

Programming :: Xlib - C Programming - Get Value From Pixel

Dec 11, 2009

I'm making a game with the xlib library. What I want to do is to know if the character is standing on a trap or something else.

So far I've solved that using the coordinates but when I draw circles or stuff not shaped like a rectangle it gets to hard to make the game exact.

So what I'm asking for is if there is some kind of function in the xlib that tells you which color a pixel has. Because then it'd be much easier.

I've searched but I haven't been able to find anything good. I found XGetPixel() but that appears to work only with images, maybe I can make my window to be an "image"?

View 7 Replies View Related

Programming :: Make Python Programs Run Without Entering The Command Python?

Mar 22, 2009

I want to be able to do

sudo ./program.py

instead of always having to do

sudo python program.py

What do I need to change?

View 5 Replies View Related

Programming :: Python - Get Text File Data Into An Array On Python?

Nov 30, 2009

I've already used line split stuff to transform my data into something like this in a text file:

Code:

['1', '1', '3', '20.7505207']
['2', '1', '3', '23.0488319']
['3', '1', '3', '-1.5768747']
['4', '1', '3', '-26.4772491']

[code]....

How can I get this on a python program so I can manipulate it as an array?

View 3 Replies View Related

Fedora :: How To Change The Font Size

Nov 5, 2009

I'm a student in a linux class and we just installed fedora. so far it's nice except that the work we do is in the CLI which I can barely see because it's so small on the screen! I've been squinting at the screen for a little while now but it's just proving to give me more of a headache and hurt my eyes than anything. Anyone know how to change the font size so that I can actually see the work I'm doing?

View 5 Replies View Related

OpenSUSE :: Change KDM Font Size On 11.2?

Nov 16, 2009

I'm running OpenSUSE 11.2 on my Acer Aspire One with a 9 inch LCD. I have configured the monitor in Sax2 to reflect the size and 1024x600 resolution, and as a result the desktop fonts are all sized correctly.

However, the fonts on the KDM log-in screen are too large, and I'd like to reduce them if possible. Looking in the KDE Control Center, I tried using the Login Manager utility to adjust the KDM theme, but any changes I made seemed to have no effect i.e. changing the font size, or even the overall theme itself, still resulted in KDM using the default green OpenSUSE theme with large fonts.

Does anyone know, therefore, how to adjust the KDM font size or DPI in OpenSUSE 11.2?

View 9 Replies View Related

OpenSUSE :: Font Size Adjustment?

Dec 9, 2010

I'm running OpenSuSE 11.3, upgraded from 11.1, with the Nvidia video driver. The font size for Yast, Firefox, and several other things is too small. I've tried changing it using the Appearance section of Personal Settings. That changes the font size in some contexts such as the window titles and task manager, but not in all contexts. In Firefox I've tried something similar, but it doesn't affect the font used in the tabs, function bar on the top, etc. The font in those parts of Firefox is the same as the one in Yast. So there's some other font setting around, but I haven't been able to find it. I've tried Google and SDB, but have no success searching there.

View 9 Replies View Related

Applications :: Set Font Size On Pdf For Printing?

Mar 13, 2010

I need to print some pdf files. I use Kpdf and, Adobe Reader. Is there a way to check the font size of the file and to set the font size I want for printing?

View 1 Replies View Related

SUSE :: Can't Change Font Size

Aug 1, 2010

No matter what I do with system settings I cannot change the font size or type of font in Firefox and Thunderbird - other programs as well. Is there somewhat to change this? The fonts are too small and I have vision problems. I know I can hit ctrol ++ but with other distros I can change the deflt font size for the system. I am using openSUSE 11.3 and like it very much except for this lack of a feature.

View 7 Replies View Related

Fedora :: Change The Font Size In Xterm?

Feb 2, 2010

When I run xterm from the command line, there seems to be some errors:

Code:
$ xterm &
$ Warning: Cannot convert string "nil2" to type FontStruct
xterm: cannot load font -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
Then I press both the Ctrl and right mouse key, options are popup with font sizes of 'Default',

[Code]....

View 2 Replies View Related

Fedora :: Increase Font Size In Xdialog?

Mar 30, 2010

How do I increase my font size in xdialog?

View 4 Replies View Related

OpenSUSE :: YAST's Too Small Font Size?

Jul 3, 2011

I am running openSUSE 11.4 KDE 64bit. I found the default font in YAST, for example, in Bootloader and Software Management, is about 8-9 points which is too small to read. Why on earth does openSUSE set a tiny font size as default?

I did try Configure Desktop >Application Appearance, etc. as well as qtconfig in the terminal but these seem not to increase the font size to 12-14 points.

View 3 Replies View Related

Ubuntu :: Screen Appearance Changes / Font Size?

Feb 27, 2010

I'm running Hardy 8.04.. Once in a while when I boot up my system, all of my fonts are different - everything is very large. If I go into the screen resolution, I have no choices higher than 800x600. If I restart the system, there is a good chance that the screen resolution will go back to normal. what I can do to fix it?

View 1 Replies View Related

Ubuntu :: Chromium Tab Font Size Too Small

Jun 5, 2010

The font size on Chromium for the URL and tabs is *far* too small. I went into the "Under the Hood" settings, but to no avail. How can I make this bigger? [URL] Also, the bookmarks bar seem to be inheriting system fonts, but it looks like that size is hard coded too. I love chromium but I need some accessibility here.

View 6 Replies View Related

Ubuntu :: Change The Font Size In Opera?

Jul 18, 2010

where can I change the font size in Opera?

View 1 Replies View Related

Ubuntu :: Can't Increase Font Size In Pidgin

Aug 28, 2010

I cant Increase font size In Pidgin

View 1 Replies View Related

Ubuntu :: How To Make The Font Size Small

Sep 16, 2010

i was using eclipse in windows 7, th fonts are small so I can see the code good. But I want to use in Ubuntu so I setup. But here the font size is huge and windows are taking more space and I am unable to code.How to reduce the overall font size and make it small?

View 4 Replies View Related

Ubuntu :: How To Change Font Size In Empathy

Oct 26, 2010

how to change the font size in Empathy please? I would like to make it slightly smaller so I can fit more text in the chat window.

View 6 Replies View Related

Ubuntu :: Chromium UI Font Size Too Small ?

Dec 20, 2010

Does anyone know how to change the font size of the user interface elements of the chromium/chrome browser? I've searched around for a solution but only come up with how to change the font size of viewed sites. Just to be clear, I want to increase the font size of the tabs headings, bookmark menu etc, not the font size of the sites I'm viewing...Using chromium on lucid...

View 2 Replies View Related

Ubuntu :: Change Font Size In Tty Terminal?

Jun 20, 2011

I am running Ubuntu 10.04. When I first installed it, the virtual terminals had a good font size. After a few weeks, I set the visual appearance setting to normal (in the gui desktop). Doing this required me to install third party graphics drivers from nvidia. in installed fine, and my gui desktop still functions as I would expect, however, all of the virtual terminals now have a much larger font size, as does the ubuntu boot logo.

View 1 Replies View Related

Ubuntu :: Firefox Font Size Control?

Jul 31, 2011

I have a Mac Powerbook G4. About two months ago my font sizes changed on Firefox browser. I have searched and tried many firefox apps to fix the problem, but NONE of them work.All I want to do is go back to my old firefox with normal size fonts ALL THE TIME, ALWAYS.

View 2 Replies View Related

General :: Changing The Font Size At Cmd Prompt?

Sep 13, 2010

i have changed my monitor from crt to lcd and find the fonts to be a little out of focus,

so far i have achieved native resolution of 1280x1024 in gnome which is great! i have configured grub by adding the vga=xxx appropraite for native resolution of my monitor which is great !.........but herein lay the problem, everything is so small and stuck up in the left corner , so small that i cant read it very well.

how do i increase the font sizes at cmd prompt without changing the resolution ? dare i say ........in windows i would increase the DPI , how do i achieve this in centos ?

View 7 Replies View Related

General :: How To Change Xterm Font Size

Nov 17, 2010

I was wondering how to change the xterm font size and may be the font itself. Also we go to tty1 when we press Ctrl+Alt+f1 , f3 and so on. Is there any way I can change that too and maybe change the colour of the font and the size of it. I did change the resolution once in ubuntu with startup manager. I'm using fedora 14.

View 13 Replies View Related

General :: Increasing Font Size In Console

Feb 26, 2011

I am using ubuntu lucid.as a desktop and don't run a server. The editor I use is vim so increasing font by edit > profile preferences. What I need to know is how to increase the size in console ie. when I use Ctrl +Alt + F1 to F6. On running xrandr I get this :

[Code]...

I know that,the graphical user interface ( using X windows , I think ) sits on top of the base system ie F1 to F6. In the Fs , xrandr replies "Can't open display ". The question is am I right in thinking that "gui" is totally independant of the base ( is that the correct word ?). I have read that messing about with resolution can wreck a monitor ( I'm using a laptop) , is there a safe way to proceed?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved