Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnVCL 组件包
» AAFont平滑处理是如何取样的?
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: AAFont平滑处理是如何取样的?
songyx0
新警察
UID 55128
Digest Posts 0
Credits 10
Posts 3
点点分 10
Reading Access 10
Registered 2010-11-17
Status Offline
#1
Post at 2010-11-18 08:43
Profile
|
Blog
|
P.M.
AAFont平滑处理是如何取样的?
如下附件
假设目标点是B1,我曾试过A1, A2, B1, B2, C1, C2这样,效果不怎么样,就跟用ps的模糊工具抹了一下似的,边缘不清晰,看AAFont的代码貌似是跳着取样的?搞不明白啊
Image Attachment
:
未标题-1.gif
(2010-11-18 08:43, 11.69 K)
zjy
管理员
UID 2
Digest Posts
6
Credits 2385
Posts 1543
点点分 2385
Reading Access 102
Registered 2002-12-16
Location China
Status Offline
#2
Post at 2010-11-19 00:10
Profile
|
Site
|
Blog
|
P.M.
AAFont 的原理是这样
先根据平滑精度将字号放大几倍,绘制后再用均值算法缩小成原字号大小。
比如要绘制12点的文字,用3x3的精度,则先在后台绘制36点的文字,再按每3x3个格子9个点取平均值作为目标像素的方法生成12点的平滑文本。
AAFont是Win98时代的产物,那个时候还没有gdiplus,也没有取字体图元数据的api,所以用的笨办法。
在NT系统下,可以用gdiplus来生成平滑字,或者用GetGlyphOutline来实现,当然用FreeType也可以
Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
songyx0
新警察
UID 55128
Digest Posts 0
Credits 10
Posts 3
点点分 10
Reading Access 10
Registered 2010-11-17
Status Offline
#3
Post at 2010-11-19 11:23
Profile
|
Blog
|
P.M.
哦,这样啊,我以为是直接在原图上平滑的
但是AAfont的循环着实让人捉摸不透,其实研究这东西主要是由于我对GDI+的效率比较担心...
songyx0
新警察
UID 55128
Digest Posts 0
Credits 10
Posts 3
点点分 10
Reading Access 10
Registered 2010-11-17
Status Offline
#4
Post at 2010-11-19 12:06
Profile
|
Blog
|
P.M.
回复 #2 zjy 的帖子
谢谢zjy的解惑,非常感谢哈
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-11-22 06:46
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.008704 second(s), 10 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats