PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro

Notices



Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-16-2009, 08:27 PM
raidzero's Avatar
N00b
Offline
Pocket PC: Moto Droid @ 1.1GHz
Carrier: VZW
Location: PPCG
 
Join Date: Dec 2008
Posts: 2,193
Reputation: 5220
raidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the community
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Send a message via MSN to raidzero
Thumbs up hopefully foolproof script to easily change titanium fonts

UPDATE: check post 8 for the new mortscript which does not require the user to enter the name of the current font!

I kept thinking there had to be a better way to install titanium fonts than distributing entire CPR files. When someone installs a CPR you make they will only get support for what you had installed on your device at the time, not to mention destroy what other customizations they made. If there was only a way to search through the CPR file on the phone and replace the font names only, it would be foolproof. Enter mortscript. With this scripting language it is possible to change only the font names in the file. There will be no more "my opera panel does not have the right font now", etc. This is, in my tests at least, foolproof. I have uploaded a cab that will give you my LCD font from my other thread, but non destructive and anyone can do it. The install script will replace Tahoma and Segoe UI with the new font name, Digital-7. It will only work if tahoma is what your titanium is running, so to use this, uninstall other titanium font cabs.

Mortscript is installed with this cab.
I have also included another little script I wrote called font_set. It is for the tinkerers who would like to change fonts on a whim and know what font they currently have (not that good at mortscript to figure out which font is in the CPR file and correctly parse it, yet) and what font they want to switch to, provided the new one is in \windows\fonts.

The install script also makes a backup of your CPRs. The uninstall script restores them. this should all be ROM-independent and should also work on any titanium-enabled device.

So here it is, please tell me how it works for you.

It will put install and uninstall scripts in \program files\raidzero\lcd
the font utility script goes to \program files\raidzero and also a link is placed in the start menu programs.
Attached Files
File Type: cab raidzero Titanium LCD.cab (137.9 KB, 37 views) Click for barcode!
__________________

Last edited by raidzero; 07-20-2009 at 01:48 PM.
Reply With Quote
This post has been thanked 2 times.
  #2 (permalink)  
Old 07-17-2009, 10:07 AM
ChaosTheory's Avatar
Halfway to VIP Status
Offline
Pocket PC: HTC Desire
Carrier: Nex-tech Wireless
Location: Insanity
 
Join Date: Jun 2009
Posts: 513
Reputation: 899
ChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: hopefully foolproof script to easily change titanium fonts

Thanks, I think this may be incorporated in my ROM as an easy way to add customization. Plus since I am starting out with a customized font, it will allow easy addition of extra panels, just run the script! I might tinker around with it some to ensure it does what I need it to, but original credit will still go to you!

+1 Great Work!
__________________
Please help contribute to my PPC Glossary!
Reply With Quote
  #3 (permalink)  
Old 07-17-2009, 04:10 PM
ChaosTheory's Avatar
Halfway to VIP Status
Offline
Pocket PC: HTC Desire
Carrier: Nex-tech Wireless
Location: Insanity
 
Join Date: Jun 2009
Posts: 513
Reputation: 899
ChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: hopefully foolproof script to easily change titanium fonts

Something I noticed, you said it makes a backup file, and I see where it takes a .bak file and restores it to the a .cpr file, but I don't see where it makes the .bak file. in your install script i see the following lines:

Copy( "\windows\titanium_480x640.cpr", "\windows\titanium_480x640.cpr" )
Copy( "\windows\titanium_640x480.cpr", "\windows\titanium_640x480.cpr" )

Are those last files supposed to be .bak?

Looking good other than that!
Reply With Quote
  #4 (permalink)  
Old 07-18-2009, 08:45 AM
raidzero's Avatar
N00b
Offline
Pocket PC: Moto Droid @ 1.1GHz
Carrier: VZW
Threadstarter
Location: PPCG
 
Join Date: Dec 2008
Posts: 2,193
Reputation: 5220
raidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the community
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Send a message via MSN to raidzero
Re: hopefully foolproof script to easily change titanium fonts

yes they are. I guess I forgot to make the final cab and uploaded a premature version. whoops..
Reply With Quote
  #5 (permalink)  
Old 07-18-2009, 09:16 AM
ChaosTheory's Avatar
Halfway to VIP Status
Offline
Pocket PC: HTC Desire
Carrier: Nex-tech Wireless
Location: Insanity
 
Join Date: Jun 2009
Posts: 513
Reputation: 899
ChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: hopefully foolproof script to easily change titanium fonts

Tested it out, works great! Created a modified cab that has 3 fonts and prebuilt scripts in it for my ROM, your font (script creator -Digital-7), mine (ROM creator - Chaos Times) and lwrdchvys (ROM guinea pig - MostWasted).

