diff --git a/.gitignore b/.gitignore index 21f12e6..2db39ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,43 +1,33 @@ -# Ignore OS generated files # -.DS_Store* -ehthumbs.db -Icon? -Thumbs.db - -# Always-ignore files and folders # -*.diff -*.err +*.tar +*.tar.* +*.zip +*.tgz *.log -*.orig -*.rej -*.swn -*.swo -*.swp -._* -*~ - -# NPM & Bower -node_modules -bower_components -test -tests +*.log.* +*.sig +pkg/ +src/ -# FontForge *.sfd-* -*bak* +notes.txt +*-temp* sources/*.*tf -*temp* +*/bak/* fonts/unhinted/* fonts/eot/* fonts/svg/* .sass-cache/* +__pycache* +*.pyc + *backup/* *.sfd-* */unhinted/* *-temp* *-backup* *.bak +*-bak* # Package -BoonTook-v*.zip sfd/* +*-v*.zip diff --git a/fonts/otf/BoonTook-Italic.otf b/fonts/otf/BoonTook-Italic.otf new file mode 100644 index 0000000..10eaf54 Binary files /dev/null and b/fonts/otf/BoonTook-Italic.otf differ diff --git a/fonts/otf/BoonTook-Mon-Oblique.otf b/fonts/otf/BoonTook-Mon-Oblique.otf deleted file mode 100644 index d0453c4..0000000 Binary files a/fonts/otf/BoonTook-Mon-Oblique.otf and /dev/null differ diff --git a/fonts/otf/BoonTook-Mon.otf b/fonts/otf/BoonTook-Mon.otf deleted file mode 100644 index d6f927d..0000000 Binary files a/fonts/otf/BoonTook-Mon.otf and /dev/null differ diff --git a/fonts/otf/BoonTook-Oblique.otf b/fonts/otf/BoonTook-Oblique.otf deleted file mode 100644 index be06fa8..0000000 Binary files a/fonts/otf/BoonTook-Oblique.otf and /dev/null differ diff --git a/fonts/otf/BoonTook-Regular.otf b/fonts/otf/BoonTook-Regular.otf new file mode 100644 index 0000000..5de33f7 Binary files /dev/null and b/fonts/otf/BoonTook-Regular.otf differ diff --git a/fonts/otf/BoonTook.otf b/fonts/otf/BoonTook.otf deleted file mode 100644 index fe74071..0000000 Binary files a/fonts/otf/BoonTook.otf and /dev/null differ diff --git a/fonts/otf/BoonTookMon-Italic.otf b/fonts/otf/BoonTookMon-Italic.otf new file mode 100644 index 0000000..786da07 Binary files /dev/null and b/fonts/otf/BoonTookMon-Italic.otf differ diff --git a/fonts/otf/BoonTookMon-Regular.otf b/fonts/otf/BoonTookMon-Regular.otf new file mode 100644 index 0000000..2595ce1 Binary files /dev/null and b/fonts/otf/BoonTookMon-Regular.otf differ diff --git a/fonts/otf/OFL.txt b/fonts/otf/OFL.txt new file mode 100644 index 0000000..0ea1bff --- /dev/null +++ b/fonts/otf/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2014-2015, Sungsit Sawaiwan (https://fontuni.com | uni@fontuni.com). + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/fonts/ttf/BoonTook-Italic.ttf b/fonts/ttf/BoonTook-Italic.ttf new file mode 100644 index 0000000..b859142 Binary files /dev/null and b/fonts/ttf/BoonTook-Italic.ttf differ diff --git a/fonts/ttf/BoonTook-Mon-Oblique.ttf b/fonts/ttf/BoonTook-Mon-Oblique.ttf deleted file mode 100644 index d9feb38..0000000 Binary files a/fonts/ttf/BoonTook-Mon-Oblique.ttf and /dev/null differ diff --git a/fonts/ttf/BoonTook-Mon.ttf b/fonts/ttf/BoonTook-Mon.ttf deleted file mode 100644 index ceb61dc..0000000 Binary files a/fonts/ttf/BoonTook-Mon.ttf and /dev/null differ diff --git a/fonts/ttf/BoonTook-Oblique.ttf b/fonts/ttf/BoonTook-Oblique.ttf deleted file mode 100644 index 440bfd4..0000000 Binary files a/fonts/ttf/BoonTook-Oblique.ttf and /dev/null differ diff --git a/fonts/ttf/BoonTook-Regular.ttf b/fonts/ttf/BoonTook-Regular.ttf new file mode 100644 index 0000000..3c358a1 Binary files /dev/null and b/fonts/ttf/BoonTook-Regular.ttf differ diff --git a/fonts/ttf/BoonTook.ttf b/fonts/ttf/BoonTook.ttf deleted file mode 100644 index 2a2fbf1..0000000 Binary files a/fonts/ttf/BoonTook.ttf and /dev/null differ diff --git a/fonts/ttf/BoonTookMon-Italic.ttf b/fonts/ttf/BoonTookMon-Italic.ttf new file mode 100644 index 0000000..ca8f9c1 Binary files /dev/null and b/fonts/ttf/BoonTookMon-Italic.ttf differ diff --git a/fonts/ttf/BoonTookMon-Regular.ttf b/fonts/ttf/BoonTookMon-Regular.ttf new file mode 100644 index 0000000..db072e9 Binary files /dev/null and b/fonts/ttf/BoonTookMon-Regular.ttf differ diff --git a/fonts/ttf/OFL.txt b/fonts/ttf/OFL.txt new file mode 100644 index 0000000..0ea1bff --- /dev/null +++ b/fonts/ttf/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2014-2015, Sungsit Sawaiwan (https://fontuni.com | uni@fontuni.com). + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/fonts/woff-otf/BoonTook-Italic.woff b/fonts/woff-otf/BoonTook-Italic.woff new file mode 100644 index 0000000..248d5ab Binary files /dev/null and b/fonts/woff-otf/BoonTook-Italic.woff differ diff --git a/fonts/woff-otf/BoonTook-Regular.woff b/fonts/woff-otf/BoonTook-Regular.woff new file mode 100644 index 0000000..b414c72 Binary files /dev/null and b/fonts/woff-otf/BoonTook-Regular.woff differ diff --git a/fonts/woff-otf/BoonTookMon-Italic.woff b/fonts/woff-otf/BoonTookMon-Italic.woff new file mode 100644 index 0000000..f83d79b Binary files /dev/null and b/fonts/woff-otf/BoonTookMon-Italic.woff differ diff --git a/fonts/woff-otf/BoonTookMon-Regular.woff b/fonts/woff-otf/BoonTookMon-Regular.woff new file mode 100644 index 0000000..89e9e7b Binary files /dev/null and b/fonts/woff-otf/BoonTookMon-Regular.woff differ diff --git a/fonts/woff-otf/OFL.txt b/fonts/woff-otf/OFL.txt new file mode 100644 index 0000000..0ea1bff --- /dev/null +++ b/fonts/woff-otf/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2014-2015, Sungsit Sawaiwan (https://fontuni.com | uni@fontuni.com). + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/fonts/woff-ttf/BoonTook-Italic.woff b/fonts/woff-ttf/BoonTook-Italic.woff new file mode 100644 index 0000000..af3d60a Binary files /dev/null and b/fonts/woff-ttf/BoonTook-Italic.woff differ diff --git a/fonts/woff-ttf/BoonTook-Regular.woff b/fonts/woff-ttf/BoonTook-Regular.woff new file mode 100644 index 0000000..18ff40b Binary files /dev/null and b/fonts/woff-ttf/BoonTook-Regular.woff differ diff --git a/fonts/woff-ttf/BoonTookMon-Italic.woff b/fonts/woff-ttf/BoonTookMon-Italic.woff new file mode 100644 index 0000000..b93ff08 Binary files /dev/null and b/fonts/woff-ttf/BoonTookMon-Italic.woff differ diff --git a/fonts/woff-ttf/BoonTookMon-Regular.woff b/fonts/woff-ttf/BoonTookMon-Regular.woff new file mode 100644 index 0000000..b501ecd Binary files /dev/null and b/fonts/woff-ttf/BoonTookMon-Regular.woff differ diff --git a/fonts/woff-ttf/OFL.txt b/fonts/woff-ttf/OFL.txt new file mode 100644 index 0000000..0ea1bff --- /dev/null +++ b/fonts/woff-ttf/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2014-2015, Sungsit Sawaiwan (https://fontuni.com | uni@fontuni.com). + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/fonts/woff/BoonTook-Mon-Oblique.woff b/fonts/woff/BoonTook-Mon-Oblique.woff deleted file mode 100644 index 81ec232..0000000 Binary files a/fonts/woff/BoonTook-Mon-Oblique.woff and /dev/null differ diff --git a/fonts/woff/BoonTook-Mon.woff b/fonts/woff/BoonTook-Mon.woff deleted file mode 100644 index 2176244..0000000 Binary files a/fonts/woff/BoonTook-Mon.woff and /dev/null differ diff --git a/fonts/woff/BoonTook-Oblique.woff b/fonts/woff/BoonTook-Oblique.woff deleted file mode 100644 index ccdab43..0000000 Binary files a/fonts/woff/BoonTook-Oblique.woff and /dev/null differ diff --git a/fonts/woff/BoonTook.woff b/fonts/woff/BoonTook.woff deleted file mode 100644 index d76810f..0000000 Binary files a/fonts/woff/BoonTook.woff and /dev/null differ diff --git a/fonts/woff2-otf/BoonTook-Italic.woff2 b/fonts/woff2-otf/BoonTook-Italic.woff2 new file mode 100644 index 0000000..07a681c Binary files /dev/null and b/fonts/woff2-otf/BoonTook-Italic.woff2 differ diff --git a/fonts/woff2-otf/BoonTook-Regular.woff2 b/fonts/woff2-otf/BoonTook-Regular.woff2 new file mode 100644 index 0000000..d383548 Binary files /dev/null and b/fonts/woff2-otf/BoonTook-Regular.woff2 differ diff --git a/fonts/woff2-otf/BoonTookMon-Italic.woff2 b/fonts/woff2-otf/BoonTookMon-Italic.woff2 new file mode 100644 index 0000000..edfb24b Binary files /dev/null and b/fonts/woff2-otf/BoonTookMon-Italic.woff2 differ diff --git a/fonts/woff2-otf/BoonTookMon-Regular.woff2 b/fonts/woff2-otf/BoonTookMon-Regular.woff2 new file mode 100644 index 0000000..673853b Binary files /dev/null and b/fonts/woff2-otf/BoonTookMon-Regular.woff2 differ diff --git a/fonts/woff2-otf/OFL.txt b/fonts/woff2-otf/OFL.txt new file mode 100644 index 0000000..0ea1bff --- /dev/null +++ b/fonts/woff2-otf/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2014-2015, Sungsit Sawaiwan (https://fontuni.com | uni@fontuni.com). + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/fonts/woff2-ttf/BoonTook-Italic.woff2 b/fonts/woff2-ttf/BoonTook-Italic.woff2 new file mode 100644 index 0000000..27feaa6 Binary files /dev/null and b/fonts/woff2-ttf/BoonTook-Italic.woff2 differ diff --git a/fonts/woff2-ttf/BoonTook-Regular.woff2 b/fonts/woff2-ttf/BoonTook-Regular.woff2 new file mode 100644 index 0000000..1a2b316 Binary files /dev/null and b/fonts/woff2-ttf/BoonTook-Regular.woff2 differ diff --git a/fonts/woff2-ttf/BoonTookMon-Italic.woff2 b/fonts/woff2-ttf/BoonTookMon-Italic.woff2 new file mode 100644 index 0000000..47dd9f8 Binary files /dev/null and b/fonts/woff2-ttf/BoonTookMon-Italic.woff2 differ diff --git a/fonts/woff2-ttf/BoonTookMon-Regular.woff2 b/fonts/woff2-ttf/BoonTookMon-Regular.woff2 new file mode 100644 index 0000000..645ae6f Binary files /dev/null and b/fonts/woff2-ttf/BoonTookMon-Regular.woff2 differ diff --git a/fonts/woff2-ttf/OFL.txt b/fonts/woff2-ttf/OFL.txt new file mode 100644 index 0000000..0ea1bff --- /dev/null +++ b/fonts/woff2-ttf/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2014-2015, Sungsit Sawaiwan (https://fontuni.com | uni@fontuni.com). + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/fonts/woff2/BoonTook-Mon-Oblique.woff2 b/fonts/woff2/BoonTook-Mon-Oblique.woff2 deleted file mode 100644 index 2dbb941..0000000 Binary files a/fonts/woff2/BoonTook-Mon-Oblique.woff2 and /dev/null differ diff --git a/fonts/woff2/BoonTook-Mon.woff2 b/fonts/woff2/BoonTook-Mon.woff2 deleted file mode 100644 index 34a9593..0000000 Binary files a/fonts/woff2/BoonTook-Mon.woff2 and /dev/null differ diff --git a/fonts/woff2/BoonTook-Oblique.woff2 b/fonts/woff2/BoonTook-Oblique.woff2 deleted file mode 100644 index 4b70fce..0000000 Binary files a/fonts/woff2/BoonTook-Oblique.woff2 and /dev/null differ diff --git a/fonts/woff2/BoonTook.woff2 b/fonts/woff2/BoonTook.woff2 deleted file mode 100644 index c5a442f..0000000 Binary files a/fonts/woff2/BoonTook.woff2 and /dev/null differ diff --git a/scripts/build.py b/scripts/build.py index 911ad5c..5c67c49 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -1,13 +1,14 @@ #!/usr/bin/env fontforge # -# Copyright (c) 2015, Sungsit Sawaiwan (https://sungsit.com | gibbozer [at] gmail [dot] com). +# Copyright (c) 2016, Sungsit Sawaiwan (https://sungsit.com | gibbozer [at] gmail [dot] com). # # This Font Software is licensed under the SIL Open Font License, Version 1.1 (OFL). # You should have received a copy of the OFL License along with this file. # If not, see http://scripts.sil.org/OFL # -# This script will only work with FontForge's Python extension. +# This script will create font instances from SFD files +# and it will only work with FontForge's Python extension. import fontforge import os import subprocess @@ -16,166 +17,14 @@ import datetime import glob -# Predifined vars -foundry = 'FontUni' -family = 'BoonTook' -version = '2.0.1' -weights = [950] -sources = ['sources/boontook-roman.sfd','sources/boontook-oblique.sfd'] -layers = ['Normal', 'Mon'] -copyright = 'Copyright 2014-2015, Sungsit Sawaiwan (https://fontuni.com | uni@fontuni.com). This Font Software is licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL).' -features = ['boontook-roman', 'boontook-oblique'] -feature_dir = 'sources/' - -build_dir = 'fonts/' -if os.path.exists(build_dir): - shutil.rmtree(build_dir) - -sfd_dir = 'sfd/' -if os.path.exists(sfd_dir): - shutil.rmtree(sfd_dir) +# SFD building process +import buildsfd +from buildsfd import * unhinted_dir = build_dir + 'unhinted/' if not os.path.exists(unhinted_dir): os.makedirs(unhinted_dir) -def fontPath(ext,name): - path = build_dir + ext - if not os.path.exists(path): - os.makedirs(path) - fontfile = path + '/' + name + '.' + ext - return fontfile - -def printFontInfo(fontfile): - font = fontforge.open(fontfile) - print('\nFont File: ' + fontfile) - print('Family Name: ' + font.familyname) - print('Font Name: ' + font.fontname) - print('Full Name: ' + font.fullname) - print('Font Weight: ' + font.weight) - print('OS2 Weight: ' + str(font.os2_weight)) - print('Oblique Angle: ' + str(font.italicangle)) - print('Font Version: ' + font.version) - print('Font Copyright: ' + font.copyright) - font.close() - -def otf2Sfd(otf,sfd_dir): - - font = fontforge.open(otf) - sfd = sfd_dir + font.fontname + '.sfd' - if not os.path.exists(sfd_dir): - os.makedirs(sfd_dir) - - font.appendSFNTName('English (US)', 'UniqueID', '') - - weight = font.os2_weight - font.private['BlueValues'] = (-20, 0, 600, 620, 840, 860) - font.private['OtherBlues'] = (-260, -240) - font.private['BlueShift'] = 0, - font.private['StdHW'] = 180, - font.private['StdVW'] = 280, - font.private['StemSnapH'] = (90, 120, 140, 150, 180, 200, 210, 240) - font.private['StemSnapV'] = (270, 280) - font.selection.all() - font.autoHint() - font.save(sfd) - font.private.guess('StemSnapH') - font.private.guess('StemSnapV') - font.private.guess('BlueShift') - font.selection.all() - font.autoHint() - font.save(sfd) - print(sfd, 'file saved.') - font.close() - -def buildSFD(source,family): - - # prepare master - font = fontforge.open(source) - font.familyname = family - font.fontname = font.familyname.replace(' ','-') - font.fullname = font.fontname.replace('-',' ') - font.appendSFNTName('English (US)', 'Manufacturer', foundry) - font.appendSFNTName('English (US)', 'Preferred Family', family) - font.os2_weight = 400 - style = 'Ultra' - font.version = version - font.copyright = copyright - font.save() - - if source.endswith('-roman.sfd'): - font.italicangle = 0.0 - font.mergeFeature(feature_dir + features[0] + '.fea') - - if source.endswith('-oblique.sfd'): - font.italicangle = -9.0 - font.mergeFeature(feature_dir + features[1] + '.fea') - - # loop through each layer & save it as sfd files - # then generate ttf, autohint & make woff + woff2 - for layer in layers: - - if layer.startswith('Mon'): - font.familyname = family + ' Mon' - font.fontname = font.familyname.replace(' ','-') - font.fullname = font.fontname.replace('-',' ') - style = 'Mon Ultra' - font.appendSFNTName('English (US)', 'Preferred Family', family + ' Mon') - font.appendSFNTName('English (US)', 'SubFamily', '') - font.appendSFNTName('English (US)', 'SubFamily', 'Regular') - font.appendSFNTName('English (US)', 'Preferred Styles', style) - font.appendSFNTName('English (US)', 'Compatible Full', family) - - if source.endswith('-oblique.sfd'): - font.appendSFNTName('English (US)', 'SubFamily', '') - font.appendSFNTName('English (US)', 'SubFamily', 'Oblique') - font.appendSFNTName('English (US)', 'Preferred Styles', style + ' Oblique') - font.fontname += '-Oblique' - font.fullname += ' Oblique' - - else: - font.fontname = font.familyname.replace(' ','-') - font.fullname = font.fontname.replace('-',' ') - font.appendSFNTName('English (US)', 'SubFamily', '') - font.appendSFNTName('English (US)', 'SubFamily', 'Regular') - font.appendSFNTName('English (US)', 'Preferred Styles', style) - font.appendSFNTName('English (US)', 'Compatible Full', family + ' Mon') - - if source.endswith('-oblique.sfd'): - font.appendSFNTName('English (US)', 'SubFamily', '') - font.appendSFNTName('English (US)', 'SubFamily', 'Oblique') - font.appendSFNTName('English (US)', 'Preferred Styles', style + ' Oblique') - font.fontname += '-Oblique' - font.fullname += ' Oblique' - - # UniqueID with timestamp - ts = datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S') - uniqueid = foundry + ' : ' + font.fullname + ' ' + version + ' : ' + ts - font.appendSFNTName('English (US)', 'UniqueID', uniqueid) - - otf = fontPath('otf',font.fontname) - ttf = fontPath('ttf',font.fontname) - woff = fontPath('woff',font.fontname) - woff2 = fontPath('woff2',font.fontname) - tempwoff2 = build_dir + 'ttf/' + font.fontname + '.woff2' - - # generate otf - otfgenflags = ('opentype', 'PfEd-lookups') - font.generate(otf, flags=otfgenflags, layer = layer) - print(font.fullname, 'OTF instance generated.') - - # save sfd - otf2Sfd(otf,sfd_dir) - - font.close() - -for source in sources: - buildSFD(source,family) - -# Generate & hint SFD files - -exts = ['otf', 'ttf', 'woff', 'woff2', 'eot', 'svg'] - def otfHint(unhinted,hinted): subprocess.call([ 'autohint', @@ -189,13 +38,10 @@ def otfHint(unhinted,hinted): def ttfHint(unhinted,hinted): subprocess.call([ 'ttfautohint', - '--default-script=latn', - '--fallback-script=thai', - '--strong-stem-width=G', - '--hinting-range-min=7', - '--hinting-range-max=28', - '--hinting-limit=50', - '--increase-x-height=13', + '--default-script=thai', + '--fallback-script=lao', + #'--hinting-range-min=9', + #'--hinting-range-max=18', '--no-info', '--verbose', unhinted, @@ -221,19 +67,21 @@ def fontOptimize(fontfile): print(fontfile, 'optimized.') # http://wizard.ae.krakow.pl/~jb/ttf2woff/ -def ttf2Woff(ttf,woff): - subprocess.call([ 'ttf2woff', '-v', ttf, woff ]) +def font2Woff(font,woff): + subprocess.call([ 'ttf2woff', '-v', font, woff ]) print(woff, 'instance generated.') -def ttf2Woff2(ttf,woff2): - subprocess.call(['woff2_compress',ttf]) - (root, ext) = os.path.splitext(ttf) +# https://github.com/google/woff2 +def font2Woff2(font,woff2): + subprocess.call(['woff2_compress',font]) + (root, ext) = os.path.splitext(font) os.rename(root + '.woff2', woff2) print(woff2, 'instance generated.') -def ttf2Eot(ttf,eot): - os.system('ttf2eot <' + ttf + '>' + eot) - print(eot, 'instance generated.') +# https://code.google.com/archive/p/ttf2eot/ +#def font2Eot(font,eot): +# os.system('ttf2eot <' + font+ '>' + eot) +# print(eot, 'instance generated.') def buildFont(sfd): font = fontforge.open(sfd) @@ -243,66 +91,77 @@ def buildFont(sfd): uniqueid = foundry + ' : ' + font.fullname + ' ' + font.version + ' : ' + ts font.appendSFNTName('English (US)', 'UniqueID', uniqueid) - otf = fontPath('otf',font.fontname) - ttf = fontPath('ttf',font.fontname) - woff = fontPath('woff',font.fontname) - woff2 = fontPath('woff2',font.fontname) - eot = fontPath('eot',font.fontname) - svg = fontPath('svg',font.fontname) - tempwoff2 = build_dir + 'ttf/' + font.fontname + '.woff2' + # Correct Italic name + if font.os2_weight == 400: + genname = font.fontname + else: + genname = font.fontname.replace('-Italic','Italic') + + otf = fontPath('otf','otf',genname) + ttf = fontPath('ttf','ttf',genname) + woffTtf = fontPath('woff-ttf','woff',genname) + woffOtf = fontPath('woff-otf','woff',genname) + woff2Ttf = fontPath('woff2-ttf','woff2',genname) + woff2Otf = fontPath('woff2-otf','woff2',genname) + #eotTtf = fontPath('eot-ttf','eot',font.fontname) + #eotOtf = fontPath('eot-otf','eot',font.fontname) + #svg = fontPath('svg','svg',font.fontname) + tempwoff2Ttf = build_dir + 'ttf/' + genname + '.woff2' + tempwoff2Otf = build_dir + 'otf/' + genname + '.woff2' # generate otf otfgenflags = ('opentype', 'PfEd-lookups') - otfunhinted = unhinted_dir + font.fontname + '-unhinted.otf' + otfunhinted = unhinted_dir + genname + '-unhinted.otf' font.generate(otfunhinted, flags=otfgenflags) print(otfunhinted, 'instance generated.') # AFDKO autohint otfHint(otfunhinted,otf) - fontOptimize(otf) + #fontOptimize(otf) printFontInfo(otf) # generate unhinted ttf ttfgenflags = ('opentype', 'no-hints') - ttfunhinted = unhinted_dir + font.fontname + '-unhinted.ttf' + ttfunhinted = unhinted_dir + genname + '-unhinted.ttf' font.generate(ttfunhinted, flags=ttfgenflags) print(ttfunhinted, 'instance generated.') # ttfautohint ttfHint(ttfunhinted,ttf) - fontOptimize(ttf) + #fontOptimize(ttf) printFontInfo(ttf) - # ttf2woff - ttf2Woff(ttf,woff) + # font2woff + font2Woff(otf,woffOtf) + font2Woff(ttf,woffTtf) - # ttf2woff2 - ttf2Woff2(ttf,woff2) + # font2woff2 + font2Woff2(otf,woff2Otf) + font2Woff2(ttf,woff2Ttf) - # ttf2eot - ttf2Eot(ttf,eot) + # font2eot + #font2Eot(otf,eotOtf) + #font2Eot(ttf,eotTtf) # gen svg - font.generate(svg, flags=otfgenflags) - print(svg, 'instance generated.') + #font.generate(svg, flags=otfgenflags) + #print(svg, 'instance generated.') font.close() for sfd in sorted(glob.glob('./sfd/*.sfd')): buildFont(sfd) -# Create zip package for each font extension -def fontZip(family,version,ext): - path = build_dir + ext + '/' - package = family + '-v' + version + '-' + ext + '.zip' +# Create zip package for each font pathension +def fontZip(family,version,pkg): + path = build_dir + pkg + '/' + package = family + '-v' + version + '-' + pkg + '.zip' shutil.copy2('OFL.txt', path) os.chdir(build_dir) - subprocess.call(['zip', '-r', package, ext]) - os.remove(ext + '/OFL.txt') + subprocess.call(['zip', '-r', package, pkg]) os.chdir('..') print(package, 'created.') -exts = ['otf', 'ttf', 'woff', 'woff2', 'eot', 'svg'] +for pkg in pkgs: + fontZip(family,version,pkg) -for ext in exts: - fontZip(family,version,ext) diff --git a/scripts/build-css.sh b/scripts/buildcss.sh similarity index 100% rename from scripts/build-css.sh rename to scripts/buildcss.sh diff --git a/scripts/buildsfd.py b/scripts/buildsfd.py new file mode 100755 index 0000000..4871a44 --- /dev/null +++ b/scripts/buildsfd.py @@ -0,0 +1,200 @@ +#!/usr/bin/env fontforge +# +# Copyright (c) 2016, Sungsit Sawaiwan (https://sungsit.com | gibbozer [at] gmail [dot] com). +# +# This Font Software is licensed under the SIL Open Font License, Version 1.1 (OFL). +# You should have received a copy of the OFL License along with this file. +# If not, see http://scripts.sil.org/OFL +# + +# This script will create SFD files from multi-layers source to prepare for later build process +# and it will only work with FontForge's Python extension. +import fontforge +import os +import subprocess +import shutil +import time +import datetime + +# Predifined vars +import fontvars +from fontvars import * + +# Helpers +def fontPath(path,ext,name): + path = build_dir + path + if not os.path.exists(path): + os.makedirs(path) + fontfile = path + '/' + name + '.' + ext + return fontfile + +def printFontInfo(fontfile): + font = fontforge.open(fontfile) + print('\nFont File: ' + fontfile) + print('Family Name: ' + font.familyname) + print('Font Name: ' + font.fontname) + print('Full Name: ' + font.fullname) + print('Font Weight: ' + font.weight) + print('OS2 Weight: ' + str(font.os2_weight)) + print('Italic Angle: ' + str(font.italicangle)) + print('Font Version: ' + font.version) + print('Font Copyright: ' + font.copyright) + font.close() + +# Helpers +def weights2Strings(weight): + switcher = { + 100: "Thin", + 200: "ExtraLight", + 300: "Light", + 400: "Regular", + 500: "Medium", + 600: "SemiBold", + 700: "Bold", + 800: "ExtraBold", + 900: "Black" + } + return switcher.get(weight) + +# Microsoft compat +def msFamilyName(weight): + switcher = { + 100: family + " Thin", + 200: family + " ExtraLight", + 300: family + " Light", + 400: family, + 500: family + " Medium", + 600: family + " SemiBold", + 700: family, + 800: family + " ExtraBold", + 900: family + " Black" + } + return switcher.get(weight, family) + +def msStyleName(weight): + switcher = { + 100: "Regular", + 200: "Regular", + 300: "Regular", + 400: "Regular", + 500: "Regular", + 600: "Regular", + 700: "Bold", + 800: "Regular", + 900: "Regular" + } + return switcher.get(weight) + +def msStyleItalicName(weight): + switcher = { + 100: "Italic", + 200: "Italic", + 300: "Italic", + 400: "Italic", + 500: "Italic", + 600: "Italic", + 700: "Bold Italic", + 800: "Italic", + 900: "Italic" + } + return switcher.get(weight) + +def otf2Sfd(otf,sfd_dir): + + font = fontforge.open(otf) + sfd = sfd_dir + font.fontname + '.sfd' + if not os.path.exists(sfd_dir): + os.makedirs(sfd_dir) + + # Reset UniqueID + font.appendSFNTName('English (US)', 'UniqueID', '') + + weight = font.os2_weight + + font.private['BlueValues'] = BlueValues(weight) + font.private['OtherBlues'] = OtherBlues(weight) + font.private['StdHW'] = StdHW(weight) + font.private['StdVW'] = StdHW(weight) + font.selection.all() + font.autoHint() + font.save(sfd) + font.private.guess('StdHW') + font.private.guess('StdVW') + font.private.guess('StemSnapH') + font.private.guess('StemSnapV') + font.selection.all() + font.autoHint() + font.save(sfd) + + print(sfd, 'file saved.') + font.close() + +def buildSFD(source,family): + + font = fontforge.open(source) + + # prepare master + font.familyname = family + font.version = version + font.copyright = copyright + font.os2_vendor = os2_vendor + font.appendSFNTName('English (US)', 'Manufacturer', foundry) + font.appendSFNTName('English (US)', 'Designer', designer) + font.appendSFNTName('English (US)', 'Vendor URL', foundry_url) + font.appendSFNTName('English (US)', 'Designer URL', designer_url) + font.appendSFNTName('English (US)', 'License URL', license_url) + font.appendSFNTName('English (US)', 'Preferred Family', family) + + font.save() + + if source == sources[1]: + font.mergeFeature(feature_dir + features[1] + '.fea') + else: + font.mergeFeature(feature_dir + features[0] + '.fea') + + # loop through each layer & save it as sfd files + for layer in layers: + + layername = font.layers[layer].name + font.familyname = layername + font.appendSFNTName('English (US)', 'Preferred Family', layername) + + # Roman style + if source == sources[0]: + font.italicangle = 0.0 + font.fullname = layername + ' Regular' + font.fontname = layername.replace(' ','') + '-Regular' + font.appendSFNTName('English (US)', 'Preferred Styles', 'Regular') + font.appendSFNTName('English (US)', 'SubFamily', 'Regular') + font.os2_stylemap = 64 # 0x0040 + + # Italic style + if source == sources[1]: + font.italicangle = -9.0 + font.fullname = layername + ' Italic' + font.fontname = layername.replace(' ','') + '-Italic' + font.appendSFNTName('English (US)', 'Preferred Styles', 'Italic') + font.appendSFNTName('English (US)', 'SubFamily', 'Italic') + font.os2_stylemap = 1 # 0x0001 + + # generate otf + if font.os2_weight == 400: + genname = layername.replace(' ','') + else: + genname = layername.replace(' ','-').replace('-Italic','Italic') + + otf = fontPath('otf','otf',genname) + + otfgenflags = ('opentype', 'PfEd-lookups') + font.generate(otf, flags=otfgenflags, layer = layername) + print(otf, 'instance generated.') + + # save sfd + otf2Sfd(otf,sfd_dir) + + font.close() + shutil.rmtree(build_dir) + +for source in sources: + buildSFD(source,family) + diff --git a/scripts/fontvars.py b/scripts/fontvars.py new file mode 100755 index 0000000..2f5acbd --- /dev/null +++ b/scripts/fontvars.py @@ -0,0 +1,72 @@ +#!/usr/bin/env fontforge +# +# Copyright (c) 2017, Sungsit Sawaiwan (https://sungsit.com | gibbozer [at] gmail [dot] com). +# +# This Font Software is licensed under the SIL Open Font License, Version 1.1 (OFL). +# You should have received a copy of the OFL License along with this file. +# If not, see http://scripts.sil.org/OFL +# + +# This script will create SFD files from multi-layers source to prepare for later build process +# and it will only work with FontForge's Python extension. +import fontforge +import os +import subprocess +import shutil +import time +import datetime + +# Font props +family = 'BoonTook' +version = '3.0' +foundry = 'FontUni' +os2_vendor = 'FUni' +foundry_url = 'https://fontuni.com/' +designer = 'Sungsit Sawaiwan' +designer_url = 'https://sungsit.com/' +license_url = 'http://scripts.sil.org/OFL' +copyright = 'Copyright 2014-2017, Sungsit Sawaiwan (https://fontuni.com | uni@fontuni.com). This Font Software is licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL).' + +# Building sources +feature_dir = 'sources/' +sources = ['sources/boontook-roman.sfd','sources/boontook-oblique.sfd'] +features = ['boontook-roman', 'boontook-oblique'] +layers = ['BoonTook', 'BoonTook Mon'] + +# Dir names +build_dir = 'fonts/' +if os.path.exists(build_dir): + shutil.rmtree(build_dir) + +sfd_dir = 'sfd/' +if os.path.exists(sfd_dir): + shutil.rmtree(sfd_dir) + +# Release packages +pkgs = ['otf', 'ttf', 'woff-otf', 'woff-ttf', 'woff2-otf', 'woff2-ttf'] + +# PS private values +def BlueValues(weight): + switcher = { + 400: (-20, 0, 600, 620, 840, 860) + } + return switcher.get(weight) + +def OtherBlues(weight): + switcher = { + 400: (-260, -240) + } + return switcher.get(weight) + +def StdHW(weight): + switcher = { + 400: (180,) + } + return switcher.get(weight) + +def StdVW(weight): + switcher = { + 400: (280,) + } + return switcher.get(weight) + diff --git a/sources/boontook-oblique.sfd b/sources/boontook-oblique.sfd index bc05992..3745d9a 100644 --- a/sources/boontook-oblique.sfd +++ b/sources/boontook-oblique.sfd @@ -1,10 +1,10 @@ SplineFontDB: 3.0 -FontName: BoonTook -FullName: BoonTook +FontName: BoonTook-Italic +FullName: BoonTook Italic FamilyName: BoonTook -Weight: Ultra -Copyright: Copyright 2014-2015, Sungsit Sawaiwan (https://fontuni.com | uni@fontuni.com). This Font Software is licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL). -Version: 2.0.1 +Weight: 400 +Copyright: Copyright 2014-2017, Sungsit Sawaiwan (https://fontuni.com | uni@fontuni.com). This Font Software is licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL). +Version: 3.0 ItalicAngle: 0 UnderlinePosition: -60 UnderlineWidth: 30 @@ -16,14 +16,15 @@ woffMinor: 0 LayerCount: 4 Layer: 0 0 "Back" 1 Layer: 1 0 "Fore" 0 -Layer: 2 0 "Normal" 0 -Layer: 3 0 "Mon" 0 +Layer: 2 0 "BoonTook" 0 +Layer: 3 0 "BoonTook Mon" 0 +StyleMap: 0x0001 FSType: 8 OS2Version: 0 OS2_WeightWidthSlopeOnly: 0 OS2_UseTypoMetrics: 0 CreationTime: 1394017292 -ModificationTime: 1445984690 +ModificationTime: 1486219714 PfmFamily: 33 TTFWeight: 400 TTFWidth: 5 @@ -48,8 +49,7 @@ OS2FamilyClass: 2048 OS2Vendor: 'FUni' MarkAttachClasses: 1 DEI: 91125 -LangName: 1054 "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "+Dh4ONQ5IDhsOSw4zDg4OOQ4ZDjkOSw4ZDkkOMw5ADhsOSA4yDh0OOA5IDhkOKw4NDjkOSA4BDkkOGQ4bDjUOSAAA +DhAOMg4VDjgOTQAA +Dg0OMg4VDjQOTQAA +DhsOOA5NDhsONA5N" -LangName: 1033 "" "" "" "" "" "" "" "" "FontUni" "Sungsit Sawaiwan" "" "https://fontuni.com" "https://sungsit.com" "This Font Software is licensed under the SIL Open Font License, Version 1.1." "http://scripts.sil.org/OFL" "" "BoonTook" "" "BoonTook" +LangName: 1033 "" "" "" "" "" "" "" "" "FontUni" "Sungsit Sawaiwan" "" "https://fontuni.com/" "https://sungsit.com/" "This Font Software is licensed under the SIL Open Font License, Version 1.1." "http://scripts.sil.org/OFL" "" "BoonTook" GaspTable: 3 12 14 24 7 65535 15 1 Encoding: Custom UnicodeInterp: none diff --git a/sources/boontook-roman.sfd b/sources/boontook-roman.sfd index 4c290c4..45336f5 100644 --- a/sources/boontook-roman.sfd +++ b/sources/boontook-roman.sfd @@ -1,10 +1,10 @@ SplineFontDB: 3.0 -FontName: BoonTook -FullName: BoonTook +FontName: BoonTook-Regular +FullName: BoonTook Regular FamilyName: BoonTook -Weight: Ultra -Copyright: Copyright 2014-2015, Sungsit Sawaiwan (https://fontuni.com | uni@fontuni.com). This Font Software is licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL). -Version: 2.0.1 +Weight: 400 +Copyright: Copyright 2014-2017, Sungsit Sawaiwan (https://fontuni.com | uni@fontuni.com). This Font Software is licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL). +Version: 3.0 ItalicAngle: 0 UnderlinePosition: -60 UnderlineWidth: 30 @@ -16,14 +16,15 @@ woffMinor: 0 LayerCount: 4 Layer: 0 0 "Back" 1 Layer: 1 0 "Fore" 0 -Layer: 2 0 "Normal" 0 -Layer: 3 0 "Mon" 0 +Layer: 2 0 "BoonTook" 0 +Layer: 3 0 "BoonTook Mon" 0 +StyleMap: 0x0040 FSType: 8 OS2Version: 0 OS2_WeightWidthSlopeOnly: 0 OS2_UseTypoMetrics: 0 CreationTime: 1394017292 -ModificationTime: 1445984549 +ModificationTime: 1486219700 PfmFamily: 33 TTFWeight: 400 TTFWidth: 5 @@ -48,8 +49,7 @@ OS2FamilyClass: 2048 OS2Vendor: 'FUni' MarkAttachClasses: 1 DEI: 91125 -LangName: 1054 "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "+Dh4ONQ5IDhsOSw4zDg4OOQ4ZDjkOSw4ZDkkOMw5ADhsOSA4yDh0OOA5IDhkOKw4NDjkOSA4BDkkOGQ4bDjUOSAAA +DhAOMg4VDjgOTQAA +Dg0OMg4VDjQOTQAA +DhsOOA5NDhsONA5N" -LangName: 1033 "" "" "" "" "" "" "" "" "FontUni" "Sungsit Sawaiwan" "" "https://fontuni.com" "https://sungsit.com" "This Font Software is licensed under the SIL Open Font License, Version 1.1." "http://scripts.sil.org/OFL" "" "BoonTook" "" "BoonTook" +LangName: 1033 "" "" "" "" "" "" "" "" "FontUni" "Sungsit Sawaiwan" "" "https://fontuni.com/" "https://sungsit.com/" "This Font Software is licensed under the SIL Open Font License, Version 1.1." "http://scripts.sil.org/OFL" "" "BoonTook" GaspTable: 3 12 14 24 7 65535 15 1 Encoding: Custom UnicodeInterp: none @@ -58,7 +58,7 @@ DisplaySize: -48 DisplayLayer: 2 AntiAlias: 1 FitToEm: 0 -WinInfo: 666 18 8 +WinInfo: 360 18 8 BeginPrivate: 0 EndPrivate TeXData: 1 0 0 346030 173015 115343 0 1048576 115343 783286 444596 497025 792723 393216 433062 380633 303038 157286 324010 404750 52429 2506097 1059062 262144