当前位置:网站首页>泰山OFFICE技术讲座:同一行不同字号的字如何对齐绘制
泰山OFFICE技术讲座:同一行不同字号的字如何对齐绘制
2022-06-30 15:49:00 【柳鲲鹏】
一行有不同字号的字,布局绘制时有几个方案:
- 顶部对齐
- 中部对齐
- 底部对齐
- 基线对齐(OFFICE选择,也应该是所有软件的选择)
字体结构的Baseline/Leading/Ascent/Descent的图示_柳鲲鹏的博客-CSDN博客_ascent descent 字体
从上述博文中, 可以看到什么是基线。那么一行的基线是如何确定的呢?首先X方向布局完成,其次本行也确定位于本页内:
- 遍历所有叶子。
- 找到最大的叶子高度。有的叶子是图片,高度超过文本叶子。
- 找到最大的叶子BaselineFromBottom。
有两点要注意:BaseLine要从底部向上计算(因为行高度还不确定),要考虑底部有边框的情形。
- 设置行高。
- 设置BaselineFromTop
即行高-BaselineFromBottom。这样方便叶子处理。
- 绘制
根据传递的y,加上BaselineFromTop,就是文字绘制起点。
边栏推荐
- 腾讯二面:@Bean 与 @Component 用在同一个类上,会怎么样?
- differential analysis between different groups nichenet for silicosis成功运行!
- restartProcessIfVisible的流程
- Internet R & D efficiency practice qunar core field Devops landing practice
- pref使用记录
- Bc1.2 PD protocol
- [BJDCTF2020]The mystery of ip|[CISCN2019 华东南赛区]Web11|SSTI注入
- 互联网研发效能实践之去哪儿网(Qunar)核心领域DevOps落地实践
- 巩固入门-C#基础变量和常量
- Symantec electronic sprint technology innovation board: Tan Jian, the actual controller, is an American who plans to raise 620million yuan
猜你喜欢
[activity registration] it's your turn to explore the yuan universe! I will be waiting for you in Shenzhen on July 2!
AVIC UAV technology innovation board is listed: the fist product with a market value of 38.5 billion is pterodactyl UAV
9: Chapter 3: e-commerce engineering analysis: 4: [general module]; (to be written...)
[JVM] takes you to learn about the garbage collection mechanism (GC) in the JVM -- including diagrams
[Verilog quick start of Niuke online question series] ~ bit splitting and operation
Undistorted resize using pil
JS ES5也可以创建常量?
阿里云盘分享压缩包
Mathematical modeling for war preparation 35 time series prediction model
IO流_递归
随机推荐
TCP socket and TCP connection
geo 读取单细胞csv表达矩阵 单细胞 改列名 seurat
【JVM】一文带你了解JVM中的垃圾回收机制(GC)——内含图解
List becomes vector list becomes vector list vector
山西化工园区智能化管控平台建设时间表
STL教程7-set、pair对组和仿函数
addmodule_ allmerge_ ams_ im
Lambda表达式_Stream流_File类
A scheduled task deletes data at a specified time
The 25th anniversary of Hong Kong's return to China the Hong Kong Palace Museum officially opened as a new cultural landmark
Multi terminal collaboration of Huawei accounts to create a better internet life
数据安全合规之后,给风控团队带来了新的问题
Mathematical modeling for war preparation 36 time series model 2
How to connect the Internet Reading Notes - Summary
Installing jupyter notebook under Anaconda
编译丨迅为iTOP4412开发板Makefile编译
Niuke: how many different binary search trees are there
阿里云盘分享压缩包
Implementation of aut, a self-developed transport layer protocol for sound network -- dev for dev column
Anaconda下安装Jupyter notebook