フリーフォントM+を丸ゴシック化 ― Rounded M+

M+(エムプラス)フォント wikipedia:M+ FONTS を丸ゴシック化 wikipedia:丸ゴシック体 しました!



Rounded M+(ラウンデッド・エムプラス)という名前です。

ダウンロード

追記 2013-07-05
MM様が、より新しいRounded M+を作成されました!
http://jikasei.me/font/rounded-mplus/
漢字を多く含みますので、ここで配布しているのよりオススメです。


※2012-02-29 一部の文字(全角の0〜7)がおかしい問題を修正しました。


※2012-02-27 フォント名の問題(Windows7のフォントフォルダで見ると「Rounded M+」ではなく「M+」フォントにインストールされる)を修正しました。


フリーフォントです。

等幅(モノスペース)
Rounded M+ 1m
http://sourceforge.jp/projects/mix-mplus-ipa/downloads/55073/rounded-mplus-1m-20120229.tar.xz/ (4.4 MB)
Rounded M+ 2m
http://sourceforge.jp/projects/mix-mplus-ipa/downloads/55073/rounded-mplus-2m-20120229.tar.xz/ (4.4 MB)
Rounded M+ 1mn
http://sourceforge.jp/projects/mix-mplus-ipa/downloads/55073/rounded-mplus-1mn-20120229.tar.xz/ (4.4 MB)


xzファイルは、Windowsの場合 7-Zip http://sevenzip.sourceforge.jp/ で展開できます。
Linuxの場合、以下で展開できます。

tar Jxvf rounded-mplus-1m-20120226.tar.xz





M+43ttf

M+

M+ 2012-02-24T02:24:00+09:00 



M+ TESTFLIGHT 0462012-02-243775JIS126355

(1m, 2m, 1mn)Adobe(1p, 2p, 1c, 2c)Illustrator CS4Microsoft Word 2010/2000



制作メモ

Rounded M+フォントの制作方法を紹介します。

制作環境


[] 


[]M+ M+Adobe Illustrator




Xtream Path

http://www.flashbackj.com/xtreampath/

Xtream Path

http://www.dtp-transit.jp/adobe/illustrator/post_992.html



[] 使


[] 


M+svgai
使svgaisvg


[] ai


[] aiai




IllustratorActions使


 'glyph rounded' :



(一)[File - Scripts - AiCS5-SelectGroupItem.jsx] 

(二)[Edit - cut] 

(三)[Edit - Select All] 

(四)[Object - Blend - Expand] 

(五)[PathFinder - Unite] 

(六)[Object - Filters - XtreamPath - ] 

(七)[Paste in Place] 

(八)[File - Script - AiCS5-SaveAsSvgToOtherDir.jsx] SVG

(九)[File - Close] 

1. 枠線を選択

[] 


[] M+svg<rect ..><rect ..>M+





[] 


[] ActionsAdobe ExtendScript Toolkit 使


[] Adobe ExtendScript Toolkit


[]  http://d.hatena.ne.jp/itouhiro/20090614 IllustratorC:\Program Files\Adobe\Adobe Illustrator CS5.1\Scripting\Sample Scripts\JavaScript (WindowsXP) 


 C:\Program Files\Adobe\Adobe Illustrator CS5.1\Presets\en_GB\Scripts (WindowsXP)  AiCS5-SelectGroupItem.jsx 'Program Files'Illustrator


AiCS5-SelectGroupItem.jsx:
vari;
//ブレンドされたパスのロックを解除
var blendItems = app.activeDocument.pluginItems;
for (i=0;i<blendItems.length;i++){
    if (blendItems[i].locked == true){
        blendItems[i].locked = false;
    }
}
var groupItems = app.activeDocument.groupItems;
var mosttop = -1; //Illustrator CS5は実アプリとスクリプトで座標値が異なり、スクリプトのmaxは実アプリのminなのでこんな変数名に
var mostindex = -1;
for (i=0;i<groupItems.length;i++){
    //グループ化されたパスのロックを解除
    if (groupItems[i].locked == true){
        groupItems[i].locked = false;
    }
    //Y座標が一番上にあるグループを探す
    if (mosttop < groupItems[i].top){
        mosttop = groupItems[i].top;
        mostindex =i;
    }
}
//Y座標が一番上にあるグループ(ここでは枠線)を選択
groupItems[mostindex].selected = true;







hiragana2/244F.ai, 2464.ai 

XtreamPathkanji/k1/k1-15.ai 



 [File - Scripts - AiCS5-SelectGroupItem.jsx] Actions [Insert Menu Item]



http://vector.tutsplus.com/tutorials/scripting/scripting-illustrator-part-2-how-to-meld-a-gradient-into-a-flat-process-color/


4. Blendの拡張

M+ FONTSは7つもウェイト(太さ)があるんだけど、実はブレンド機能を使っていくつかのウェイトは自動的に生成しているんだ。aiファイルはそのブレンド機能が残っているので、それを解除しておかないと丸ゴシック化がうまくいかない。[Object - Blend - Expand(拡張)] で解除して、個別のパスオブジェクトにできる。