Haven't built it into the ROM yet, but did run the cab to test it. Also, I added a readme that gives you credit for the original script and links to your threads, as well as instructions and a recommendation that before changing fonts they run the backup script. Since the font scripts make a copy of the current cpr file, if they ran 2 fonts they would have the last font backed up, not the original, so if they reinstall the original between font changes, they will always have it available
Reply With Quote
This post has been thanked 1 times.
  #6 (permalink)  
Old 07-18-2009, 09:29 AM
raidzero's Avatar
N00b
Offline
Pocket PC: Moto Droid @ 1.1GHz
Carrier: VZW
Threadstarter
Location: PPCG
 
Join Date: Dec 2008
Posts: 2,193
Reputation: 5220
raidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the community
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Send a message via MSN to raidzero
Re: hopefully foolproof script to easily change titanium fonts

Yes in that case I think it'd be easier just to run the switch script and input the current font and then tahoma as the desired.. the switching script is what I use all the time. it makes it so much easier to switch fonts on the fly without fear of ruining other settings, like titanium weather icon sizes, if someone is running different icons from the cpr instead of bronzeres.dll... I am trying to find out how to list directories in mortscript so it prompts the user with a list of all available fonts to choose from.
Reply With Quote
  #7 (permalink)  
Old 07-18-2009, 05:17 PM
ChaosTheory's Avatar
Halfway to VIP Status
Offline
Pocket PC: HTC Desire
Carrier: Nex-tech Wireless
Location: Insanity
 
Join Date: Jun 2009
Posts: 513
Reputation: 899
ChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: hopefully foolproof script to easily change titanium fonts

Yes, the switch script rules! Just trying to keep it simple for the noob who doesn't want to know how it works, just wants it to work

Not sure if it is possible, but if Mortscrip can restart just Titanium, rather than the whole phone, that would be quicker

EDIT: Think I might have found a way to just refresh Titanium, TWeather links to a program called CHomeRefresh.exe. That might do it

Last edited by ChaosTheory; 07-18-2009 at 11:05 PM.
Reply With Quote
This post has been thanked 1 times.
  #8 (permalink)  
Old 07-19-2009, 07:41 PM
raidzero's Avatar
N00b
Offline
Pocket PC: Moto Droid @ 1.1GHz
Carrier: VZW
Threadstarter
Location: PPCG
 
Join Date: Dec 2008
Posts: 2,193
Reputation: 5220
raidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the community
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Send a message via MSN to raidzero
Re: hopefully foolproof script to easily change titanium fonts

that would be cool
i got it so that it can figure out what the current font is set as, attached updated mortscript. I'm using it for the switch script. use the part that defines sourcefont in the install script.

its a bit clunky in having to define lots of variables and do replace operations and stuff, but it works.

And yes, chomerefresh.exe works perfectly! sweet find.
+1
Attached Files
File Type: mscr font_set.mscr (916 Bytes, 22 views) Click for barcode!

Last edited by raidzero; 07-19-2009 at 07:46 PM.
Reply With Quote
This post has been thanked 1 times.
  #9 (permalink)  
Old 07-19-2009, 07:55 PM
ChaosTheory's Avatar
Halfway to VIP Status
Offline
Pocket PC: HTC Desire
Carrier: Nex-tech Wireless
Location: Insanity
 
Join Date: Jun 2009
Posts: 513
Reputation: 899
ChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuffChaosTheory knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: hopefully foolproof script to easily change titanium fonts

Awesome, +1 on the new script.

What it the command to run a file? Going to use your scripts in my ROM, but I want to replace the last lines with:

Message( Restarting Titanium - Enjoy!)
**Run Command** ( CHome.exe)

I'll look into it myself if your not sure, just thought you might know, and busy trying perfect my ROM.

Last edited by ChaosTheory; 07-19-2009 at 08:16 PM.
Reply With Quote
  #10 (permalink)  
Old 07-19-2009, 08:01 PM
raidzero's Avatar
N00b
Offline
Pocket PC: Moto Droid @ 1.1GHz
Carrier: VZW
Threadstarter
Location: PPCG
 
Join Date: Dec 2008
Posts: 2,193
Reputation: 5220
raidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the communityraidzero is a trusted member of the community
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Send a message via MSN to raidzero
Re: hopefully foolproof script to easily change titanium fonts

Quote:
Originally Posted by ChaosTheory View Post
Awesome, +1 on the new script.

What it the command to run a file? Going to use your scripts in my ROM, but I want to replace the last lines with:

Message( Restarting Titanium - Enjoy!)
**Run Command** ( CHome.exe)

I'll look into it myself if your not sure, just thought you might now, and busy trying perfect my ROM.
Run("\windows\chomerefresh.exe")

of course the path needs to be correct..
Reply With Quote
This post has been thanked 1 times.
Reply

  PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 07:31 AM.


Powered by vBulletin® ©2000 - 2020, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com