simply move all font files at setup
19299
function(config, extras, callback) {

    // load all files in the source folder
    vfs.src(config.fonts.files)

      // vinyl-fs dest automatically determines whether a file
      // should be updated or not, based on the mtime timestamp.
      // so we don't need to do that manually.
      .pipe(vfs.dest(path.join(extras.destination, config.fonts.destination)))
      .on('finish', function() {
        callback(null, config, extras);
      });
  }
1118298
def _append_theme_dir(self, name):
        """"""
        path = "[{}]".format(get_file_directory() + "/" + name)
        self.tk.call("lappend", "auto_path", path)
28706
protected function _loadAssets()
    {
        $this->_View->Html->css('System./font-panel/fontpanel.css', ['block' => true]);
        $this->_View->Html->script('System./font-panel/fontpanel.js', ['block' => true]);
        $this->_View->Html->script('System./font-panel/font-panel-init.js', ['block' => true]);
    }
626525
def add_font(font_file, font_name=None):
    
    global font_dir

    if font_name is None:
        # determine family name from filename of font
        dirname, filename = os.path.split(font_file)
        font_name, ext = os.path.splitext(filename)

    font_dir[font_name] = Bunch.Bunch(name=font_name, font_path=font_file)

    return font_name
1315214
private function moveFiles()
    {
        // Ensure we have the file permissions not in cache as new files were installed.
        clearstatcache();
        // Now move all the files over.
        $destinationDir = $this->file->get(self::SETTING_DESTINATION_DIR);
        $ioHandler      = $this->getIO();
        $logging        = $ioHandler->isVeryVerbose();
        $this->folders  = [];
        foreach (Finder::create()->in($this->tempDir)->ignoreDotFiles(false)->ignoreVCS(false) as $file) {
            $this->moveFile($file, $destinationDir, $logging, $ioHandler);
        }

        foreach (array_reverse($this->folders) as $folder) {
            if ($logging) {
                $ioHandler->write(sprintf('remove directory %s', $folder));
            }
            rmdir($folder);
        }
    }
49773
def setup(api=None):
    
    global tmp_dir_object

    tmp_dir_object = tempfile.TemporaryDirectory()

    dir_name = tmp_dir_object.name

    dir_a = os.path.join(dir_name, "a")
    os.mkdir(dir_a)
    dir_b = os.path.join(dir_name, "b")
    os.mkdir(dir_b)

    # populate directory a with text files
    file_list = [
            ["hi.txt", """Hi World!"""],
            ["hi.html", """<strong>Hi World!</strong>"""],
            ["hello.html", """
                <img src='/static/b/smile.png'</img>
                pop-up
                <script src='/static/a/hi.js'></script>"""],
            ["hi.js", """alert('Hi World')""" ]
    ]

    for f in file_list:
        with open(os.path.join(dir_a, f[0]), mode="wt") as fo:
            fo.write(f[1])

    # populate directory b with binary file
    image = b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\n\x00\x00\x00\n\x08\x02\x00\x00\x00\x02PX\xea\x00\x00\x006IDAT\x18\xd3c\xfc\xff\xff?\x03n\xc0\xc4\x80\x170100022222\xc2\x85\x90\xb9\x04t3\x92`7\xb2\x15D\xeb\xc6\xe34\xa8n4c\xe1F\x120\x1c\x00\xc6z\x12\x1c\x8cT\xf2\x1e\x00\x00\x00\x00IEND\xaeB`\x82'

    with open(os.path.join(dir_b, "smile.png"), mode="wb") as fo:
            fo.write(image)
449225
public function saveFontFamilies()
    {
        // replace the path to the DOMPDF font directories with the corresponding constants (allows for more portability)
        $cacheData = sprintf("<?php return array (%s", PHP_EOL);
        foreach ($this->fontLookup as $family => $variants) {
            $cacheData .= sprintf("  '%s' => array(%s", addslashes($family), PHP_EOL);
            foreach ($variants as $variant => $path) {
                $path = sprintf("'%s'", $path);
                $path = str_replace('\'' . $this->getOptions()->getFontDir() , '$fontDir . \'' , $path);
                $path = str_replace('\'' . $this->getOptions()->getRootDir() , '$rootDir . \'' , $path);
                $cacheData .= sprintf("    '%s' => %s,%s", $variant, $path, PHP_EOL);
            }
            $cacheData .= sprintf("  ),%s", PHP_EOL);
        }
        $cacheData .= ") ?>";
        file_put_contents($this->getCacheFile(), $cacheData);
    }
1075841
def to_ufo_propagate_font_anchors(self, ufo):
    """"""

    processed = set()
    for glyph in ufo:
        _propagate_glyph_anchors(self, ufo, glyph, processed)
546048
function() {
      'use strict';
      var filesToCopy = {
         'control.json': 'control.json',
         'gitignore': '.gitignore',
         'default.theme/css/control.css': 'default.theme/css/' + this.placeholder.name + '.css'
      };
      var integrationTechnology = this.placeholder.laxarIntegrationTechnology;

      if( this.placeholder.infrastructure ) {
         filesToCopy[ 'README.md' ] = 'README.md';
         if( integrationTechnology === 'react' ) {
            filesToCopy[ 'bower.react.json' ] = 'bower.json';
         }
         else {
            filesToCopy[ 'bower.json' ] = 'bower.json';
         }
      }


      if( integrationTechnology === 'plain' ) {
         filesToCopy[ 'control.plain.js' ] = this.placeholder.name + '.js';
      }
      else if( integrationTechnology === 'angular' ) {
         filesToCopy[ 'control.angular.js' ] = this.placeholder.name + '.js';
      }
      else if( integrationTechnology === 'react' ) {
         filesToCopy[ 'control.react.jsx' ] = this.placeholder.name + '.jsx';
      }

      for( var file in filesToCopy ) {
         if( filesToCopy.hasOwnProperty( file ) ) {
            this.fs.copyTpl(
               this.templatePath( file ),
               this.destinationPath(
                  path.join( this.controlDirname, this.placeholder.name, filesToCopy[ file ] )
               ),
               this.placeholder
            );
         }
      }
   }
