当前位置:网站首页>泰山OFFICE技术讲座:同一行不同字号的字如何对齐绘制
泰山OFFICE技术讲座:同一行不同字号的字如何对齐绘制
2022-06-30 15:49:00 【柳鲲鹏】
一行有不同字号的字,布局绘制时有几个方案:
- 顶部对齐
- 中部对齐
- 底部对齐
- 基线对齐(OFFICE选择,也应该是所有软件的选择)
字体结构的Baseline/Leading/Ascent/Descent的图示_柳鲲鹏的博客-CSDN博客_ascent descent 字体
从上述博文中, 可以看到什么是基线。那么一行的基线是如何确定的呢?首先X方向布局完成,其次本行也确定位于本页内:
- 遍历所有叶子。
- 找到最大的叶子高度。有的叶子是图片,高度超过文本叶子。
- 找到最大的叶子BaselineFromBottom。
有两点要注意:BaseLine要从底部向上计算(因为行高度还不确定),要考虑底部有边框的情形。
- 设置行高。
- 设置BaselineFromTop
即行高-BaselineFromBottom。这样方便叶子处理。
- 绘制
根据传递的y,加上BaselineFromTop,就是文字绘制起点。
边栏推荐
- [Verilog basics] octal and hexadecimal representation of decimal negative numbers
- IO stream_ recursion
- differential analysis between different groups nichenet for silicosis成功运行!
- Mathematical modeling for war preparation 35 time series prediction model
- 八大基本排序(详解)
- [activity registration] it's your turn to explore the yuan universe! I will be waiting for you in Shenzhen on July 2!
- Delete duplicates in an ordered array ii[double pointers -- unified in multiple cases]
- The meaning of linetypes enumeration values (line_4, line_8, line_aa) in opencv
- [Verilog quick start of Niuke online question series] ~ bit splitting and operation
- Hologres共享集群助力淘宝订阅极致精细化运营
猜你喜欢

7 月 2 日邀你来TD Hero 线上发布会

【OpenCV 例程200篇】215. 基于多段线绘制近似椭圆

Installing jupyter notebook under Anaconda

编译丨迅为STM32P157开发板编译U-Boot源码

Raft introduction

Rongsheng biology rushes to the scientific innovation board: it plans to raise 1.25 billion yuan, with an annual revenue of 260million yuan

【JVM】一文带你了解JVM中的垃圾回收机制(GC)——内含图解

9:第三章:电商工程分析:4:【通用模块】;(待写……)

RT thread heap size Setting

Niuke: how many different binary search trees are there
随机推荐
RTP sending PS stream zero copy scheme
Substrate 跨链技术源码级探索: XCVM的概览
Multi terminal collaboration of Huawei accounts to create a better internet life
addmodule_ allmerge_ ams_ im
异常类_日志框架
Rongsheng biology rushes to the scientific innovation board: it plans to raise 1.25 billion yuan, with an annual revenue of 260million yuan
Etcd tutorial - Chapter 8 compact, watch, and lease APIs for etcd
pref使用记录
Nichenet actual silicosis
go-micro教程 — 第一章 快速入门
Design of piece counter based on 51 single chip microcomputer
TCP socket and TCP connection
Jsr303 and common validator implementations
【机器学习】K-means聚类分析
List becomes vector list becomes vector list vector
2022 Blue Bridge Cup group B -2022- (01 backpack to calculate the number of schemes)
9: Chapter 3: e-commerce engineering analysis: 4: [general module]; (to be written...)
MySQL8 NDB Cluster安装部署
利用PIL进行不失真的resize
List announced - outstanding intellectual property service team in China in 2021