render.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. #
  3. # Copyright 2015 Google Inc. All Rights Reserved.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. HARFBUZZ=$HOME/harfbuzz
  17. FONTDIR=$(dirname $0)/../src/hinted
  18. input_file=$1
  19. function render {
  20. cat $input_file | $HARFBUZZ/util/hb-view --font-file=$1 --output-format=png --output-file=$2.png --font-size=200
  21. }
  22. render $FONTDIR/Roboto-Thin.ttf 100
  23. render $FONTDIR/Roboto-Light.ttf 300
  24. render $FONTDIR/Roboto-Regular.ttf 400
  25. render $FONTDIR/Roboto-Medium.ttf 500
  26. render $FONTDIR/Roboto-Bold.ttf 700
  27. render $FONTDIR/Roboto-Black.ttf 900
  28. render $FONTDIR/Roboto-ThinItalic.ttf i100
  29. render $FONTDIR/Roboto-LightItalic.ttf i300
  30. render $FONTDIR/Roboto-Italic.ttf i400
  31. render $FONTDIR/Roboto-MediumItalic.ttf i500
  32. render $FONTDIR/Roboto-BoldItalic.ttf i700
  33. render $FONTDIR/Roboto-BlackItalic.ttf i900
  34. render $FONTDIR/RobotoCondensed-Light.ttf c300
  35. render $FONTDIR/RobotoCondensed-Regular.ttf c400
  36. render $FONTDIR/RobotoCondensed-Bold.ttf c700
  37. render $FONTDIR/RobotoCondensed-LightItalic.ttf ci300
  38. render $FONTDIR/RobotoCondensed-Italic.ttf ci400
  39. render $FONTDIR/RobotoCondensed-BoldItalic.ttf ci700
  40. eog *.png