5. 字形の合体

たとえば ○ の形の円だけど、[PathFinder - Unite(合体)] で字形を合体せずに丸ゴシック化すると、円の下の部分が ⊃⊂ のようにつなぎ目が見える感じになってしまう。それはまずいので合体するよ。


6. Xtream Pathプラグインを実行

[Object - Filters - XtreamPath - ] Actions[OK][OK]



[] 


[] Illustrator[OK]使[OK]Windows AutoHotKey 使


http://sites.google.com/site/autohotkeyjp/reference/Examples#TOC-13 


WindowClass #32770AutoHotKeyspy調
#Persistent                         ;ホットキーなどを使用せず、スクリプトを常駐
SetTimer,OnTimer,1000               ;指定サブルーチンを1秒ごとに実行
return                              ;スクリプト起動時の実行部分終了
OnTimer:                            ;タイマーに割り当てられるサブルーチンラベル
IfWinActive, ahk_class #32770
{
  SetControlDelay -1                ;動作安定度を上げるおまじない http://www.autohotkey.com/docs/commands/ControlClick.htm
  ControlClick,OK,ahk_class #32770,,,, NA
}
return                              ;タイマーサブルーチンの終了

#PersistentReload ScriptAutoHotKeyExit


AutoHotKeyXtreamPathIllustratorBatch[OK]使
AutoHotKey_L調ControlSendWinCPU100%調


[] 使


[] XtreamPath


7. 枠線を元の位置に戻す

 [Edit - Paste in Front](Ctrl+F)ai[Edit - Paste in Front] [Edit - Paste in Place](Shift+Ctrl+V)使


8. SVGとして保存

ActionsSave As..ai


M+svgIllustrator


AiCS5-SaveAsSvgToOtherDir.jsx
//フォルダ名「/mplus」の部分だけ「/rounded」にして、あとのフォルダ構造は同じにする
var currentDoc = app.activeDocument;
var newFileName = currentDoc.name.substring(0, currentDoc.name.lastIndexOf('.')) + '.svg';
var newDirName = currentDoc.path.toString().replace('/mplus', '/rounded');

//出力フォルダがなければ作る
var newDir = new Folder(newDirName);
if(! newDir.exists){ newDir.create();}

var newFile= new File(newDirName + '/' + newFileName);
//ファイル保存できるかチェック
if (newFile.open('w')){
    newFile.close();
}else{
    throw new Error('Access is denied');
}

// SVGをExportするのは、SaveAsでSVG選ぶのと同じ扱い。つまり保存したあと実アプリで開いてるファイル名もsvgになる
// SVG1_0, UTF-8, PRESENTATIONATTRIBUTES は指定しないとM+のスクリプトがうまく動作しない。
var options = new ExportOptionsSVG();
options.DTD = SVGDTDVersion.SVG1_0;
options.documentEncoding = SVGDocumentEncoding.UTF8;
options.cssProperties = SVGCSSPropertyLocation.PRESENTATIONATTRIBUTES;
options.embedRasterImages = false;
options.includeFileInfo = false;
currentDoc.exportFile(newFile, ExportType.SVG, options);


: http://cssdk.host.adobe.com/sdk/1.0/docs/WebHelp/references/csawlib/com/adobe/illustrator/ExportOptionsSVG.html


アクション実行





1. M+ svg.d *.ai
% cd ~/mplus_outline_fonts; tar c --exclude=codemap --exclude=baseline --exclude='*s' --exclude-vcs --exclude='*.svg'  -f - svg.d | (cd ~/mplus_outline_fonts/tmp ; tar xvf -)


2.  svg.d mplus 
% cd ~/mplus_outline_fonts/tmp/; mv svg.d mplus


3. IllustratorActions Batch 


4. Source: [Folder][Choose] mplus'Include All SubDirectories' 


5. 4





個別に処理した問題

枠線グループがうまく選択できない

以下はaiファイルの段階で枠線グループがうまく作られていないため、正常に選択できない。→Illustratorアクションが停止する。

対策: aiファイルを手動でグループ一つに修正しておく

  • latin_proportional2/00B8.ai
  • latin_proportional2/0050.ai
  • latin_proportional1/00B8.ai
  • latin_clear2/0050.ai
収録文字まちがい



: latin_fullwidth1/uFF10.svgsvg


  • latin_fullwidth1/uFF10.ai
svgファイルに<circle ..> タグが入り処理できない

svg <path ..> <circle ..>M+ https://twitter.com/#!/itouhiro/status/173321540589457408


: svg<circle ..>svg<circle .. r="5.5"/> rIllustratorcircle
svgIllustrator410.01mm 