1195990
function fontAPI( fonts ) {
    var promises = [];
    fonts.forEach(function (font) {
        var pro = document.fonts.load( '64px "' + font + '"' );
        promises.push( pro );
    });
    return Promise.all( promises );
}
1226367
function handleFontLoad (fontFace) {
  _backingStores.forEach(function (backingStore) {
    if (layerContainsFontFace(backingStore.layer, fontFace)) {
      invalidateBackingStore(backingStore.id);
    }
  });
}
1065385
private function setUp()
    {
        // Load the fonts for the drag hint (see #4838)
        $GLOBALS['TL_CONFIG']['loadGoogleFonts'] = true;

        $this->rootDir = \dirname(System::getContainer()->getParameter('kernel.root_dir'));

        if (!$this->dataContainer || !$this->orderField) {
            return;
        }

        $value = $this->dataContainer->getModel()->getProperty($this->orderField);

        // support serialized values.
        if (!\is_array($value)) {
            $value = StringUtil::deserialize($value, true);
        }

        $this->orderId         = $this->orderField . \str_replace($this->strField, '', $this->strId);
        $this->orderFieldValue = (!empty($value) && \is_array($value)) ? \array_filter($value) : [];
    }
583926
function coreCss() {
  const buildPath = 'build/css/';
  const core = (name, fonts) => gulp.src([
      (fonts ? '' : '!') + 'core/css/fonts.css',
      'core/css/common.css',
      'core/css/*.css',
    ])
    .pipe($.concat(`${name}.css`))
    .pipe($.insert.prepend(`/*! ${pkg.name} - v${pkg.version} - ${dateformat(new Date(), 'yyyy-mm-dd')} */\n`))
    // Transpile
    .pipe($.autoprefixer({
      browsers: babelrc.presets[0][1].targets.browsers,
      add: true,
      remove: false, // removing prefixes can cause a bug
    }))
    .pipe(gulp.dest(buildPath))
    // Minify
    .pipe($.cssmin({ processImport: false }))
    .pipe($.rename({ suffix: '.min' }))
    .pipe(gulp.dest(buildPath))
  ;

  return mergeStream(
    core('onsenui', true),
    core('onsenui-core', false),

    gulp.src('core/css/fonts.css')
      .pipe($.rename({ basename: 'onsenui-fonts' }))
      .pipe(gulp.dest(buildPath)),

    // font-awesome fle copy
    gulp.src('core/css/font_awesome/**/*')
      .pipe(gulp.dest('build/css/font_awesome/')),

    // ionicons file copy
    gulp.src('core/css/ionicons/**/*')
      .pipe(gulp.dest('build/css/ionicons/')),

    // material icons file copy
    gulp.src('core/css/material-design-iconic-font/**/*')
    .pipe(gulp.dest('build/css/material-design-iconic-font/'))
  );
}
1300181
function moveFilesToRoot(subdir) {
  return exec(`mv ${docPath}/${subdir}/* ${docPath}`)
    .then(() => {
      exec(`rmdir ${docPath}/${subdir}`);
    })
    .catch(e => console.error(e));
}
410433
function handleFonts(callback) {
			iconStream
				.pipe(gulpConnect.reload())
				.pipe(gulp.dest(outputDirectory + 'fonts/'))
				.on('finish', callback);
		}
542382
function restoreFontSize() {
        var fsStyle      = prefs.get("fontSize"),
            fsAdjustment = PreferencesManager.getViewState("fontSizeAdjustment");

        if (fsAdjustment) {
            // Always remove the old view state even if we also have the new view state.
            PreferencesManager.setViewState("fontSizeAdjustment");

            if (!fsStyle) {
                // Migrate the old view state to the new one.
                fsStyle = (DEFAULT_FONT_SIZE + fsAdjustment) + "px";
                prefs.set("fontSize", fsStyle);
            }
        }

        if (fsStyle) {
            _removeDynamicFontSize();
            _addDynamicFontSize(fsStyle);
        }
    }
1030825
def deploy(self):
        
        self._info("* Opening archive: {}", self.archive_path)
        if not os.path.exists(self.archive_path):
            self._error("Given path does not exists: {}", self.archive_path)

        with zipfile.ZipFile(self.archive_path, 'r') as zip_archive:
            font_dir = self.requirements['font_dir']+'/'
            allowed_extensions = ['.'+item for item in self.requirements['extensions']]
            members = [member for member in zip_archive.namelist()]

            if settings.ICOMOON_MANIFEST_FILENAME not in members:
                raise self._error("Icomoon archive must contain a JSON manifest '{}'", settings.ICOMOON_MANIFEST_FILENAME)

            if font_dir not in members:
                raise self._error("Icomoon archive must contain the font directory '{}'", font_dir)

            # Scan for supported font files
            font_files = []
            for item in members:
                # Dont catch the font_dir itself nor sub directories, just files with allowed extensions
                if item.startswith(font_dir) and not item.endswith('/') and os.path.splitext(item)[-1] in allowed_extensions:
                    font_files.append(item)

            if not font_files:
                self._error("Font dir does not contain any supported format: {}", ', '.join(allowed_extensions))
            else:
                self._debug("* Finded font files in archive: {}", ', '.join(font_files))

            # Extract files from archive
            tmp_container, css_content = self.extract(zip_archive, font_files)

        # Install files
        self.install(tmp_container, font_dir, css_content)