Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 9:13 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Font size on windows - small, medium, larger. How to detect?
PostPosted: October 1st, 2011, 2:39 am 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
I came across this problem hitherto unnoticed. I believe that all software developers have already gone through it, but how to get around to a pub made ​​in Opus pro?

The font size, while maintaining normal size, text items in my page to work correctly, but if the windows are working with larger fonts (120 - 150% of normal size in Win7, for example), the text in pages messing around, out of place and with greater line spacing.

I think that when open the publication, it should detect that the font size of the windows are sized 100% to proceed. If it is not the case, a framework should be presented to the user suggesting that this returns the font size for windows to default, then run to the publication normally. But how make this?

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject: Re: Font size on windows - small, medium, larger. How to det
PostPosted: October 1st, 2011, 3:22 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
but if the windows are working with larger fonts (120 - 150% of normal size in Win7, for example), the text in pages messing around, out of place and with greater line spacing.
Think about this... a person may buy a laptop with a 17" screen, but only 1290 x 780 resolution. Another person may have yet higher resolution on a 15.6" diag. screen. And windows allows the user to customize the DPI or Font magnification.

So the answer is IMO two-fold. If you can display content in HTML within Opus, standard and common means exist to allow the user to fit the page display comfortably ( i.e., Ctrl-plus and Ctrl-minus ). Otherwise, methods in Opusscript allow me to GIVE the user buttons for Font-size increase or decrease.

Another alternative (which I do not like so much) is to create Chapters which have different layout of Opus Page-size (and fonts). The 'catch' is that I would need to build-in navigation contingent on User's display --- a lot of replication of effort IMO.

In Opus you can of course detect the Display resolution and other things -- it is up to you to decide if that is worthwhile doing. As an aside, but somewhat related, I think it is stupid that so many Web Pages use such small fonts and limit the column width of text to such a narrow column. That's just me, I guess.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Font size on windows - small, medium, larger. How to detect?
PostPosted: October 2nd, 2011, 7:58 pm 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
Well, I do not know for sure how. The texts show up on my pub - the famous and complex quizz generally has 3 or 4 text lines for questions and two or three lines for the answers. If Windows is the default size for the fonts, the questions and answers appear in the right way, but if the fonts are larger in size than the standard, or with custom DPI, everything is a mess.

My pub runs in fullscreen, with a background that suits the varying resolutions of widescreen or standard monitors. My problem is to find an Opus function or develop a script in start page to detect the font size of the windows because I need the user to work with standard size, since I can not add pages providing larger sizes or custom.

This script or function on the start page of the publication, detecting the font size, show a picture with an image prompting the user to return the font to the default size. I believe that most windows users do not change the default font size, but we - Opus pub developers - must anticipate and work around this problem.

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject: Re: Font size on windows - small, medium, larger. How to det
PostPosted: October 2nd, 2011, 9:42 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
My problem is to find an Opus function or develop a script in start page to detect the font size of the windows because I need the user to work with standard size, since I can not add pages providing larger sizes or custom.
While it may be possible, I do not know the technique for that.

What you may be able to do in Opus is to give the User a button to "change font size" -- then take him to a Page that displays a Text box filled with sample text. Give him instructions to increase or decrease text size until the sample fits comfortably inside the box.

