INFO: Font Metrics and the Use of Negative lfHeight
Article ID: 32667 - View products that this article applies to.
This article was previously published under Q32667
Expand all | Collapse all
On This PageSUMMARYThe following illustrations show the most commonly used font metrics, including Character Height, which is selected with negative values of each illustration is followed by notes describing the metrics.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ O O Cell HeightThis is the height selected on positive lfHeight in the LOGFONT. It is the height of the font bitmap for raster fonts. It is returned as tmHeight in the TEXTMETRIC structure from GetTextMetrics(). Character Height (Also Known as Em)This is the height selected on negative lfHeight in the LOGFONT. (That is, the mapper will try to match a font whose character height matches the absolute value of the requested height.) NOTE: By definition, the Em is equal to Cell Height minus Internal Leading. The Em defines the point size of a font. In MM_TEXT mapping mode, the Em is related to the point size as follows: Em=dpiY*point_size/72; // where dpiY is dots per inch in Y direction The dpiY of a font is equal to tmDigitizedAspectY in the TEXTMETRICS structure. Internal LeadingThis is returned as tmInternalLeading in the TEXTMETRIC structure from GetTextMetrics() and often, but not necessarily, describes how much space has been left inside the font bitmap for diacritical marks (accents). External LeadingThis is returned as tmExternalLeading in the TEXTMETRIC structure from GetTextMetrics() and describes how much extra space the font designer expects the application to leave between rows of the font. It is not included in the bitmap and is not modified by TextOut()/ExtTextOut(), even in OPAQUE mode. When outputting multiple lines of text, the lines should be separated by (tmHeight + tmExternalLeading). Character Width Character Width OverhangtmOverhang specifies the per string extra width that may be added to some synthesized fonts. When synthesizing some attributes such as bold or italic, GDI or a device may have to add width to a string on both a per character and per string basis. For example, GDI synthesizes embolding by expanding the intercharacter spacing and overstriking with an offset and italicizes a font by skewing the string. In either case, there is an overhang past the basic string. For bold strings, it is the distance by which the overstrike is offset. For italic strings, it is the amount the top of the font is skewed past the bottom of the font. tmOverhang allows the application to determine how much of the character width returned by a GetTextExtent() call on a single character is the actual character width and how much is the per string extra width. The actual width is the extent less the overhang. In other words, tmOverhang is the difference between the width of a character when it is output singly versus its width when it is in the interior of a string. For more information, look up the following topics in the Windows Software Development Kit reference:
PropertiesArticle ID: 32667 - Last Review: March 21, 2005 - Revision: 1.1
APPLIES TO
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
|
INFO: Font Metrics and the Use of Negative lfHeight的更多相关文章
- Getting Text Metrics in Firemonkey(delphiscience的博客)
Firemonkey’s abstract TCanvas class has been providing the dimensions of the bounding rectangle of s ...
- [EMSE'17] A Correlation Study between Automated Program Repair and Test-Suite Metrics
Basic Information Authors: Jooyong Yi, Shin Hwei Tan, Sergey Mechtaev, Marcel Böhme, Abhik Roychoudh ...
- Font and PDF
1. 独立存在的Font文件 有三类: Type 1 Font TrueType Font OpenType Font Type 1 是由Adobe开发的,它是基于PostScript的Font,它通 ...
- css 常用单位
em: 相对于应用在当前元素的字体尺寸,1em 等于当前的字体尺寸,2em 等于当前字体尺寸的两倍,一般浏览器字体大小默认为16px,则2em == 32px: W3原文:font size of t ...
- 你可能不知道的7个CSS单位
如果你是一名前端开发工程师,一般px和em使用频率比较高.但是今天本文的重点是介绍一些我们使用很少.甚至么有听说的单位. 一.重温em <style type="text/css&qu ...
- Using Headless Mode in the Java SE Platform--转
原文地址: By Artem Ananiev and Alla Redko, June 2006 Articles Index This article explains how to use ...
- 关于imagic拼接透明背景图片的问题
目标: 为了做图片水印,需要水平拼接多个logo和文字... 之前用过imagick,所以继续使用. 第一个版本:实现了图片和文字的拼接,代码如下: package main import ( &qu ...
- IOS CoreText.framework --- 行 CTLineRef
http://blog.csdn.net/fengsh998/article/details/8701738 前面两篇文章介绍了文字的样式,段落样式.本文章主要介绍行模式.CTLineRef 知识了解 ...
- iOS之富文本
之前做项目时遇到一个问题: 使用UITextView显示一段电影的简介,由于字数比较多,所以字体设置的很小,行间距和段间距也很小,一大段文字挤在一起看起来很别扭,想要把行间距调大,结果在XCode中查 ...
随机推荐
- oracle_jdbc_Query
本例子程序是根据马士兵老师所讲+自己的注释.写的比较全面,特别是最后释放资源的代码. package com.ayang.jdbc; import java.sql.*; public class T ...
- rabbitmq实现一台服务器同时给指定部分的consumer发送消息(tp框架)(第六篇)
previous article: http://www.cnblogs.com/spicy/p/7989717.html 上一篇学习了,发送消息的时候用direct类型的exchange,绑定不同 ...
- FoxitReader软件下载并安装(图文详解)
不多说,直接上干货! FoxitReader官方网址:https://www.foxitsoftware.com/downloads/ 结束 欢迎大家,加入我的微信公众号:大数据躺过的坑 ...
- Promise对象的含义和基本用法
1.Promise的含义 Promise是异步编程的一种解决方案,比传统的解决方案(回调函数和事件)更合理更强大. 所谓Promise,简单说就是一个容器,里面保存着某个未来才会结束的事件 (通常是一 ...
- tomcat启动(五)Catalina分析-service.init
上篇写到StandardService.init() 这个方法做什么呢?一起来看看. 这个类也是实现了Lifecycle 如图.这个图中i表示Interface接口.如Lifecycle,Contai ...
- [中英对照]Linux kernel coding style | Linux内核编码风格
Linux kernel coding style | Linux内核编码风格 This is a short document describing the preferred coding sty ...
- unity之定制脚本模板
1.unity的脚本模板 新版本unity中的C#脚本有三类,第一类是我们平时开发用的C# Script:第二类是Testing,用来做单元测试:第三类是Playables,用作Time ...
- 细说setTimeout/setImmediate/process.nextTick的区别
node.js中的非IO的异步API提供了四种方法,分别为setTimeOut(),setInterval(),setImmediate()以及process.nextTick(),四种方法实现原理相 ...
- [转]React 教程
本文转自:http://www.runoob.com/react/react-install.html React 可以直接下载使用,下载包中也提供了很多学习的实例. 本教程使用了 React 的版本 ...
- linq之多表连接
1.左连接: var LeftJoin = from emp in ListOfEmployees join dept in ListOfDepartment on emp.DeptID equals ...