Linux使
% find svg.d/ -name "*.svg" | xargs grep -Hc '<circle ' | grep -v ':0' | sort
  • latin_clear1/0068.svg
  • latin_clear1/0128.svg
  • latin_clear1/0130.svg
  • latin_clear1/01C8.svg
  • latin_clear1/0268.svg
  • latin_clear1/0298.svg
  • latin_clear1/0450.svg
  • latin_clear1/0458.svg
  • latin_clear1/1EC8.svg
  • latin_clear1/FB00.svg
  • latin_monospace1/2020.svg
  • latin_monospace1/2218.svg
  • latin_proportional1/0378.svg
  • latin_proportional1/0598.svg
  • latin_proportional1/05B0.svg
  • latin_proportional1/2020.svg
  • latin_proportional1/2218.svg
  • latin_proportional1/2638.svg
  • latin_proportional1/26A8.svg
  • miscellaneous1/u2038.svg
  • miscellaneous1/u25C8.svg
  • miscellaneous1/u25D8.svg
黒背景に白文字



: XtreamPath

  • miscellaneous1/u24E8.ai (U+24EB-24F4, U+24FF)
  • miscellaneous1/u24F0.ai (U+24EB-24F4, U+24FF)
  • miscellaneous1/u2770.svg (U+2776-277F, U+278A-2793)
  • miscellaneous1/u2778.svg (U+2776-277F, U+278A-2793)
  • miscellaneous2/u24E8.ai (U+24EB-24F4, U+24FF)
  • miscellaneous2/u2778.svg (U+2776-277F, U+278A-2793)
アクションが正常に保存されない

Illustrator[Insert Menu Item..]Illustrator



svg http://sourceforge.jp/projects/mix-mplus-ipa/releases/?package_id=12907  svg-rounded-mplus-*.7z 


[] 


[] 


ビルド方法



CVSM+ttf
aisvgIllustrator使
% tar c --exclude-vcs --exclude='*.ai' --exclude='*.svg' --exclude='eps.d' -f -  mplus_outline_fonts | (cd tmp/ ; tar xvf -)
% mv tmp/mplus_outline_fonts ~/m20120226


Windows7zsvg
% cd ~/m20120226/svg.d/
% 7z x /mnt/windows/rounded_mplus-20120226.7z



% cd ~/m20120226/
% MPLUS_FULLSET=yes make SPLIT_CONCURRENCY=2 -j22>&1 | tee `date +%Y%m%d-%H%M`.log



  #リリースするフォントを集める
% cd ~/m20120226/release/
% make
  #フォント名をリネーム
% cd ~/m20120226/release/rounded/
% forFin ../mplus-TESTFLIGHT-046/*ttf; do fontforge -script  renamer.pe $F; done

renamer.pe
#!/usr/bin/env fontforge -script

if ($argc <= 1)
  Print("usage: fontforge -script renamer.pe foobar.ttf")
  Quit(0)
endif

# open font
Open($1)

# NameIDs
# http://partners.adobe.com/public/developer/opentype/index_name.html#enc4
copyright = GetTTFName(0x409,0)                     #0
family = 'Rounded ' + $familyname                   #1
weight = GetTTFName(0x409,2)                        #2 subfamily
uniqueID = "FontForge 2.0 : "+family+" : "+Strftime("%-d-%-m-%Y",0,'C')  #3
fullFamily = 'Rounded ' + $fullname                 #4
version = "1.046." + Strftime("%Y%m%d",0,'C')       #5
postscriptName = 'rounded-' + $fontname             #6
preferredFamily = 'Rounded ' + GetTTFName(0x409,16) #16
#preferredSubFamily                                 #17
newfilename = postscriptName

# rename
SetFontNames(postscriptName, family, fullFamily, weight, copyright, version)
SetTTFName(0x409, 3,  uniqueID)
SetTTFName(0x409, 16, preferredFamily)
SetTTFName(0x409, 11, "http://mix-mplus-ipa.sourceforge.jp")

## save font
Generate(newfilename + ".ttf", "", 0x84)
Print("Generate:" + newfilename + ".ttf")


xz
  #フォルダを作成
% cd ~/m20120226/release/
% forTin 1c 1m 1mn 1p 2c 2m 2p; do D=rounded-mplus-${T}-`date +%Y%m%d`; mkdir ${D}; done
  #ttfファイルを分配
% forTin 1c 1m 1mn 1p 2c 2m 2p; do D=rounded-mplus-${T}-`date +%Y%m%d`; mv -v rounded/*${T}-*.ttf ${D}/; done
  #READMEをコピー
% forTin 1c 1m 1mn 1p 2c 2m 2p; do D=rounded-mplus-${T}-`date +%Y%m%d`; cp -vpr README_E_rounded.txt ${D}/; done
  #xz圧縮
% forTin 1c 1m 1mn 1p 2c 2m 2p; do D=rounded-mplus-${T}-`date +%Y%m%d`; tar cf - ${D}/ | xz -9e -c > ${D}.tar.xz; done


[] 使


[] 使



OpenType OU-02ヒラギノUD丸ゴW4/W6 StdN V8.0

OpenType OU-02ヒラギノUD丸ゴW4/W6 StdN V8.0