The scripting to do that is readily available in OpusScript help file -- at least the example. Basically under these topics: GetSelectionStyle(), SetSelectionStyle(). It is easy to do on any individual text object. However, you will need to solve how to apply that to your many pages and the appropriate text areas. As a workaround, you can place all of the content text objects (Q & A items) inside a Frame, and simply set a Publication variable to use with SetScale(). But that distorts layout. :-(

Back to your original question... maybe someone here knows HOW to detect font and DPI settings on Windows, and perhaps how to change that. Opus does have an action or command to change display resolution, but I doubt that will help much.

p.s. I posted a question/discussion some time ago on the forum, about changing fontsize in HTML content. That can work well.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Re: Font size on windows - small, medium, larger. How to det
PostPosted: October 2nd, 2011, 10:28 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
It's not something Opus will do. You'd need somebody to write a DLL that could access the necessary information.

http://msdn.microsoft.com/en-us/library ... 85%29.aspx

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Font size on windows - small, medium, larger. How to detect?
PostPosted: October 3rd, 2011, 3:12 pm 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
But Opus does not have access to the function of external windows dll's? If Opus can change the screen size, color depth and mouse cursors, why not make the detection of the font size?
I understand the syntax of some functions in Opus script, but I do not know how to adapt this code C + + in this link from microsoft for my needs. I think I'm in a bind ...

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject: Re: Font size on windows - small, medium, larger. How to det
PostPosted: October 3rd, 2011, 5:03 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
NilsonBrasil wrote:
If Opus can change the screen size, color depth and mouse cursors, why not make the detection of the font size?


Maybe nobody asked. :mrgreen:

Yes, Opus can call DLL functions.

Look up Callfn in the help.

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Font size on windows - small, medium, larger. How to det
PostPosted: October 3rd, 2011, 5:05 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
I did a quick web search, here are a couple related techie discussions -- if you care to mess with code outside of Opus.


http://stackoverflow.com/questions/5857 ... ze-options

http://bytes.com/topic/access/answers/2 ... -font-size (follow links there)

[Lar EDIT] I just read thru Mack's link -- quite the good lot of info there. But nothing I would care to attempt. :|

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Font size on windows - small, medium, larger. How to detect?
PostPosted: October 3rd, 2011, 7:04 pm 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
I appreciate the links, mack and Lar_123. Although it has read, seen and thought about it, I do not have the experience necessary to convert the codes used in VB Script and WMF in Opus script.

The key it seems is there but can not find a way to use the right way. Regarding access to the windows dll, all I found was the message text box. I can not find a way to create a function that can read where windows saves the default font that the user is using. I think this is too much for my head ...

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject: Re: Font size on windows - small, medium, larger. How to det
PostPosted: October 3rd, 2011, 8:47 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Nilson,

Don't know if this will work on other OSs, but under W7, you can read the current users DPI setting from the registry.

var dpiSetting = ReadRegistryKey("HKEY_CURRENT_USER\\Control Panel\\Desktop\\", "LogPixels")

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Font size on windows - small, medium, larger. How to detect?
PostPosted: October 4th, 2011, 12:25 am 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
Partners, thanks for the valuable help and time spent in solving this problem.

Mack, I modified the registry patch and the key for a common pattern to the XP, Vista and Seven ...

var dpiSetting ReadRegistryKey = ("HKEY_CURRENT_USER \ \ Software \ \ Microsoft \ \ Windows \ \ CurrentVersion \ \ ThemeManager", "LastLoadedDPI")

Problem solved! What joy! :lol:

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject: Re: Font size on windows - small, medium, larger. How to det
PostPosted: October 4th, 2011, 1:16 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
Problem solved! What joy! :lol:
Okay good. So Nilson, what did you do in Opus to use that information?

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Font size on windows - small, medium, larger. How to detect?
PostPosted: October 6th, 2011, 1:08 am 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
Lar_123, sory but I don't understand your question... Could you be more specific?

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
 Post subject: Re: Font size on windows - small, medium, larger. How to det
PostPosted: October 6th, 2011, 2:04 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
sory but I don't understand your question.
Your original question was how to detect User setting for font and DPI change in Windows. Okay, now you seem to be happy you can detect the settings. Simply... how did you use that data in Opus to change the font or fontsize?

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Font size on windows - small, medium, larger. How to detect?
PostPosted: October 6th, 2011, 3:05 am 
Offline

Joined: December 13th, 2008, 3:15 pm
Posts: 152
Location: Brasil
Opus: 7
OS: Windows 7 x64
System: Asus P5Q3 Deluxe, Core 2 Duo E8500, 8 Gb DDR3 1333 mhz, His IceQ5 5770 HD Graphic Card, Samsung T220 Monitor; Lenovo G550 T6600, 4 GB DDR3 - 15,6".
I do not know if it is possible to Opus change the font size just rewriting the value in the key in question, through the function "WriteRegistryValue." In this type of change, windows asks to be restarted, which would close the publication ...

I thought it best to let a framework to request a size font change to the user, so that after this return to open the application.

_________________
"To the ignorant, old age is the winter of life, for the wise, is the season of harvest."
It is not easy to translate the world into a binary code of 0s and 1s, but in scripts, anything is possible!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group