当前位置:网站首页>泰山OFFICE技术讲座:同一行不同字号的字如何对齐绘制
泰山OFFICE技术讲座:同一行不同字号的字如何对齐绘制
2022-06-30 15:49:00 【柳鲲鹏】
一行有不同字号的字,布局绘制时有几个方案:
- 顶部对齐
- 中部对齐
- 底部对齐
- 基线对齐(OFFICE选择,也应该是所有软件的选择)
字体结构的Baseline/Leading/Ascent/Descent的图示_柳鲲鹏的博客-CSDN博客_ascent descent 字体
从上述博文中, 可以看到什么是基线。那么一行的基线是如何确定的呢?首先X方向布局完成,其次本行也确定位于本页内:
- 遍历所有叶子。
- 找到最大的叶子高度。有的叶子是图片,高度超过文本叶子。
- 找到最大的叶子BaselineFromBottom。
有两点要注意:BaseLine要从底部向上计算(因为行高度还不确定),要考虑底部有边框的情形。
- 设置行高。
- 设置BaselineFromTop
即行高-BaselineFromBottom。这样方便叶子处理。
- 绘制
根据传递的y,加上BaselineFromTop,就是文字绘制起点。
边栏推荐
- How to connect the Internet Reading Notes - Summary
- 香港回归25周年 香港故宫博物馆正式开放成文化新地标
- Jspreadsheet/ce JExcel: more data fields than the given fields (columns) will lead to blank columns. Solution
- JSR303以及常见Validator实现
- List becomes vector list becomes vector list vector
- 更多龙蜥自研特性!生产可用的 Anolis OS 8.6 正式发布
- [Verilog quick start of Niuke online question series] ~ bit splitting and operation
- 【JVM】一文带你了解JVM中的垃圾回收机制(GC)——内含图解
- Mathematical modeling for war preparation 34-bp neural network prediction 2
- Home office discussion on the experience of remote assistance to quickly improve efficiency | community essay solicitation
猜你喜欢

restartProcessIfVisible的流程

Bc1.2 PD protocol
![Halcon knowledge: regional topics [07]](/img/18/680997127047fb24b0ee4f19d8f2c5.png)
Halcon knowledge: regional topics [07]
![[wechat applet] basic use of common components (view/scroll-view/wiper, text/rich-text, button/image)](/img/3b/05dbf03024088c5f94363f157a1701.png)
[wechat applet] basic use of common components (view/scroll-view/wiper, text/rich-text, button/image)
![[bjdctf2020]the mystery of ip|[ciscn2019 southeast China division]web11|ssti injection](/img/c2/d6760826b81589781574aebff61f9a.png)
[bjdctf2020]the mystery of ip|[ciscn2019 southeast China division]web11|ssti injection

居家办公浅谈远程协助快速提效心得 | 社区征文

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

Niuke network: longest continuous subarray with positive product

安全帽佩戴检测算法研究

How to connect the Internet Reading Notes - Summary
随机推荐
STL tutorial 7-set, pair pair pair group and functor
2022 Blue Bridge Cup group B -2022- (01 backpack to calculate the number of schemes)
巩固入门-C#基础变量和常量
几个跨端开发神器
[Verilog quick start of Niuke online question series] ~ bit splitting and operation
9: Chapter 3: e-commerce engineering analysis: 4: [general module]; (to be written...)
restartProcessIfVisible的流程
RT-Thread 堆区大小设置
[Verilog basics] octal and hexadecimal representation of decimal negative numbers
redis数据结构分析
“推广+搞笑剧情”,如何碰撞出爆款的火花?
nodejs学习笔记二
Installing jupyter notebook under Anaconda
您工厂的MES再不升级,就要被淘汰啦
数据挖掘知识点整理(期末复习版)
Wechat emoticons are written into the judgment, and the OK and bomb you send may become "testimony in court"
Data mining knowledge points sorting (final review version)
Halcon knowledge: regional topics [07]
Exception class_ Log frame
坚果云-在新电脑上同步移动硬盘的文件