473,394 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Determine support for ClearType

Is there any way to do the following:

1. Determine whether ClearType is enabled by the system (under Display
Properties - Effects in WinXP).
2. Determine whether a font supports ClearType.

Thanks for any help!
Lance

Feb 23 '07 #1
5 2209
ljlevend2,

This link should point you in the right direction for the Clear Type
questions you have.

http://msdn2.microsoft.com/en-us/library/ms533912.aspx

Bruce

"ljlevend2" <lj*******@nospam.nospamwrote in message
news:4F**********************************@microsof t.com...
Is there any way to do the following:

1. Determine whether ClearType is enabled by the system (under Display
Properties - Effects in WinXP).
2. Determine whether a font supports ClearType.

Thanks for any help!
Lance

Feb 25 '07 #2
Also,

Here's a link about Clear Type technology that may answer your second
question...

http://www.microsoft.com/typography/ClearTypeInfo.mspx

Bruce

"ljlevend2" <lj*******@nospam.nospamwrote in message
news:4F**********************************@microsof t.com...
Is there any way to do the following:

1. Determine whether ClearType is enabled by the system (under Display
Properties - Effects in WinXP).
2. Determine whether a font supports ClearType.

Thanks for any help!
Lance

Feb 25 '07 #3
Hi Lance,

To determine if currently ClearType is enabled, you could use following
code:

Public Class Form1

Private Declare Function SystemParametersInfo Lib "user32" Alias
"SystemParametersInfoA" (ByVal uAction As Integer, _
ByVal uParam As Integer, ByRef lpvParam As Integer, _
ByVal fuWinIni As Integer) As Boolean

Private Const SPI_GETFONTSMOOTHINGTYPE As Integer = &H200A
Private Const FE_FONTSMOOTHINGCLEARTYPE As Integer = 2

Private Function IsClearTypeEnabled() As Boolean
Dim uiType As Integer = 0
Return SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, uiType, 0)
AndAlso uiType = FE_FONTSMOOTHINGCLEARTYPE
End Function

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

End Sub

Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
e.Graphics.DrawString("ClearType is " + IIf(IsClearTypeEnabled(),
"", "not ") + "enabled", Font, Brushes.Black, 0, 0)
MyBase.OnPaint(e)
End Sub
End Class
About your 2nd question, please refer to following documentation:

=========
#LOGFONT
http://msdn.microsoft.com/library/en...asp?frame=true

Windows XP: The following situations do not support ClearType antialiasing:

* Text is rendered on a printer.
* Display set for 256 colors or less.
* Text is rendered to a terminal server client.
* The font is not a TrueType font or an OpenType font with TrueType
outlines. For example, the following do not support ClearType antialiasing:
Type 1 fonts, Postscript OpenType fonts without TrueType outlines, bitmap
fonts, vector fonts, and device fonts.
* The font has tuned embedded bitmaps, for any font sizes that contain the
embedded bitmaps. For example, this occurs commonly in East Asian fonts.
=========

Hope this helps. Let me know if you need further information. Thanks.

Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications. If you are using Outlook Express, please make sure you clear the
check box "Tools/Options/Read: Get 300 headers at a time" to see your reply
promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 26 '07 #4
Thanks you Bruce and Walter for your help!
Lance

Feb 27 '07 #5
You're most welcome! :)

"ljlevend2" <lj*******@nospam.nospamwrote in message
news:D3**********************************@microsof t.com...
Thanks you Bruce and Walter for your help!
Lance

Feb 28 '07 #6

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

Similar topics

23
by: Martin! | last post by:
does anyone know if WinXP by default uses 'Cleartype' or 'Standard'. i noticed that using 'standard' all font-families (except sans-serif) are NOT anti-aliassed, while with 'cleartype' everything...
9
by: Adam | last post by:
Can someone please help!! I am trying to figure out what a font is? Assume I am working with a fixed font say Courier 10 point font Question 1: What does this mean 10 point font Question 2:...
2
by: ljlevend | last post by:
Is there a way to determine whether font supports ClearType? Thanks, Lance
0
by: cloabell | last post by:
I would like to provide the option to enable ClearType in a RichTextBox, even when the system-wide setting is disabled. No matter what I do, my RTF box always repaints its text according to the...
7
by: hoppy | last post by:
I was banging my head against the wall with this code in a sub: Dim writing As New Bitmap(ctrl.Width, ctrl.Height) Dim surface As Graphics = Graphics.FromImage(writing)...
4
by: Residential Area Freak | last post by:
How do I disable programmatically the cleartype function in IE 7 for my web apps? Are there new HTML-Tags or JavaScript functions to disable cleartype in the development? Best regards pP
7
by: active | last post by:
In control panel/Display/Appearance/Effects if : 'Use the following method to smooth edges of screen fonts' is checked and ClearType is selected in the combobox (no problem if Standard is...
1
by: Wayne | last post by:
Is there some way of turning off "ClearType" in the Access 2007 runtime? Perhaps a registry tweak? On all of my LCD screens "ClearType" makes fonts, especially bold fonts, in Access appear...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.