Commit 37e1d540 authored by Marianne's avatar Marianne

cou

parents b1c6ec30 9f2b5f46
@font-face{ font-family: "der75"; src:url("../../content/fonts/der-75/der75.otf"); }
@font-face{ font-family: "space-notorious-rounded"; src:url("../../content/fonts/space-notorious/Space-Notorious-rounded.otf"); }
@font-face{ font-family: "squaredupout"; src:url("../../content/fonts/squared/SquaredUpOut.otf"); }
@font-face{ font-family: "squaredshadow"; src:url("../../content/fonts/squared/SquaredShadow.otf"); }
......@@ -6,4 +5,5 @@
@font-face{ font-family: "supernotoriousv2"; src:url("../../content/fonts/super-notorious/super_notorious_v2.otf"); }
@font-face{ font-family: "supernotoriouspixels"; src:url("../../content/fonts/super-notorious/supernotoriouspixels.otf"); }
@font-face{ font-family: "supernotorioustordue"; src:url("../../content/fonts/super-notorious/SuperNotoriousTordue.otf"); }
@font-face{ font-family: "supertramp"; src:url("../../content/fonts/supertramp/supertramp.otf"); }
\ No newline at end of file
@font-face{ font-family: "supertramp"; src:url("../../content/fonts/supertramp/supertramp.otf"); }
@font-face{ font-family: "avara-bold"; src:url("../../content/fonts/test/Avara-Bold.otf"); }
\ No newline at end of file
......@@ -68,7 +68,7 @@ function setStyles(fontName){
var fontName = separateUpper(fontName);
var mightNeedles = ["-", "_"];
var mightNeedles = ["-", "_"];
if(fontName.indexOf(mightNeedles[0]) !== -1 || fontName.indexOf(mightNeedles[1]) !== -1){
......@@ -96,11 +96,9 @@ function writeNewFontTable(){
for(i=0; i<fonts.length; i++){
var path = dir+"/"+fonts[i].value;
var path = dir+"/"+fonts[i].value;
console.log(path);
(function(i){
(function(i){
opentype.load(path, function(err, font){
......@@ -121,7 +119,7 @@ function writeNewFontTable(){
glyphCount: gCount,
fontAscender: fontMetrics.sTypoAscender,
fontDescender: fontMetrics.sTypoDescender,
fontXHeight: fontMetrics.sxHeight
fontXHeight: fontMetrics.sxHeight
};
......@@ -489,4 +487,3 @@ function setScripts(){
}
setScripts();
{"folderName":"der-75","family":"Der 75","designer":{"designerName":["Designer Un"],"designerUrl":[""]},"types":["Serif"],"template":"letter","test_words":"BIM BAM","fonts":{"filenames":["der75.otf"],"styles":["Regular"]},"created":"1551287314","modified":"1551287314"}
\ No newline at end of file
......@@ -224,9 +224,13 @@ class Collections extends Validate{
public function setTest($font){
return (isset($font->test_words) && strlen($font->test_words) > 0) ? $font->test_words : "Hello world";
if ($font->template == "sentence") {
return (isset($font->test_words) && strlen($font->test_words) > 0) ? $font->test_words : "Hello world";
} elseif ($font->template == "letter" ) {
return (isset($font->test_words) && strlen($font->test_words) > 0) ? $font->test_words : "Aa";
} elseif ($font->template == "paragraph" ) {
return (isset($font->test_words) && strlen($font->test_words) > 0) ? $font->test_words : "Et et et voluptas ut. Velit porro alias doloremque harum praesentium possimus totam aut. Iste tenetur qui sint laudantium provident ex harum. Laboriosam voluptas dolor iste voluptates dolorem tempore et et.";
}
}
public function nowDate(){
......
<?php
class Datas extends Strings{
class Datas extends Strings{
public function getForm($blueprint){
return json_decode(file_get_contents("typotheque/blueprints/".$blueprint.".json"), true);
}
......@@ -25,9 +25,9 @@ class Datas extends Strings{
if(!in_array($rule, $nots)){
$value = ($value == 1) ? "true" : $value;
$rules [] = $rule.'="'.$value.'"';
$rules [] = $rule.'="'.$value.'"';
}
}
}
......@@ -40,7 +40,7 @@ class Datas extends Strings{
$alredys = ["filename", "name"];
if($field == "filename"){
$value = $file;
}elseif($field == "name"){
......@@ -57,7 +57,7 @@ class Datas extends Strings{
$alredys = ["family", "created", "modified"];
if($field == "family"){
$value = $fam;
}elseif($field == "created" || $field == "modified"){
......@@ -89,4 +89,4 @@ class Datas extends Strings{
}
?>
\ No newline at end of file
?>
......@@ -44,7 +44,7 @@ class Form extends Strings{
foreach($fields as $name=>$rules){
$array [] = $name;
$array [] = $name;
}
return implode(",", $array);
......@@ -102,7 +102,7 @@ class Form extends Strings{
$back = [];
foreach ($files as $file){
if(is_dir($file)){
$array = [];
......@@ -156,7 +156,7 @@ class Form extends Strings{
}
foreach ($field["values"] as $k => $subvalue) {
$arr = (isset($subvalue["array"])) ? "[]" : "";
$id = ($field["type"] == "checkboxes") ? $subvalue["value"] : $subvalue["name"];
$label = '<label for="'.$id.'">'.$subvalue["label"].'</label>';
......@@ -197,7 +197,7 @@ class Form extends Strings{
$checked = (isset($subvalue["checked"])) ? "checked" : '';
}
}
}
}
......@@ -226,14 +226,14 @@ class Form extends Strings{
if(!in_array($rule, $nots)){
$value = ($value == 1) ? "true" : $value;
if($field["type"] !== "textarea"){
$rules [] = $rule.'="'.$value.'"';
}
}
}
}
......@@ -248,7 +248,7 @@ class Form extends Strings{
$alredys = ["filenames", "name"];
if($field == "filenames"){
$value = $file;
}elseif($field == "name"){
......@@ -265,7 +265,7 @@ class Form extends Strings{
$alredys = ["family", "created", "modified"];
if($field == "family"){
$value = $fam;
}elseif($field == "created" || $field == "modified"){
......@@ -298,7 +298,7 @@ class Form extends Strings{
public function firstIndex($a) {
foreach ($a as $k => $v) return $k;
foreach ($a as $k => $v) return $k;
}
public function getFirstLabel($fields){
......@@ -335,4 +335,4 @@ class Form extends Strings{
}
}
?>
\ No newline at end of file
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment