Categories
WordPress

To create a WOFF file from my own handwriting-#3.

同一記事の日本語版
Update information      Edit(Jul.17)

New Widgets Title on Japanese blog   Continued from “To create a WOFF file from my own handwriting-#2.”.

   Now, I have the ttf file(Untitled1.ttf) I want. First I’ll make a subset from the ttf file. Actually my ttf file only contains 31 glyph, nevertheless, the subset file is smaller than the original file. So, this work is worthwhile. Second, I’ll make a WOFF file.

   You can find some sites which create WOFFs from ttfs. For example, Webfont Generator, ttf to woff converter, Font2Web, and so on. Some of them can convert full-size characters as well as half-size characters, others cannot. You are able to use command line tools like sfnt2woff. But I found a tool named WOFFコンバータ and can use it on Windows 2000/XP/Vista/7/8 and Mac OS X 10.6 or later. Besides, they distribute a subset font maker named サブセットフォントメーカー, which also works on Windows 2000/XP/Vista/7/8 and Mac OS X 10.6 or later. So, I’ll use it. I greatly appreciate their tools.

  1. Install サブセットフォントメーカー and WOFFコンバータ.
  2. Run サブセットフォントメーカー.   — Fig.1
     
    Explanations of words:
    参照 <--- Browse. 作成元フォントファイル <--- It means "Original File Location & Name". 作成後フォントファイル <--- It means "Subset File Location & Name". フォントに格納する文字 <--- It means "What characters you want the Subset file to include". 書体名を変更する <--- Change Font Name. IMPORTANT!! If a font on your system has the same name, it might be affected by this font.
    作成開始 <--- Make Subset
  3. After 2, WOFFコンバータ runs automatically.   — Fig.2
     
    Explanations of words:
    サンプル文字列 <--- Characters for @font-face Demo 変換開始 <--- Convert to WOFF.

   When this work ends, the tools give me next three files.
     ・Untitled1_sub.html
     ・Untitled1_sub.ttf
     ・Untitled1_sub.woff

   If you open the Untitled1_sub.html by a text editor, you can find the css code you need.

   In my case, I created the WOFF to use for the my Japanese blog Theme which is a child Theme of ‘Sugar and Spice’. So I added the css customization for its style.css. Here is my current style.css in the child Theme folder. Bold and italic parts are new additions. Of course, you have to upload the WOFF file to your server.
   Then the Widget Titles on my Japanese blog have changed their design. See the top image of this post. The WOFF file size is only 10.8KB. Now I have satisfied my own ego trip ha-ha-ha.

   Mission complete!! Clap, clap.

/*
Theme Name: J blog
Theme URI: http://webtuts.pl/themes/sugar-spice
Description: sugarspice Child Theme
Author: Aleksandra Laczek
Author URI: http://webtuts.pl
Template: sugar-and-spice
Tags: light, white, gray, two-columns, fixed-layout, responsive-layout,
custom-background, custom-menu, featured-images, theme-options, threaded-comments,
translation-ready, full-width-template
Text Domain: sugarspice-child
*/

@import url("../sugar-and-spice/style.css");

/* =Theme customization starts here
-------------------------------------------------------------- */
@font-face {
font-family: 'MyFont';
src: url('Exact URL to Untitled1_sub.woff') format('woff');
}

body {
color: #000;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
color: #000;
}

/* Calendar Widget */
table th,
table td{
color: #000;
background: transparent;
border: none;
text-align: left;
}

.widget-title em {
font-family: 'MyFont';
font-size: 26px;
font-style: normal;
padding-left: 3px;
}

/* 07. Forms & buttons
================================================== */
.button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
color: #000;
}

/* #Forms */
input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
textarea,
select {
color: #000;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus {
color: #000;
}

label span,
legend span {
color: #000;
}

Edit(Jul.17):
   Hey guys, I have good news for you. Now, we can use FontForge for Windows with no pains. At this time, its version is 20-06-2014.

Categories
WordPress

To create a WOFF file from my own handwriting-#2.

同一記事の日本語版
Update information      Edit(Jul.17)

   Continued from “To create a WOFF file from my own handwriting-#1.”.

   Now, I can use FontForge. By the way, the fontforge_cygwin-20090914.tar.bz2 on my Windows8 Pro x86 is very unstable. But it works. FontForgeSetup_2012-07-31_Windows.exe didn’t work and fontforge-20090923-1.i386.rpm was more unstable than fontforge_cygwin-20090914.tar.bz2 on my system. There is no turning back. So, I use the fontforge_cygwin. See the edit. You can use FontForge for Windows.
   I first write about creating a ttf file, but note the following points. To follow my procedure probably you have a ttf file and it possibly works. But I do not mention a lot of information to create a full ttf file. So if you want to make a decent ttf file, learn about it by yourself after my method confirmed. You can find more information on Tutorial.
 
**Step by step #2**

  1. Open a cygwin window (by clicking on the cygwin icon).
    $ xinit   — Fig.1

    I have X in a large window.
    [Note] I think you’d better make a working folder for your WOFF. The folder is named MyFont or something like that and placed in cygwinhome<username>. You save your Inkscape SVG files to the folder, which is convenient for your rest work.

  2. $ cd MyFont
    $ fontforge -new   — Fig.2
    I have a new window at the right top corner.
  3. ***Starting to create a font.
    1. I create a Japanese font, so I use a re-encoding feature (JIS 212 (Kanji)).   — Fig.3
    2. ****Creating a half-width character.

      At the first, I make “p” as a half-width character example. Double clicking on the green area.   — Fig.4
      I have another window.   — Fig.5

    3. Use ‘Import’.   — Fig.6
    4. Click ‘Image’ and choose ‘SVG’ from the drop down menu.   — Fig.7, Fig.8
    5. Double click p.SVG.   — Fig.9
    6. Choose ‘Close’.   — Fig.10
    7. “p” is a half-width character, so Use ‘Metric Window’.   — Fig.11
    8. Change the width from ‘1000’ to ‘500’.   — Fig.12
    9. Close ‘Metric Window’.   — Fig.13
    10. Save all I made as a sfd file (default: Untitled1.sfd).   — Fig.14, Fig.15
      [Note] Usually, we don’t need saving at this point, but my FontForge is very unstable. So, I saved all at the point every time just to be on the safe side.
    11. [Note] If you make half-width characters, repeat 2(Fig.4) -10(Fig.15) about all half-width characters you want to make.
       
    12. ****Creating a full-width character.

      I make “ン” as a full-width character example. When making a full-width character, use ‘View’ → ‘Goto’ feature because the finding character place is difficult.   — Fig.16

    13. Copy & paste “ン” in the search form and [OK].   — Fig.17
    14. Double clicking on the yellow area.   — Fig.18
      Repeat from Fig.5 to Fig.8.
    15. Double click U+30F3.SVG.   — Fig.19, Fig.20
      [Note] ‘U+30F3’ is the Unicode for ‘ン’. If available, ン.SVG is convenient for its file name, but, unfortunately this directory menu does not show full-width characters correctly on my system. So I use half-with characters as SVG file names.
    16. Close the window.   — Fig.10
    17. Save all to the sfd file which I made when I created the character “p”.   — Fig.14
    18. [Note] If suspending your creation, do Fig.21, Fig.22, Fig.23.
    19. [Note] If resuming your creation, type “fontforge YourFont.sfd” instead of “fontforge -new”.
    20. Repeat the work above about the characters I want to create. After that I have a sfd file which contains all glyph I want.
    21. Generate and save a ttf file.   — Fig.24, Fig.25
      [Note] Unchecked ‘Validate Before Saving’.
  4. Finaly, I have the ttf file I want.

   The next post I will write how to make a subset file.

Edit(Jul.17):

   Hey guys, I have good news for you. Now, we can use FontForge for Windows with no pains. At this time, its version is 20-06-2014.

Categories
everyday life

What is this bird?

同一記事の日本語版
Update information      Edit

Today's bird.
Today’s bird.
   The ume(梅) are blooming beautifully in my garden now. Of course, mejiro are coming almost everyday. This morning, I found another kind bird. What is this? I cannot remember. I think this is its song because the song came from the same direction of the bird.
   If your browser doesn’t support audio tags, download and listen!!
 
Edit:
   One of my Japanese Blog visitors told me the name of the bird. It is a Shijūkara(四十雀). I’ve already seen it, I think. Now, my head is cleared. (^^)

   Thanks a lot, りりさん.

Categories
WordPress

To create a WOFF file from my own handwriting-#1.

同一記事の日本語版
Update information      Edit(Jul.17)

Widgets Title on English blog   One of the reasons I chose the Theme “Sugar and Spice” was its Widget title design. Originally, it also provides the same design for blog titles though I don’t use this feature for the title. The name of the font for the designs is Niconne. It is available on Google Fonts and we can use it by this instructions.

Widgets Title on Japanese blog   After changing my Theme to “Sugar and Spice”, I suddenly found the Niconne includes only Latin font. On my Japanese blog the Widget titles are like the right image. Oops. Its Japanese font is dry and boring. Besides, what fonts are used depends on the visitors’ PC environment. Only “w” and “p” are displayed by the Niconne. I don’t like this.

   So I was looking for a Japanese WOFF instead of Niconne, but I couldn’t. At this point, when we use WOFFs of Japanese fonts, we have some specific difficulties. In Japanese texts we use various kind of characters than in Latin texts. A Japanese font file at least contains about 7000 characters. So the size of Japanese font files are much bigger and to create a Japanese font file needs harder work than to create a Latin one. Therefore, to find a free Japanese WOFF is difficult. To use a free Japanese WOFF is also inconvenient because the display of the blog slows down due to its size. Time that gives technology improvements will resolve this issues. But then, I was in trouble.

   Hence I decided to create a WOFF file from my own handwriting. Because I need only 31 characters for my Japanese blog Widget titles(最近の投稿広告コメントタグアーカイブテゴリ日本公式キャラクwp). So, I don’t need a full WOFF of Japanese. Besides, no license problem they have if I make them by myself d(^o^).

   Now, I’ll begin.

**Step by step**

  1. I wrote 31 funny letters by my hand like this ☞ . Ha ha ha.
  2. Scan my handwriting and save it as a png file. If your scanner doesn’t have a saving feature as png files, you need an images converter to make a png file. Of course you can use Inkscape as the converter.
  3. Modify each character to each ping file (1000 pixels x 1000 pixels). Only “p” and “w” are 500 pixels x 1000 pixels.
  4. All this ping files are bitmap image files, so I need to change them to vector image files. Download inkscape-0.48.4-1-win32.7z for my Windows8 x86.
  5. Extract inkscape-0.48.4-1-win32.7z to an appropriate place.
  6. Run inkscape.exe.
    1. Open one of the png files. Click on the image to focus.
    2. To trace a bitmap, call up the Trace Bitmap dialog (Path → Trace Bitmap). Click [OK]. Close the Trace Bitmap dialog.
    3. Simplify path (Path → Simplify). Save it as an Inkscape SVG file.
    4. Rotate rule.Repeat 1-3 about all png files.
      [Note] If you need to create a vector image by manual, keep this in your mind. When you draw outline of the glyph, you do always see the glyph body at the right side and the empty area at the left side. See the right image.
  7. Download setup-x86.exe (32-bit installation) See the edit. You can use FontForge for Windows.
  8. Install cygwin by following FontForge install procedures for cygwin under MS Windows. Actually, I installed and ran FontForgeSetup_2012-07-31_Windows.exe before this. But, unfortunately it didn’t work well on my Windows8 x86.
  9. Run setup-x86.exe.
    • At “Choose A Download Source”, Select “Install from Internet”.
    • At “Install For”, select “All Users”. Avoid the folder that name includes spaces, for example “Program Files”.
    • At “Internet Connection”, select “Direct Connection”.
    • At “Choose A Download Site”, chose a server you prefer.
    • At “Select Packages”, change X11 preference from “Defalt” to “INstall”.
    • Now, install.
  10. Download fontforge_cygwin-20090914.tar.bz2.
  11. Move fontforge_cygwin-20090914.tar.bz2 to cygwinhome<username>.
  12. Install FontForge.
    Open a cygwin window (by clicking on the cygwin icon).

    1. $ bunzip2 fontforge_cygwin-*.tar.bz2
    2. $ tar xf fontforge_cygwin-*.tar
    3. $ cd fontforge
    4. $ ./doinstall
    5. $ cat >> ~/.bashrc
      PATH=${PATH}:/usr/local/bin ; export PATH
      MANPATH=${MANPATH:-}:/usr/local/man ; export MANPATH
      export LANG=ja
    6. $ exit
  13. Download mplus_bitmap_fonts-2.2.4.tar.gz.
  14. Move mplus_bitmap_fonts-2.2.4.tar.gz to cygwinhome<username>.
  15. Open a cygwin window (by clicking on the cygwin icon).
    1. $ tar zxvf mplus_bitmap_fonts-2.2.4.tar.gz
    2. $ cd mplus
    3. $ ./install_mplus_fonts
    4. $ cd ..
    5. $ cat >> ~/.bashrc
      xset fp+ /usr/X11R6/lib/X11/fonts/mplus
    6. $ exit

   Now, I can use FontForge.

**Ref. URLs
   FontForge install procedures for cygwin under MS Windows (The original page does not exist anymore. This is Internet Archive’s. – 2014.11.7)
   FontForgeを使う (Japanese)

Edit(Jul.17):

   Hey guys, I have good news for you. Now, we can use FontForge for Windows with no pains. At this time, its version is 20-06-2014.

Categories
translation

The translation “Seijō no Ran (青条の蘭)”-#6.

   I’ve posted the last part of chapter 2, “Seijō no Ran (青条の蘭)”. Hyōchū (標仲) still continues his long and important journey.

   I have added some new explanations to the notes.

Categories
WordPress

WordPress Theme “Sugar and Spice”.

同一記事の日本語版
Update information      Edit    Edit2(Mar.9)    Edit3(Mar.9)

   I changed the theme of my sites to “Sugar and Spice“. I made three child themes for my site except my netradi.

   There are a lot of things which need work, but I already get bored. So, the rest I do at a later date. (^^;)

Edit:
   This was too shoddy article. I make some addition for my reminder.

   The reason for changing my Themes is I want to use the new features of Themes, about which I wrote on “Upgrading to WordPress 3.6.“. There is also the maintenance and the security of my sites. Besides, I want to support HTML5. Oh yes, about AdSense (He-he).

   The theme “Sugar and Spice” has ‘custom-menu’, ‘responsive-layout’, ‘theme-options’ as its major features. Nowadays, my sites has more accesses via smartphones, so the ‘responsive-layout’ is what I want to use.

   Though I considered revising my old themes before deciding to select a new theme, it seemed to take enormous time because each site had each theme and the themes made by myself. And, a lack of my knowledge about WordPress Theme (^^;). Besides, I’ve learned about “Child Theme” of WordPress Theme since I began WordPress blogs. So, at my new Theme I don’t make any changes on the parent Theme, I use the child Theme features for this purpose.

   WordPress has a huge number of Themes as you know. It is very difficult to choose a Theme from among them. So, I decided the range was only “Featured Themes“. I think the Theme among them maybe has new features and decent supports. I was tired and bored about this, finally, I settled for “Sugar and Spice“.

   I made a style.css for the child Theme. It includes the next customizations.
body {
color: #000;
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
color: #000;
}
/* Calendar Widget */
table th,
table td{
color: #000;
border: none;
text-align: left;
}

   The most struggling thing is the change of the original color of the Color scheme in the Theme Options. This original script is not in the style.css but in sugar-and-spice/inc/extras.php. Various new techniques appear, but an amateur like me is not following them (Sigh!).

   With this revision, I stopped the use of “One Row Calendar” and “My Link Order”. I’ve use them for a long time. I thanked the authors of both plugins m(_”_)m.

Edit2(Mar.9):

  • **About style.css customization
    • ****For displaying table’s background image
      /* Calendar Widget */
      table th,
      table td{
      color: #000;
      background: transparent;
         <--- I added this line. border: none;
      text-align: left;
      }
    • ****For darker comment form font color
      /* #Forms */
      input[type="text"],
      input[type="search"],
      input[type="password"],
      input[type="email"],
      textarea,
      select {
      color: #000;
      }

      input[type="text"]:focus,
      input[type="search"]:focus,
      input[type="password"]:focus,
      input[type="email"]:focus,
      textarea:focus {
      color: #000;
      }

      label span,
      legend span {
      color: #000;
      }

Edit3(Mar.9):
   I created my own WOFF file for “Sugar and Spice” child Theme.
     To create a WOFF file from my own handwriting-#1.
     To create a WOFF file from my own handwriting-#2.
     To create a WOFF file from my own handwriting-#3.

Categories
Windows

Updating to PHP5.5.9.

同一記事の日本語版

   At Feb-06 00:36:12UTC, they released PHP5.5.9.

   According to ChangeLog, this release fixes several bugs against PHP 5.5.8, and some of bugs are related with OPCache. So I updated my PHP immediately.

   I downloaded a Thread Safe version php-5.5.9-Win32-VC11-x86.zip for my server (Windows7HP + SP1 (x86)). It requires VC11. If you don’t have VC11 on your Windows, you must install vcredist_x__.exe before the PHP configuration.

   The php.ini-production has nothing changed.

   As the official PHP binary includes php5apache2_4.dll, I extract the zip archive and replace all PHP5.5.8 files with all PHP5.5.9 files except my php.ini. Then, I restart my Apache. That’s it.

   If you need how to configure PHP5.5, please see the post. It is for a mbstrings user, but the information gives some help for you.

Categories
translation

The translation “Seijō no Ran (青条の蘭)”-#5.

   Today, I’ve posted the second part of chapter 2, “Seijō no Ran (青条の蘭)”. The second part is very short.

   I have removed the kanjis from the translation “Seijō no Ran (青条の蘭)”, and about the explanations of them I wrote on my notes.

Categories
Windows

Updating to AWStats7.3.

同一記事の日本語版

   I updated AWStats from 7.2 to 7.3. See ChangeLog and current features. Wow!

  1. Downloaded awstats-7.3.zip for my server (Windows7HP + SP1 (x86)).
  2. Extracted the Zip archive.
  3. Replaced the old folders below by new ones. (Location:Drive_DC:awstatswwwroot)
         classes
         css
         icon
         js
  4. Replaced the old folders below by new ones. (Location:Drive_DC:awstatswwwrootcgi-bin)
         lang
         lib
         plugins
  5. Customize new awdownloadcsv.pl, awredir.pl and awstats.pl. (Location:Drive_DC:awstatswwwrootcgi-bin).
         #!/usr/bin/perl  —>  #!Drive_SV:/perl/bin/perl
    Replaced the old files by new ones.
  6. Use old awstats.MyDomain.com.conf as the new conf.

   If you install AWStats at the first time, see AWStats Installation, Configuration and Reporting.

   I use this opportunity to do the software blow up-to-date. Actually, about PERL I did on Dec.26. I forgot to write it. Now, I updated AWStats, which is a PERL scripts package. So, the information about it needs the PERL version. Right? (^_^;)

  • ActivePerl-5.16.3.1603 —> ActivePerl-5.18.1.1800
  • phpMyAdmin-4.1.0 —> phpMyAdmin-4.1.6
  • mariadb-5.5.34 —> mariadb-5.5.35
Categories
translation

The translation of “Hyōhaku (漂舶)”, Third Edition.

   I released the translation of “Hyōhaku (漂舶)”, Third Edition. This time, Delonix helped me so much again. We worked together from December 1 to January 27 about the third edition.

   From January 27 to today, I added a lot of explanations to the notes and removed all kanji characters from the Third Edition of Hyōhaku translation. I am very glad if the explanations on the notes will help you.

   I really appreciate Delonix’s help. We completed our mission. If the result makes you happy, which will make us happy. (^^)

   In addition, Delonix has a site on Flickr, and you can see beautiful flowers on it.