如何用word制作逼真的手写字体?
生活随笔
收集整理的這篇文章主要介紹了
如何用word制作逼真的手写字体?
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
效果
代碼
Sub rand()Dim R_Character As RangeApplication.ScreenUpdating = FalseFor Each R_Character In ActiveDocument.CharactersVBA.RandomizeIf R_Character = "。" Or R_Character = "," Or R_Character = "," Or R_Character = ";" Or R_Character = "’" Or R_Character = "‘" Or R_Character = "“" Or R_Character = "”" Or R_Character = "!" Or R_Character = "?" Or R_Character = "、" Or R_Character = ":" ThenR_Character.Font.Name = "世界那么大"ElseIf R_Character = "分" Or R_Character = "統" ThenR_Character.Font.Name = "伯樂俏皮體"ElseIf Asc(R_Character) >= 48 And Asc(R_Character) <= 57 ThenIf R_Character = "5" ThenR_Character.Font.Name = "游狼近草體(簡)"ElseR_Character.Font.Name = "建剛字庫徐明簡體"End IfElseIf Asc(R_Character) >= 97 And Asc(R_Character) <= 122 Or Asc(R_Character) >= 65 And Asc(R_Character) <= 90 Or R_Character = "." Or R_Character = "(" Or R_Character = ")" Or R_Character = "(" Or R_Character = ")" ThenR_Character.Font.Name = "游狼近草體(簡)"ElseIf R_Character = "具" Or R_Character = "有" Or R_Character = "面" ThenR_Character.Font.Name = Choose(Int(VBA.Rnd * 5) + 1, "陳代明硬筆體2013正式版", "邯鄲-郭靈霞靈芝體", "迷你簡硬筆行書", "陳代明粉筆字體演示版", "方正硬筆行書簡體")ElseR_Character.Font.Name = Choose(Int(VBA.Rnd * 2) + 1, "邯鄲-郭靈霞靈芝體", "邯鄲-郭靈霞靈芝體")End IfEnd IfR_Character.Font.Size = Choose(Int(VBA.Rnd * 7) + 1, "19", "18", "18", "19.5", "18.5", "19", "19.5")R_Character.Font.Position = Choose(Int(VBA.Rnd * 5) + 1, 1.5, 2.5, 2, 0, 1)R_Character.Font.Spacing = Choose(Int(VBA.Rnd * 5) + 1, -1.8, -1.5, -1.6, -1.7, -1.4)Next Selection.Find.ClearFormattingSelection.Find.Replacement.ClearFormattingWith Selection.Find.Text = "“".Replacement.Text = "".Forward = True.Wrap = wdFindContinue.Format = False.MatchCase = False.MatchWholeWord = False.MatchByte = True.MatchWildcards = False.MatchSoundsLike = False.MatchAllWordForms = FalseEnd WithSelection.Find.Execute Replace:=wdReplaceAllSelection.Find.ClearFormattingSelection.Find.Replacement.ClearFormattingWith Selection.Find.Text = "”".Replacement.Text = "".Forward = True.Wrap = wdFindContinue.Format = False.MatchCase = False.MatchWholeWord = False.MatchByte = True.MatchWildcards = False.MatchSoundsLike = False.MatchAllWordForms = FalseEnd WithSelection.Find.Execute Replace:=wdReplaceAll Application.ScreenUpdating = TrueEnd Sub總結
以上是生活随笔為你收集整理的如何用word制作逼真的手写字体?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java 移位运算符
- 下一篇: 开热点给电脑消耗大吗_电脑用手机热点上网