diff --git a/README.md b/README.md index a1f52bb95..aca10db80 100644 --- a/README.md +++ b/README.md @@ -1,99 +1,37 @@ +# ❄️ Metasiberia - metaverse from Siberia ❄️ -Substrata is an open-source metaverse, developed by Glare Technologies Limited, see https://substrata.info/. +[![C++](https://img.shields.io/badge/C%2B%2B-20-00599C?logo=cplusplus&logoColor=white)](https://isocpp.org/) +[![Build](https://img.shields.io/badge/build-CMake-064F8C?logo=cmake&logoColor=white)](https://cmake.org/) +[![UI](https://img.shields.io/badge/UI-Qt%205%20%7C%20Qt%206%20%7C%20SDL-41CD52)](https://www.qt.io/) +[![Platforms](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20Android-1F6FEB)](https://github.com/shipilovden/sub-metasiberia) +[![Windows CI](https://img.shields.io/github/actions/workflow/status/shipilovden/sub-metasiberia/windows-main-ci.yml?branch=master&label=Windows%20CI)](https://github.com/shipilovden/sub-metasiberia/actions/workflows/windows-main-ci.yml) +[![Linux Configure](https://img.shields.io/github/actions/workflow/status/shipilovden/sub-metasiberia/cmake-configure-linux.yml?branch=master&label=Linux%20Configure)](https://github.com/shipilovden/sub-metasiberia/actions/workflows/cmake-configure-linux.yml) +[![License](https://img.shields.io/github/license/shipilovden/sub-metasiberia)](LICENCE) +[![Stars](https://img.shields.io/github/stars/shipilovden/sub-metasiberia?style=social)](https://github.com/shipilovden/sub-metasiberia/stargazers) +[![Admin](https://img.shields.io/website?url=https%3A%2F%2Fvr.metasiberia.com%2F&up_message=online&down_message=offline&label=admin&logo=googlechrome)](https://vr.metasiberia.com/) +[![Signup](https://img.shields.io/website?url=https%3A%2F%2Fvr.metasiberia.com%2Fsignup&up_message=online&down_message=offline&label=signup&logo=googlechrome)](https://vr.metasiberia.com/signup) +[![Website](https://img.shields.io/website?url=https%3A%2F%2Fmetasiberia.com%2F&up_message=online&down_message=offline&label=website&logo=googlechrome)](https://metasiberia.com/) -The Substrata client and server are native apps written in C++, that support Windows, Mac and Linux. -There is also an in-development web-client. +Metasiberia is a virtual world project inspired by and based on the open-source Substrata software. -You can build the Substrata client or Substrata server from this repository. +## Quick Access -![main screenshot](https://github.com/glaretechnologies/substrata/assets/30285/38a6db93-e729-4f15-8561-5c848eb5391c) +- **🛠 Admin**: [https://vr.metasiberia.com/](https://vr.metasiberia.com/) +- **📝 Signup**: [https://vr.metasiberia.com/signup](https://vr.metasiberia.com/signup) +- **🌐 Web Client**: [https://vr.metasiberia.com/webclient](https://vr.metasiberia.com/webclient) +- **🏠 Website**: [https://metasiberia.com/](https://metasiberia.com/) +![](docs/images/metasiberia.png) -## Usage examples +## Community and Support -You can always visit the main Substrata world at substrata.info - this is the server that we run, and the main gathering point for Substrata users. However you are also welcome to run your own server! You can do this using by building the server from this repository, or using one of the prebuilt binaries. +[![VK](https://img.shields.io/badge/VK-metasiberia__official-0077FF?logo=vk&logoColor=white)](https://vk.com/metasiberia_official) +[![Telegram](https://img.shields.io/badge/Telegram-metasiberia__channel-26A5E4?logo=telegram&logoColor=white)](https://t.me/metasiberia_channel) -### 3D model Visualisation +## Credits -Substrata is perfect for multi-user visualisation of 3d models. Walk around a digital twin model with your team, hosted on an on-premises server! +**Metasiberia** is inspired and based on **Substrata**. -### Education - -Because Substrata is open source, you can build and run your own world for students without paying any licensing fees. - -## Get Involved - -We welcome contributions from people! - -Chat about Substrata on the Substrata discord here: https://discord.gg/3Ds9cxyEnZ - -Feel free to drop a message on the discord if you are having trouble building Substrata, or have any questions about it. - - - -## Building - -See [docs/building.txt](docs/building.txt) for build instructions. - -## Features - -### High performance, physically-based rendering engine - -Substrata uses the Glare engine (https://github.com/glaretechnologies/glare-core), which produces realistic graphics while rendering the entire Substrata world - e.g. over 12000 objects with user-generated content at 200 fps. - -* The Glare engine is designed for metaverses, in particular large numbers of varied objects. -* Automatic level of detail generation -* Streaming loading and unloading of objects without hitches as the player moves around -* Physically-based rendering -* Highly realistic sun/sky/daylight system derived from a multiple scattering ray-tracing atmospheric simulation in https://www.indigorenderer.com/ -* Skeletal animation system with procedural animations and animation retargetting for sharing animation data amongst avatars with varied sizes -* Runtime texture compression for making best use of GPU memory -* GLTF, OBJ import, plus supports many image formats -* Terrain and water rendering -* Particle system for rendering dust, water splashes, smoke etc. - -![boat](https://github.com/glaretechnologies/substrata/assets/30285/0dde612a-ea95-49af-bc64-07f1a7114c7f) - - -### Networked physics simulation - -We have integrated the Jolt physics engine (https://github.com/jrouwe/JoltPhysics), and have implemented a networked physics simulation on top of it. -What that means is that multiple players can interact with objects in a world, drive vehicles, push objects etc. in a realistic way. - -Physics-based vehicles: (Image links are to videos on YouTube) - - - -Networked physics: - - - - -Handling lots of interactive objects: - - - - -### Spatial Audio and Voice Chat - -Substrata has built-in spatial audio and voice chat, without using any third-party services or servers. - - -### In-world building - -The substrata client has controls for creating and editing objects, as well as for editing voxels - - - - - - -You can add objects to the world from your local machine, and they will be automatically uploaded to the server and be visible to other users. - -## Get help - -Chat about Substrata on the Substrata discord here: https://discord.gg/3Ds9cxyEnZ - -Feel free to drop a message on the discord if you are having trouble building Substrata, or have any questions about it. - -Alternatively, feel free to create a github issue. +[![Original Substrata](https://img.shields.io/badge/GitHub-glaretechnologies%2Fsubstrata-181717?logo=github&logoColor=white)](https://github.com/glaretechnologies/substrata) +[![Substrata Creator](https://img.shields.io/badge/X-%40NickChapmn-000000?logo=x&logoColor=white)](https://x.com/NickChapmn) +[![Metasiberia Author](https://img.shields.io/badge/X-%40denshipilovart-000000?logo=x&logoColor=white)](https://x.com/denshipilovart) diff --git a/gui_client/GUIClient.cpp b/gui_client/GUIClient.cpp index 6073d0685..ec37b0569 100644 --- a/gui_client/GUIClient.cpp +++ b/gui_client/GUIClient.cpp @@ -117,7 +117,10 @@ Copyright Glare Technologies Limited 2024 - #include #include #endif -#include +#include +#include +#include +#include static const Colour4f DEFAULT_OUTLINE_COLOUR = Colour4f::fromHTMLHexString("0ff7fb"); // light blue @@ -137,8 +140,137 @@ static const URLString DEFAULT_AVATAR_MODEL_URL = "xbot.bmesh"; // This file sho static const float MIN_SPOTLIGHT_CONE_ANGLE = 0.087266f; -static std::vector test_avatars; -static std::vector test_avatar_phases; +static std::vector test_avatars; +static std::vector test_avatar_phases; + + +namespace +{ +bool isSupportedTextObjectFontPath(const std::string& path) +{ + return + hasExtension(path, "ttf") || + hasExtension(path, "otf") || + hasExtension(path, "fon") || + hasExtension(path, "woff"); +} + + +std::string getTextObjectFontNameForPath(const std::string& path) +{ + const std::string filename = FileUtils::getFilename(path); + const std::string extension = getExtension(filename); + if(extension.empty()) + return filename; + + return filename.substr(0, filename.size() - extension.size() - 1); +} + + +bool text_font_paths_scanned = false; +std::map text_font_name_to_path_map; +std::map text_font_face_sets; +std::set unavailable_text_font_names; + + +void scanTextObjectFontPathsIfNeeded(const std::string& base_dir_path) +{ + if(text_font_paths_scanned) + return; + + text_font_paths_scanned = true; + text_font_name_to_path_map.clear(); + + std::vector possible_paths; + + if(!base_dir_path.empty()) + { + possible_paths.push_back(base_dir_path + "/data/resources/fonts"); + possible_paths.push_back(base_dir_path + "/resources/fonts"); + } + +#if EMSCRIPTEN + possible_paths.push_back("/data/resources/fonts"); + possible_paths.push_back("data/resources/fonts"); + possible_paths.push_back("./data/resources/fonts"); +#endif + + possible_paths.push_back("./resources/fonts"); + possible_paths.push_back("resources/fonts"); + possible_paths.push_back("../resources/fonts"); + possible_paths.push_back("../../resources/fonts"); + possible_paths.push_back("C:/programming/substrata/resources/fonts"); + + for(size_t i=0; i files = FileUtils::getFilesInDirFullPaths(fonts_dir); + std::sort(files.begin(), files.end()); + + for(size_t z=0; zgetFonts() == NULL)) + return NULL; + + if(ob.text_font.empty() || (ob.text_font == "Default")) + return gui_client.gl_ui->getFonts(); + + { + auto res = text_font_face_sets.find(ob.text_font); + if(res != text_font_face_sets.end()) + return res->second.ptr(); + } + + if(unavailable_text_font_names.find(ob.text_font) != unavailable_text_font_names.end()) + return gui_client.gl_ui->getFonts(); + + scanTextObjectFontPathsIfNeeded(gui_client.base_dir_path); + + auto path_res = text_font_name_to_path_map.find(ob.text_font); + if(path_res == text_font_name_to_path_map.end()) + { + unavailable_text_font_names.insert(ob.text_font); + return gui_client.gl_ui->getFonts(); + } + + try + { + TextRendererFontFaceSizeSetRef font_set = new TextRendererFontFaceSizeSet(gui_client.gl_ui->getFonts()->renderer, path_res->second); + text_font_face_sets[ob.text_font] = font_set; + return font_set.ptr(); + } + catch(glare::Exception& e) + { + conPrint("Failed to load text font '" + ob.text_font + "' from '" + path_res->second + "': " + e.what()); + unavailable_text_font_names.insert(ob.text_font); + return gui_client.gl_ui->getFonts(); + } +} +} GUIClient::GUIClient(const std::string& base_dir_path_, const std::string& appdata_path_, const ArgumentParser& args) @@ -468,10 +600,14 @@ void GUIClient::afterGLInitInitialise(double device_pixel_ratio, Referenceonly_load_most_important_obs = settings->getBoolValue(/*MainOptionsDialog::onlyLoadMostImportantObsKey=*/"only_load_most_important_obs", /*default value=*/onlyLoadMostImportantObjectsDefaultValue()); + opengl_engine = opengl_engine_; + + text_font_paths_scanned = false; + text_font_name_to_path_map.clear(); + text_font_face_sets.clear(); + unavailable_text_font_names.clear(); + + this->only_load_most_important_obs = settings->getBoolValue(/*MainOptionsDialog::onlyLoadMostImportantObsKey=*/"only_load_most_important_obs", /*default value=*/onlyLoadMostImportantObjectsDefaultValue()); @@ -2044,20 +2180,21 @@ static Colour4f computeSpotlightColour(const WorldObject& ob, float cone_start_a } -void GUIClient::createGLAndPhysicsObsForText(const Matrix4f& ob_to_world_matrix, WorldObject* ob, bool use_materialise_effect, PhysicsObjectRef& physics_ob_out, GLObjectRef& opengl_ob_out) -{ - ZoneScoped; // Tracy profiler - - Rect2f rect_os; - OpenGLTextureRef atlas_texture; - - const std::string use_text = ob->content.empty() ? " " : UTF8Utils::sanitiseUTF8String(ob->content); - - const int font_size_px = 42; - - std::vector char_positions_font_coords; - Reference meshdata = GLUIText::makeMeshDataForText(opengl_engine.ptr(), gl_ui->font_char_text_cache.ptr(), gl_ui->getFonts(), gl_ui->getEmojiFonts(), use_text, - /*font size px=*/font_size_px, /*vert_pos_scale=*/(1.f / font_size_px), /*render SDF=*/true, this->stack_allocator, rect_os, atlas_texture, char_positions_font_coords); +void GUIClient::createGLAndPhysicsObsForText(const Matrix4f& ob_to_world_matrix, WorldObject* ob, bool use_materialise_effect, PhysicsObjectRef& physics_ob_out, GLObjectRef& opengl_ob_out) +{ + ZoneScoped; // Tracy profiler + + Rect2f rect_os; + OpenGLTextureRef atlas_texture; + + const std::string use_text = ob->content.empty() ? " " : UTF8Utils::sanitiseUTF8String(ob->content); + + const int font_size_px = 42; + TextRendererFontFaceSizeSet* const text_font_set = getTextFontFaceSetForObject(*this, *ob); + + std::vector char_positions_font_coords; + Reference meshdata = GLUIText::makeMeshDataForText(opengl_engine.ptr(), gl_ui->font_char_text_cache.ptr(), text_font_set, gl_ui->getEmojiFonts(), use_text, + /*font size px=*/font_size_px, /*vert_pos_scale=*/(1.f / font_size_px), /*render SDF=*/true, this->stack_allocator, rect_os, atlas_texture, char_positions_font_coords); // We will make a physics object that has the same dimensions in object space as the text mesh vertices. This means we can use the same pos, rot and scale // for the physics object as for the opengl object. @@ -2316,17 +2453,18 @@ void GUIClient::loadModelForObject(WorldObject* ob, WorldStateLock& world_state_ physics_world->addObject(ob->physics_object); } } - else if(ob->object_type == WorldObject::ObjectType_Text) - { - if(ob->opengl_engine_ob.isNull()) - { - assert(ob->physics_object.isNull()); - - BitUtils::zeroBit(ob->changed_flags, WorldObject::CONTENT_CHANGED); - - recreateTextGraphicsAndPhysicsObs(ob); - - loadScriptForObject(ob, world_state_lock); // Load any script for the object. + else if(ob->object_type == WorldObject::ObjectType_Text) + { + if(ob->opengl_engine_ob.isNull()) + { + assert(ob->physics_object.isNull()); + + BitUtils::zeroBit(ob->changed_flags, WorldObject::CONTENT_CHANGED); + BitUtils::zeroBit(ob->changed_flags, WorldObject::TEXT_FONT_CHANGED); + + recreateTextGraphicsAndPhysicsObs(ob); + + loadScriptForObject(ob, world_state_lock); // Load any script for the object. } } else if(ob->object_type == WorldObject::ObjectType_Portal) @@ -6815,14 +6953,15 @@ void GUIClient::timerEvent(const MouseCursorState& mouse_cursor_state) ui_interface->objectModelURLUpdated(*ob); // Update model URL in UI if we have selected the object. - if(ob->object_type == WorldObject::ObjectType_Text) - { - if(BitUtils::isBitSet(ob->changed_flags, WorldObject::CONTENT_CHANGED)) - { - BitUtils::zeroBit(ob->changed_flags, WorldObject::CONTENT_CHANGED); - recreateTextGraphicsAndPhysicsObs(ob); - } - } + if(ob->object_type == WorldObject::ObjectType_Text) + { + if(BitUtils::isBitSet(ob->changed_flags, WorldObject::CONTENT_CHANGED) || BitUtils::isBitSet(ob->changed_flags, WorldObject::TEXT_FONT_CHANGED)) + { + BitUtils::zeroBit(ob->changed_flags, WorldObject::CONTENT_CHANGED); + BitUtils::zeroBit(ob->changed_flags, WorldObject::TEXT_FONT_CHANGED); + recreateTextGraphicsAndPhysicsObs(ob); + } + } loadAudioForObject(ob, /*loaded buffer=*/nullptr); // Check for re-loading audio if audio URL changed. @@ -6905,11 +7044,12 @@ void GUIClient::timerEvent(const MouseCursorState& mouse_cursor_state) { // conPrint("GUICLIENT: timerEvent(): handling from_remote_content_dirty.."); - if(ob->object_type == WorldObject::ObjectType_Text) - { - recreateTextGraphicsAndPhysicsObs(ob); - BitUtils::zeroBit(ob->changed_flags, WorldObject::CONTENT_CHANGED); - } + if(ob->object_type == WorldObject::ObjectType_Text) + { + recreateTextGraphicsAndPhysicsObs(ob); + BitUtils::zeroBit(ob->changed_flags, WorldObject::CONTENT_CHANGED); + BitUtils::zeroBit(ob->changed_flags, WorldObject::TEXT_FONT_CHANGED); + } // TODO: handle non-text objects. Also move this code into some kind of objectChanged() function? ob->from_remote_content_dirty = false; @@ -12183,14 +12323,15 @@ void GUIClient::objectEdited() selected_ob->opengl_engine_ob = opengl_ob; } } - else if(this->selected_ob->object_type == WorldObject::ObjectType_Text) - { - // Re-create opengl and physics objects - recreateTextGraphicsAndPhysicsObs(selected_ob.ptr()); - - BitUtils::zeroBit(selected_ob->changed_flags, WorldObject::CONTENT_CHANGED); - - opengl_ob = selected_ob->opengl_engine_ob;//new_opengl_ob; + else if(this->selected_ob->object_type == WorldObject::ObjectType_Text) + { + // Re-create opengl and physics objects + recreateTextGraphicsAndPhysicsObs(selected_ob.ptr()); + + BitUtils::zeroBit(selected_ob->changed_flags, WorldObject::CONTENT_CHANGED); + BitUtils::zeroBit(selected_ob->changed_flags, WorldObject::TEXT_FONT_CHANGED); + + opengl_ob = selected_ob->opengl_engine_ob;//new_opengl_ob; opengl_engine->selectObject(/*new_opengl_ob*/selected_ob->opengl_engine_ob); } diff --git a/gui_client/MainWindow.cpp b/gui_client/MainWindow.cpp index 4036fae40..487e8404f 100644 --- a/gui_client/MainWindow.cpp +++ b/gui_client/MainWindow.cpp @@ -883,16 +883,18 @@ void MainWindow::showEditorDockWidget() } -void MainWindow::setObjectEditorControlsEditable(bool editable) -{ - ui->objectEditor->setControlsEditable(editable); -} +void MainWindow::setObjectEditorControlsEditable(bool editable) +{ + ui->objectEditor->setTextFontFeatureSupported(gui_client.server_protocol_version >= 50); + ui->objectEditor->setControlsEditable(editable); +} -void MainWindow::setObjectEditorFromOb(const WorldObject& ob, int selected_mat_index, bool ob_in_editing_users_world) -{ - ui->objectEditor->setFromObject(ob, selected_mat_index, ob_in_editing_users_world); -} +void MainWindow::setObjectEditorFromOb(const WorldObject& ob, int selected_mat_index, bool ob_in_editing_users_world) +{ + ui->objectEditor->setTextFontFeatureSupported(gui_client.server_protocol_version >= 50); + ui->objectEditor->setFromObject(ob, selected_mat_index, ob_in_editing_users_world); +} int MainWindow::getSelectedMatIndex() @@ -1673,11 +1675,12 @@ void MainWindow::on_actionAdd_Text_triggered() new_world_object->uid = UID(0); // Will be set by server new_world_object->object_type = WorldObject::ObjectType_Text; new_world_object->pos = ob_pos; - new_world_object->axis = toVec3f(total_rot_axis); - new_world_object->angle = total_rot_angle; - new_world_object->scale = Vec3f(0.4f); - new_world_object->content = "Some Text"; - new_world_object->setAABBOS(js::AABBox(Vec4f(0,0,0,1), Vec4f(1,0,1,1))); + new_world_object->axis = toVec3f(total_rot_axis); + new_world_object->angle = total_rot_angle; + new_world_object->scale = Vec3f(0.4f); + new_world_object->content = "Some Text"; + new_world_object->text_font = "Default"; + new_world_object->setAABBOS(js::AABBox(Vec4f(0,0,0,1), Vec4f(1,0,1,1))); new_world_object->materials.resize(1); new_world_object->materials[0] = new WorldMaterial(); diff --git a/gui_client/ObjectEditor.cpp b/gui_client/ObjectEditor.cpp index 22cf93524..fb1dd791c 100644 --- a/gui_client/ObjectEditor.cpp +++ b/gui_client/ObjectEditor.cpp @@ -18,32 +18,68 @@ #include "../utils/Reference.h" #include "../utils/StringUtils.h" #include "../utils/TaskManager.h" -#include "../qt/SignalBlocker.h" -#include "../qt/QtUtils.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include "../qt/SignalBlocker.h" +#include "../qt/QtUtils.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // NOTE: these max volume levels should be the same as in maxAudioVolumeForObject() in WorkerThread.cpp (runs on server) -static const float DEFAULT_MAX_VOLUME = 4; -static const float DEFAULT_MAX_VIDEO_VOLUME = 4; -static const float SLIDER_MAX_VOLUME = 2; - - -ObjectEditor::ObjectEditor(QWidget *parent) -: QWidget(parent), - selected_mat_index(0), - edit_timer(new QTimer(this)), - shader_editor(NULL), - settings(NULL), - spotlight_col(0.85f) -{ +static const float DEFAULT_MAX_VOLUME = 4; +static const float DEFAULT_MAX_VIDEO_VOLUME = 4; +static const float SLIDER_MAX_VOLUME = 2; + + +namespace +{ +bool isSupportedTextObjectFontPath(const QString& path) +{ + return + path.endsWith(".ttf", Qt::CaseInsensitive) || + path.endsWith(".otf", Qt::CaseInsensitive) || + path.endsWith(".fon", Qt::CaseInsensitive) || + path.endsWith(".woff", Qt::CaseInsensitive); +} + + +QString canonicalFontNameForPath(const QString& path) +{ + return QFileInfo(path).completeBaseName(); +} + + +QString fontNameForComboIndex(const QComboBox* combo, int index) +{ + if(index < 0 || index >= combo->count()) + return QString(); + + QString font_name = combo->itemData(index).toString(); + if(font_name.isEmpty()) + font_name = combo->itemText(index); + return font_name; +} +} + +ObjectEditor::ObjectEditor(QWidget *parent) +: QWidget(parent), + selected_mat_index(0), + edit_timer(new QTimer(this)), + shader_editor(NULL), + settings(NULL), + selected_font_name("Default"), + controls_editable(true), + text_font_feature_supported(true), + spotlight_col(0.85f) +{ setupUi(this); this->modelFileSelectWidget->force_use_last_dir_setting = true; @@ -58,12 +94,13 @@ ObjectEditor::ObjectEditor(QWidget *parent) connect(this->matEditor, SIGNAL(materialChanged()), this, SIGNAL(objectChanged())); - connect(this->modelFileSelectWidget, SIGNAL(filenameChanged(QString&)), this, SIGNAL(objectChanged())); - connect(this->scriptTextEdit, SIGNAL(textChanged()), this, SLOT(scriptTextEditChanged())); - connect(this->contentTextEdit, SIGNAL(textChanged()), this, SIGNAL(objectChanged())); - - connect(this->targetURLLineEdit, SIGNAL(editingFinished()), this, SIGNAL(objectChanged())); - connect(this->targetURLLineEdit, SIGNAL(editingFinished()), this, SLOT(targetURLChanged())); + connect(this->modelFileSelectWidget, SIGNAL(filenameChanged(QString&)), this, SIGNAL(objectChanged())); + connect(this->scriptTextEdit, SIGNAL(textChanged()), this, SLOT(scriptTextEditChanged())); + connect(this->contentTextEdit, SIGNAL(textChanged()), this, SIGNAL(objectChanged())); + connect(this->fontComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onFontChanged(int))); + + connect(this->targetURLLineEdit, SIGNAL(editingFinished()), this, SIGNAL(objectChanged())); + connect(this->targetURLLineEdit, SIGNAL(editingFinished()), this, SLOT(targetURLChanged())); connect(this->audioFileWidget, SIGNAL(filenameChanged(QString&)), this, SIGNAL(objectChanged())); @@ -122,10 +159,13 @@ ObjectEditor::ObjectEditor(QWidget *parent) this->volumeDoubleSpinBox->setMaximum(DEFAULT_MAX_VOLUME); this->volumeDoubleSpinBox->setSliderMaximum(SLIDER_MAX_VOLUME); - this->videoVolumeDoubleSpinBox->setMaximum(DEFAULT_MAX_VIDEO_VOLUME); - this->videoVolumeDoubleSpinBox->setSliderMaximum(SLIDER_MAX_VOLUME); - - this->visitURLLabel->hide(); + this->videoVolumeDoubleSpinBox->setMaximum(DEFAULT_MAX_VIDEO_VOLUME); + this->videoVolumeDoubleSpinBox->setSliderMaximum(SLIDER_MAX_VOLUME); + this->fontComboBox->setMinimumContentsLength(20); + if(this->fontComboBox->view()) + this->fontComboBox->view()->setTextElideMode(Qt::ElideNone); + + this->visitURLLabel->hide(); // Set up script edit timer. edit_timer->setSingleShot(true); @@ -137,12 +177,14 @@ ObjectEditor::ObjectEditor(QWidget *parent) void ObjectEditor::init() // settings should be set before this. { - show3DControlsCheckBox->setChecked(settings->value("objectEditor/show3DControlsCheckBoxChecked", /*default val=*/true).toBool()); - SignalBlocker::setChecked(linkScaleCheckBox, settings->value("objectEditor/linkScaleCheckBoxChecked", /*default val=*/true).toBool()); - - SignalBlocker::setValue(gridSpacingDoubleSpinBox, settings->value("objectEditor/gridSpacing", /*default val=*/1.0).toDouble()); - SignalBlocker::setChecked(snapToGridCheckBox, settings->value("objectEditor/snapToGridCheckBoxChecked", /*default val=*/false).toBool()); -} + show3DControlsCheckBox->setChecked(settings->value("objectEditor/show3DControlsCheckBoxChecked", /*default val=*/true).toBool()); + SignalBlocker::setChecked(linkScaleCheckBox, settings->value("objectEditor/linkScaleCheckBoxChecked", /*default val=*/true).toBool()); + + SignalBlocker::setValue(gridSpacingDoubleSpinBox, settings->value("objectEditor/gridSpacing", /*default val=*/1.0).toDouble()); + SignalBlocker::setChecked(snapToGridCheckBox, settings->value("objectEditor/snapToGridCheckBoxChecked", /*default val=*/false).toBool()); + + loadAvailableFonts(); +} ObjectEditor::~ObjectEditor() @@ -226,13 +268,22 @@ void ObjectEditor::setFromObject(const WorldObject& ob, int selected_mat_index_, SignalBlocker b(this->scriptTextEdit); this->scriptTextEdit->setPlainText(QtUtils::toQString(ob.script)); } - { - SignalBlocker b(this->contentTextEdit); - this->contentTextEdit->setPlainText(QtUtils::toQString(ob.content)); - } - { - SignalBlocker b(this->targetURLLineEdit); - this->targetURLLineEdit->setText(QtUtils::toQString(ob.target_url)); + { + SignalBlocker b(this->contentTextEdit); + this->contentTextEdit->setPlainText(QtUtils::toQString(ob.content)); + } + { + SignalBlocker b(this->fontComboBox); + const int font_index = this->fontComboBox->findData(QtUtils::toQString(ob.text_font)); + if(font_index >= 0) + this->fontComboBox->setCurrentIndex(font_index); + else + this->fontComboBox->setCurrentIndex(0); + this->selected_font_name = fontNameForComboIndex(this->fontComboBox, this->fontComboBox->currentIndex()); + } + { + SignalBlocker b(this->targetURLLineEdit); + this->targetURLLineEdit->setText(QtUtils::toQString(ob.target_url)); } this->posXDoubleSpinBox->setEnabled(true); @@ -490,14 +541,27 @@ void ObjectEditor::toObject(WorldObject& ob_out) ob_out.script = new_script; checkStringSize(ob_out.script, WorldObject::MAX_SCRIPT_SIZE); - const std::string new_content = QtUtils::toIndString(this->contentTextEdit->toPlainText()); - if(ob_out.content != new_content) - ob_out.changed_flags |= WorldObject::CONTENT_CHANGED; - ob_out.content = new_content; - checkStringSize(ob_out.content, WorldObject::MAX_CONTENT_SIZE); - - ob_out.target_url = QtUtils::toIndString(this->targetURLLineEdit->text()); - checkStringSize(ob_out.target_url, WorldObject::MAX_URL_SIZE); + const std::string new_content = QtUtils::toIndString(this->contentTextEdit->toPlainText()); + if(ob_out.content != new_content) + ob_out.changed_flags |= WorldObject::CONTENT_CHANGED; + ob_out.content = new_content; + checkStringSize(ob_out.content, WorldObject::MAX_CONTENT_SIZE); + + if(text_font_feature_supported) + { + QString resolved_font_name = this->selected_font_name; + if(resolved_font_name.isEmpty()) + resolved_font_name = fontNameForComboIndex(this->fontComboBox, this->fontComboBox->currentIndex()); + + const std::string new_text_font = QtUtils::toIndString(resolved_font_name); + if(ob_out.text_font != new_text_font) + ob_out.changed_flags |= WorldObject::TEXT_FONT_CHANGED; + ob_out.text_font = new_text_font; + checkStringSize(ob_out.text_font, WorldObject::MAX_FONT_NAME_SIZE); + } + + ob_out.target_url = QtUtils::toIndString(this->targetURLLineEdit->text()); + checkStringSize(ob_out.target_url, WorldObject::MAX_URL_SIZE); writeTransformMembersToObject(ob_out); // Set ob_out transform members @@ -682,12 +746,14 @@ void ObjectEditor::setControlsEnabled(bool enabled) } -void ObjectEditor::setControlsEditable(bool editable) -{ - this->modelFileSelectWidget->setReadOnly(!editable); - this->scriptTextEdit->setReadOnly(!editable); - this->contentTextEdit->setReadOnly(!editable); - this->targetURLLineEdit->setReadOnly(!editable); +void ObjectEditor::setControlsEditable(bool editable) +{ + this->controls_editable = editable; + this->modelFileSelectWidget->setReadOnly(!editable); + this->scriptTextEdit->setReadOnly(!editable); + this->contentTextEdit->setReadOnly(!editable); + this->fontComboBox->setEnabled(editable && text_font_feature_supported); + this->targetURLLineEdit->setReadOnly(!editable); this->posXDoubleSpinBox->setReadOnly(!editable); this->posYDoubleSpinBox->setReadOnly(!editable); @@ -712,9 +778,22 @@ void ObjectEditor::setControlsEditable(bool editable) this->bakeLightmapHighQualPushButton->setEnabled(editable); this->removeLightmapPushButton->setEnabled(editable); - this->audioFileWidget->setReadOnly(!editable); - this->volumeDoubleSpinBox->setReadOnly(!editable); -} + this->audioFileWidget->setReadOnly(!editable); + this->volumeDoubleSpinBox->setReadOnly(!editable); +} + + +void ObjectEditor::setTextFontFeatureSupported(bool supported) +{ + this->text_font_feature_supported = supported; + this->fontComboBox->setEnabled(this->controls_editable && supported); + + const QString tooltip = supported ? + QString() : + QString("This server does not support text font selection yet. Requires server protocol version 50 or newer."); + this->fontComboBox->setToolTip(tooltip); + this->fontLabel->setToolTip(tooltip); +} void ObjectEditor::on_visitURLLabel_linkActivated(const QString&) @@ -995,9 +1074,9 @@ void ObjectEditor::updateSpotlightColourButton() } -void ObjectEditor::on_spotlightColourPushButton_clicked(bool checked) -{ - const QColor initial_col(qRgba( +void ObjectEditor::on_spotlightColourPushButton_clicked(bool checked) +{ + const QColor initial_col(qRgba( (int)(spotlight_col.r * 255), (int)(spotlight_col.g * 255), (int)(spotlight_col.b * 255), @@ -1016,6 +1095,64 @@ void ObjectEditor::on_spotlightColourPushButton_clicked(bool checked) updateSpotlightColourButton(); - emit objectChanged(); - } -} + emit objectChanged(); + } +} + + +void ObjectEditor::onFontChanged(int index) +{ + if(!text_font_feature_supported) + return; + + this->selected_font_name = fontNameForComboIndex(this->fontComboBox, index); + emit objectChanged(); +} + + +void ObjectEditor::loadAvailableFonts() +{ + this->fontComboBox->clear(); + this->fontComboBox->addItem("Default", "Default"); + this->selected_font_name = "Default"; + + QStringList candidate_dirs; + if(!this->base_dir_path.empty()) + { + const QString base_dir = QtUtils::toQString(this->base_dir_path); + candidate_dirs << (base_dir + "/data/resources/fonts"); + candidate_dirs << (base_dir + "/resources/fonts"); + } + + candidate_dirs << "./resources/fonts"; + candidate_dirs << "resources/fonts"; + candidate_dirs << "../resources/fonts"; + candidate_dirs << "../../resources/fonts"; + candidate_dirs << "C:/programming/substrata/resources/fonts"; + + for(int i=0; ifontComboBox->findData(font_name) >= 0)) + continue; + + this->fontComboBox->addItem(font_name, font_name); + found_any = true; + } + + if(found_any) + break; + } +} diff --git a/gui_client/ObjectEditor.h b/gui_client/ObjectEditor.h index 147971f7f..b1252ca92 100644 --- a/gui_client/ObjectEditor.h +++ b/gui_client/ObjectEditor.h @@ -45,9 +45,10 @@ class ObjectEditor : public QWidget, public Ui::ObjectEditor void objectPickedUp(); void objectDropped(); - void setControlsEnabled(bool enabled); - - void setControlsEditable(bool editable); + void setControlsEnabled(bool enabled); + + void setControlsEditable(bool editable); + void setTextFontFeatureSupported(bool supported); int getSelectedMatIndex() const { return selected_mat_index; } @@ -86,16 +87,18 @@ private slots: void editTimerTimeout(); void xScaleChanged(double val); void yScaleChanged(double val); - void zScaleChanged(double val); - void linkScaleCheckBoxToggled(bool val); - void on_spotlightColourPushButton_clicked(bool checked); - -private: - void updateInfoLabel(const WorldObject& ob); - void updateSpotlightColourButton(); - // Store a cloned copy of the materials. - // The reason for having this is so if the user selected another material, - // we can display it, without needing to hang on to a reference to the original world object. + void zScaleChanged(double val); + void linkScaleCheckBoxToggled(bool val); + void on_spotlightColourPushButton_clicked(bool checked); + void onFontChanged(int index); + +private: + void updateInfoLabel(const WorldObject& ob); + void updateSpotlightColourButton(); + void loadAvailableFonts(); + // Store a cloned copy of the materials. + // The reason for having this is so if the user selected another material, + // we can display it, without needing to hang on to a reference to the original world object. std::vector cloned_materials; UID editing_ob_uid; @@ -105,11 +108,14 @@ private slots: ShaderEditorDialog* shader_editor; - // Store the ratios between the scale components, used when link-scales is enabled. - // Store ratios instead of individual values, as this allows us to preserve the rations if the scales are set to zero at some point. - double last_x_scale_over_z_scale; - double last_x_scale_over_y_scale; - double last_y_scale_over_z_scale; - - Colour3f spotlight_col; -}; + // Store the ratios between the scale components, used when link-scales is enabled. + // Store ratios instead of individual values, as this allows us to preserve the rations if the scales are set to zero at some point. + double last_x_scale_over_z_scale; + double last_x_scale_over_y_scale; + double last_y_scale_over_z_scale; + QString selected_font_name; + bool controls_editable; + bool text_font_feature_supported; + + Colour3f spotlight_col; +}; diff --git a/gui_client/ObjectEditor.ui b/gui_client/ObjectEditor.ui index ffc5e7fe6..d5fb7ed91 100644 --- a/gui_client/ObjectEditor.ui +++ b/gui_client/ObjectEditor.ui @@ -457,20 +457,30 @@ - - - - Target URL - - - - - - - - - - <a href="#boo">Open URL in web browser</a> + + + + Font + + + + + + + + + + Target URL + + + + + + + + + + <a href="#boo">Open URL in web browser</a> diff --git a/gui_client/SDLClient.cpp b/gui_client/SDLClient.cpp index 1f2b0e937..10cc189a5 100644 --- a/gui_client/SDLClient.cpp +++ b/gui_client/SDLClient.cpp @@ -43,10 +43,11 @@ Copyright Glare Technologies Limited 2024 - #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include +#include #if EMSCRIPTEN #include #include @@ -169,14 +170,28 @@ Reference CPU_render_stats_widget; Reference GPU_render_stats_widget; -static double cur_canvas_css_W = 800; // Current device-independent pixel width. Canvas element css width in WebGL. -static double cur_canvas_css_H = 800; - -#if EMSCRIPTEN - -// Define getLocationHost() function -EM_JS(char*, getLocationHost, (), { - return stringToNewUTF8(window.location.host); +static double cur_canvas_css_W = 800; // Current device-independent pixel width. Canvas element css width in WebGL. +static double cur_canvas_css_H = 800; + +#if EMSCRIPTEN + +static std::string firstExistingFontPathOrFallback(std::initializer_list candidate_paths) +{ + for(const char* candidate : candidate_paths) + { + if(FileUtils::fileExists(candidate)) + return candidate; + } + + if(candidate_paths.size() == 0) + return std::string(); + + return *candidate_paths.begin(); +} + +// Define getLocationHost() function +EM_JS(char*, getLocationHost, (), { + return stringToNewUTF8(window.location.host); }); // Define getLocationPathname() function @@ -266,17 +281,35 @@ int main(int argc, char** argv) #endif // NOTE: this code is also in MainWindow.cpp -#if defined(_WIN32) - const std::string font_path = PlatformUtils::getFontsDirPath() + "/Segoeui.ttf"; // SegoeUI is shipped with Windows 7 onwards: https://learn.microsoft.com/en-us/typography/fonts/windows_7_font_list - const std::string emoji_font_path = PlatformUtils::getFontsDirPath() + "/Seguiemj.ttf"; -#elif defined(__APPLE__) - const std::string font_path = "/System/Library/Fonts/SFNS.ttf"; - const std::string emoji_font_path = "/System/Library/Fonts/SFNS.ttf"; -#else - // Linux: - const std::string font_path = base_dir + "/data/resources/TruenoLight-E2pg.otf"; - const std::string emoji_font_path = base_dir + "/data/resources/TruenoLight-E2pg.otf"; -#endif +#if defined(_WIN32) + const std::string font_path = PlatformUtils::getFontsDirPath() + "/Segoeui.ttf"; // SegoeUI is shipped with Windows 7 onwards: https://learn.microsoft.com/en-us/typography/fonts/windows_7_font_list + const std::string emoji_font_path = PlatformUtils::getFontsDirPath() + "/Seguiemj.ttf"; +#elif defined(__APPLE__) + const std::string font_path = "/System/Library/Fonts/SFNS.ttf"; + const std::string emoji_font_path = "/System/Library/Fonts/SFNS.ttf"; +#elif defined(EMSCRIPTEN) + // Use a font with Cyrillic glyph coverage for webclient UI strings. + const std::string font_path = firstExistingFontPathOrFallback({ + "/data/resources/Roboto-Regular.ttf", + "data/resources/Roboto-Regular.ttf", + "./data/resources/Roboto-Regular.ttf" + }); + const std::string emoji_font_path = firstExistingFontPathOrFallback({ + "/data/resources/NotoColorEmoji_WindowsCompatible.ttf", + "/data/resources/NotoColorEmoji.ttf", + "data/resources/NotoColorEmoji_WindowsCompatible.ttf", + "data/resources/NotoColorEmoji.ttf", + "./data/resources/NotoColorEmoji_WindowsCompatible.ttf", + "./data/resources/NotoColorEmoji.ttf", + "/data/resources/Roboto-Regular.ttf", + "data/resources/Roboto-Regular.ttf", + "./data/resources/Roboto-Regular.ttf" + }); +#else + // Linux: + const std::string font_path = base_dir + "/data/resources/TruenoLight-E2pg.otf"; + const std::string emoji_font_path = base_dir + "/data/resources/TruenoLight-E2pg.otf"; +#endif TextRendererRef text_renderer = new TextRenderer(); diff --git a/resources/NotoColorEmoji_LICENSE.txt b/resources/NotoColorEmoji_LICENSE.txt new file mode 100644 index 000000000..d952d62c0 --- /dev/null +++ b/resources/NotoColorEmoji_LICENSE.txt @@ -0,0 +1,92 @@ +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/resources/NotoColorEmoji_WindowsCompatible.ttf b/resources/NotoColorEmoji_WindowsCompatible.ttf new file mode 100644 index 000000000..d51e33eb8 Binary files /dev/null and b/resources/NotoColorEmoji_WindowsCompatible.ttf differ diff --git a/resources/fonts/AAHaymaker.woff b/resources/fonts/AAHaymaker.woff new file mode 100644 index 000000000..45e02c0b6 Binary files /dev/null and b/resources/fonts/AAHaymaker.woff differ diff --git a/resources/fonts/AAHigherup.woff b/resources/fonts/AAHigherup.woff new file mode 100644 index 000000000..8eea2cd7b Binary files /dev/null and b/resources/fonts/AAHigherup.woff differ diff --git a/resources/fonts/AAMagnum.woff b/resources/fonts/AAMagnum.woff new file mode 100644 index 000000000..321d18f76 Binary files /dev/null and b/resources/fonts/AAMagnum.woff differ diff --git a/resources/fonts/AANeon.woff b/resources/fonts/AANeon.woff new file mode 100644 index 000000000..6872bf984 Binary files /dev/null and b/resources/fonts/AANeon.woff differ diff --git a/resources/fonts/ABRegular.woff b/resources/fonts/ABRegular.woff new file mode 100644 index 000000000..a6b290cc5 Binary files /dev/null and b/resources/fonts/ABRegular.woff differ diff --git a/resources/fonts/ACampus.woff b/resources/fonts/ACampus.woff new file mode 100644 index 000000000..405c0e6a1 Binary files /dev/null and b/resources/fonts/ACampus.woff differ diff --git a/resources/fonts/ACampusGravBold.woff b/resources/fonts/ACampusGravBold.woff new file mode 100644 index 000000000..af3d74b80 Binary files /dev/null and b/resources/fonts/ACampusGravBold.woff differ diff --git a/resources/fonts/ARCH2.woff b/resources/fonts/ARCH2.woff new file mode 100644 index 000000000..a6dd36ea5 Binary files /dev/null and b/resources/fonts/ARCH2.woff differ diff --git a/resources/fonts/AWithSerifs.woff b/resources/fonts/AWithSerifs.woff new file mode 100644 index 000000000..e56fdd5b3 Binary files /dev/null and b/resources/fonts/AWithSerifs.woff differ diff --git a/resources/fonts/AdLibWin95BT.woff b/resources/fonts/AdLibWin95BT.woff new file mode 100644 index 000000000..6d3da8dfb Binary files /dev/null and b/resources/fonts/AdLibWin95BT.woff differ diff --git a/resources/fonts/AeroMaticsStencil.woff b/resources/fonts/AeroMaticsStencil.woff new file mode 100644 index 000000000..47b723a34 Binary files /dev/null and b/resources/fonts/AeroMaticsStencil.woff differ diff --git a/resources/fonts/Alabama.woff b/resources/fonts/Alabama.woff new file mode 100644 index 000000000..59faee8a9 Binary files /dev/null and b/resources/fonts/Alabama.woff differ diff --git a/resources/fonts/AlbertusMedium.woff b/resources/fonts/AlbertusMedium.woff new file mode 100644 index 000000000..f3f756de2 Binary files /dev/null and b/resources/fonts/AlbertusMedium.woff differ diff --git a/resources/fonts/AlbionicTitulInfl.woff b/resources/fonts/AlbionicTitulInfl.woff new file mode 100644 index 000000000..8fc0bb3b3 Binary files /dev/null and b/resources/fonts/AlbionicTitulInfl.woff differ diff --git a/resources/fonts/AleksandraC.woff b/resources/fonts/AleksandraC.woff new file mode 100644 index 000000000..d4d625d6e Binary files /dev/null and b/resources/fonts/AleksandraC.woff differ diff --git a/resources/fonts/Alfavita.woff b/resources/fonts/Alfavita.woff new file mode 100644 index 000000000..e0a317e13 Binary files /dev/null and b/resources/fonts/Alfavita.woff differ diff --git a/resources/fonts/Alice.woff b/resources/fonts/Alice.woff new file mode 100644 index 000000000..15d000868 Binary files /dev/null and b/resources/fonts/Alice.woff differ diff --git a/resources/fonts/AmericanCaptain.woff b/resources/fonts/AmericanCaptain.woff new file mode 100644 index 000000000..62c804549 Binary files /dev/null and b/resources/fonts/AmericanCaptain.woff differ diff --git a/resources/fonts/AmericanRetro.woff b/resources/fonts/AmericanRetro.woff new file mode 100644 index 000000000..8bf26db18 Binary files /dev/null and b/resources/fonts/AmericanRetro.woff differ diff --git a/resources/fonts/AmericanTextC.woff b/resources/fonts/AmericanTextC.woff new file mode 100644 index 000000000..e2ce0f5c2 Binary files /dev/null and b/resources/fonts/AmericanTextC.woff differ diff --git a/resources/fonts/Amore.woff b/resources/fonts/Amore.woff new file mode 100644 index 000000000..bb8e0273d Binary files /dev/null and b/resources/fonts/Amore.woff differ diff --git a/resources/fonts/Amphi.woff b/resources/fonts/Amphi.woff new file mode 100644 index 000000000..2fe035b56 Binary files /dev/null and b/resources/fonts/Amphi.woff differ diff --git a/resources/fonts/AnfisaGrotesk.woff b/resources/fonts/AnfisaGrotesk.woff new file mode 100644 index 000000000..dd4c0a930 Binary files /dev/null and b/resources/fonts/AnfisaGrotesk.woff differ diff --git a/resources/fonts/AngryBirds.woff b/resources/fonts/AngryBirds.woff new file mode 100644 index 000000000..19090a7f6 Binary files /dev/null and b/resources/fonts/AngryBirds.woff differ diff --git a/resources/fonts/Annabelle.woff b/resources/fonts/Annabelle.woff new file mode 100644 index 000000000..7e2039bc3 Binary files /dev/null and b/resources/fonts/Annabelle.woff differ diff --git a/resources/fonts/Arcadia-Bold.woff b/resources/fonts/Arcadia-Bold.woff new file mode 100644 index 000000000..13bad399a Binary files /dev/null and b/resources/fonts/Arcadia-Bold.woff differ diff --git a/resources/fonts/Archangelsk.woff b/resources/fonts/Archangelsk.woff new file mode 100644 index 000000000..7ce48c158 Binary files /dev/null and b/resources/fonts/Archangelsk.woff differ diff --git a/resources/fonts/ArciformSans.woff b/resources/fonts/ArciformSans.woff new file mode 100644 index 000000000..422be9069 Binary files /dev/null and b/resources/fonts/ArciformSans.woff differ diff --git a/resources/fonts/Arctikascript.woff b/resources/fonts/Arctikascript.woff new file mode 100644 index 000000000..0a065e92d Binary files /dev/null and b/resources/fonts/Arctikascript.woff differ diff --git a/resources/fonts/ArianGrqi.woff b/resources/fonts/ArianGrqi.woff new file mode 100644 index 000000000..c3cdeb4c3 Binary files /dev/null and b/resources/fonts/ArianGrqi.woff differ diff --git a/resources/fonts/ArroTerminal.woff b/resources/fonts/ArroTerminal.woff new file mode 100644 index 000000000..123305251 Binary files /dev/null and b/resources/fonts/ArroTerminal.woff differ diff --git a/resources/fonts/ArtDecorina.woff b/resources/fonts/ArtDecorina.woff new file mode 100644 index 000000000..4e5088890 Binary files /dev/null and b/resources/fonts/ArtDecorina.woff differ diff --git a/resources/fonts/ArtemisDeco.woff b/resources/fonts/ArtemisDeco.woff new file mode 100644 index 000000000..d6ffaae1e Binary files /dev/null and b/resources/fonts/ArtemisDeco.woff differ diff --git a/resources/fonts/AstakhovDished.woff b/resources/fonts/AstakhovDished.woff new file mode 100644 index 000000000..b816bd98d Binary files /dev/null and b/resources/fonts/AstakhovDished.woff differ diff --git a/resources/fonts/AstakhovDishedGlamour.woff b/resources/fonts/AstakhovDishedGlamour.woff new file mode 100644 index 000000000..a5c056211 Binary files /dev/null and b/resources/fonts/AstakhovDishedGlamour.woff differ diff --git a/resources/fonts/AstakhovFirst.woff b/resources/fonts/AstakhovFirst.woff new file mode 100644 index 000000000..f9a61a70b Binary files /dev/null and b/resources/fonts/AstakhovFirst.woff differ diff --git a/resources/fonts/AstakhovSkin.woff b/resources/fonts/AstakhovSkin.woff new file mode 100644 index 000000000..e26b5a2ba Binary files /dev/null and b/resources/fonts/AstakhovSkin.woff differ diff --git a/resources/fonts/Astakhovpastel.woff b/resources/fonts/Astakhovpastel.woff new file mode 100644 index 000000000..b7f7537c2 Binary files /dev/null and b/resources/fonts/Astakhovpastel.woff differ diff --git a/resources/fonts/Astakhovvitrage.woff b/resources/fonts/Astakhovvitrage.woff new file mode 100644 index 000000000..1e5c324e1 Binary files /dev/null and b/resources/fonts/Astakhovvitrage.woff differ diff --git a/resources/fonts/Astrocyr.woff b/resources/fonts/Astrocyr.woff new file mode 100644 index 000000000..fe2e74661 Binary files /dev/null and b/resources/fonts/Astrocyr.woff differ diff --git a/resources/fonts/AtibaCyrillic.woff b/resources/fonts/AtibaCyrillic.woff new file mode 100644 index 000000000..42a512850 Binary files /dev/null and b/resources/fonts/AtibaCyrillic.woff differ diff --git a/resources/fonts/Auction.woff b/resources/fonts/Auction.woff new file mode 100644 index 000000000..49fc248c7 Binary files /dev/null and b/resources/fonts/Auction.woff differ diff --git a/resources/fonts/AvdiraR.woff b/resources/fonts/AvdiraR.woff new file mode 100644 index 000000000..fb2f2cd08 Binary files /dev/null and b/resources/fonts/AvdiraR.woff differ diff --git a/resources/fonts/B52.woff b/resources/fonts/B52.woff new file mode 100644 index 000000000..be3f6db12 Binary files /dev/null and b/resources/fonts/B52.woff differ diff --git a/resources/fonts/BIP.woff b/resources/fonts/BIP.woff new file mode 100644 index 000000000..0a414b643 Binary files /dev/null and b/resources/fonts/BIP.woff differ diff --git a/resources/fonts/BMspiral.woff b/resources/fonts/BMspiral.woff new file mode 100644 index 000000000..311525fe8 Binary files /dev/null and b/resources/fonts/BMspiral.woff differ diff --git a/resources/fonts/BadaBoomBB.woff b/resources/fonts/BadaBoomBB.woff new file mode 100644 index 000000000..20c325584 Binary files /dev/null and b/resources/fonts/BadaBoomBB.woff differ diff --git a/resources/fonts/Balloon.woff b/resources/fonts/Balloon.woff new file mode 100644 index 000000000..13a55c522 Binary files /dev/null and b/resources/fonts/Balloon.woff differ diff --git a/resources/fonts/BalloonXBd.woff b/resources/fonts/BalloonXBd.woff new file mode 100644 index 000000000..3c96a05c0 Binary files /dev/null and b/resources/fonts/BalloonXBd.woff differ diff --git a/resources/fonts/BangWhackPow.woff b/resources/fonts/BangWhackPow.woff new file mode 100644 index 000000000..e190916c0 Binary files /dev/null and b/resources/fonts/BangWhackPow.woff differ diff --git a/resources/fonts/BatmanForever.woff b/resources/fonts/BatmanForever.woff new file mode 100644 index 000000000..c90438fe6 Binary files /dev/null and b/resources/fonts/BatmanForever.woff differ diff --git a/resources/fonts/BeastVsButtercrumb.woff b/resources/fonts/BeastVsButtercrumb.woff new file mode 100644 index 000000000..ccab86987 Binary files /dev/null and b/resources/fonts/BeastVsButtercrumb.woff differ diff --git a/resources/fonts/Bedrock.woff b/resources/fonts/Bedrock.woff new file mode 100644 index 000000000..842c4854b Binary files /dev/null and b/resources/fonts/Bedrock.woff differ diff --git a/resources/fonts/BedrockC.woff b/resources/fonts/BedrockC.woff new file mode 100644 index 000000000..393bb41a2 Binary files /dev/null and b/resources/fonts/BedrockC.woff differ diff --git a/resources/fonts/Bicubik.woff b/resources/fonts/Bicubik.woff new file mode 100644 index 000000000..77aea3a80 Binary files /dev/null and b/resources/fonts/Bicubik.woff differ diff --git a/resources/fonts/BirchCTT.woff b/resources/fonts/BirchCTT.woff new file mode 100644 index 000000000..bb392b3ab Binary files /dev/null and b/resources/fonts/BirchCTT.woff differ diff --git a/resources/fonts/Birusa.woff b/resources/fonts/Birusa.woff new file mode 100644 index 000000000..0b359d1d5 Binary files /dev/null and b/resources/fonts/Birusa.woff differ diff --git a/resources/fonts/Bistroc.woff b/resources/fonts/Bistroc.woff new file mode 100644 index 000000000..544b86d3a Binary files /dev/null and b/resources/fonts/Bistroc.woff differ diff --git a/resources/fonts/BloggerSans-Bold.woff b/resources/fonts/BloggerSans-Bold.woff new file mode 100644 index 000000000..89c77702b Binary files /dev/null and b/resources/fonts/BloggerSans-Bold.woff differ diff --git a/resources/fonts/Boomboom.woff b/resources/fonts/Boomboom.woff new file mode 100644 index 000000000..4254dae00 Binary files /dev/null and b/resources/fonts/Boomboom.woff differ diff --git a/resources/fonts/Bough.woff b/resources/fonts/Bough.woff new file mode 100644 index 000000000..c7633a4a1 Binary files /dev/null and b/resources/fonts/Bough.woff differ diff --git a/resources/fonts/Brandbe.woff b/resources/fonts/Brandbe.woff new file mode 100644 index 000000000..be223d6c0 Binary files /dev/null and b/resources/fonts/Brandbe.woff differ diff --git a/resources/fonts/Breeze.woff b/resources/fonts/Breeze.woff new file mode 100644 index 000000000..8b41d4e15 Binary files /dev/null and b/resources/fonts/Breeze.woff differ diff --git a/resources/fonts/Buccaneer.woff b/resources/fonts/Buccaneer.woff new file mode 100644 index 000000000..fb83214e5 Binary files /dev/null and b/resources/fonts/Buccaneer.woff differ diff --git a/resources/fonts/BudmoJigglerCyr.woff b/resources/fonts/BudmoJigglerCyr.woff new file mode 100644 index 000000000..8cdeb2e92 Binary files /dev/null and b/resources/fonts/BudmoJigglerCyr.woff differ diff --git a/resources/fonts/CCAdamKubert.woff b/resources/fonts/CCAdamKubert.woff new file mode 100644 index 000000000..b39ea164c Binary files /dev/null and b/resources/fonts/CCAdamKubert.woff differ diff --git a/resources/fonts/COLORADOIII.woff b/resources/fonts/COLORADOIII.woff new file mode 100644 index 000000000..ae97022c0 Binary files /dev/null and b/resources/fonts/COLORADOIII.woff differ diff --git a/resources/fonts/COLORADOIOI.woff b/resources/fonts/COLORADOIOI.woff new file mode 100644 index 000000000..24db616a7 Binary files /dev/null and b/resources/fonts/COLORADOIOI.woff differ diff --git a/resources/fonts/COLORADOX.woff b/resources/fonts/COLORADOX.woff new file mode 100644 index 000000000..09cf89c57 Binary files /dev/null and b/resources/fonts/COLORADOX.woff differ diff --git a/resources/fonts/CTCSplashRounded.woff b/resources/fonts/CTCSplashRounded.woff new file mode 100644 index 000000000..b1a51646a Binary files /dev/null and b/resources/fonts/CTCSplashRounded.woff differ diff --git a/resources/fonts/Calligraph.woff b/resources/fonts/Calligraph.woff new file mode 100644 index 000000000..1c881728e Binary files /dev/null and b/resources/fonts/Calligraph.woff differ diff --git a/resources/fonts/Campanella.woff b/resources/fonts/Campanella.woff new file mode 100644 index 000000000..7e6b5b868 Binary files /dev/null and b/resources/fonts/Campanella.woff differ diff --git a/resources/fonts/CaptchaCode.woff b/resources/fonts/CaptchaCode.woff new file mode 100644 index 000000000..81bd4780f Binary files /dev/null and b/resources/fonts/CaptchaCode.woff differ diff --git a/resources/fonts/Cassandra.woff b/resources/fonts/Cassandra.woff new file mode 100644 index 000000000..0568514f3 Binary files /dev/null and b/resources/fonts/Cassandra.woff differ diff --git a/resources/fonts/CaviarDreams.woff b/resources/fonts/CaviarDreams.woff new file mode 100644 index 000000000..eea9936fd Binary files /dev/null and b/resources/fonts/CaviarDreams.woff differ diff --git a/resources/fonts/CellblockNBP.woff b/resources/fonts/CellblockNBP.woff new file mode 100644 index 000000000..9565190ef Binary files /dev/null and b/resources/fonts/CellblockNBP.woff differ diff --git a/resources/fonts/CgFiorello.woff b/resources/fonts/CgFiorello.woff new file mode 100644 index 000000000..09db8cb4f Binary files /dev/null and b/resources/fonts/CgFiorello.woff differ diff --git a/resources/fonts/ChaLimousines.woff b/resources/fonts/ChaLimousines.woff new file mode 100644 index 000000000..6fbf1aaee Binary files /dev/null and b/resources/fonts/ChaLimousines.woff differ diff --git a/resources/fonts/Chibola.woff b/resources/fonts/Chibola.woff new file mode 100644 index 000000000..ee2af59e0 Binary files /dev/null and b/resources/fonts/Chibola.woff differ diff --git a/resources/fonts/ChinaCyr.woff b/resources/fonts/ChinaCyr.woff new file mode 100644 index 000000000..d1ea87283 Binary files /dev/null and b/resources/fonts/ChinaCyr.woff differ diff --git a/resources/fonts/Chocogirl.woff b/resources/fonts/Chocogirl.woff new file mode 100644 index 000000000..a7f141306 Binary files /dev/null and b/resources/fonts/Chocogirl.woff differ diff --git a/resources/fonts/Chocolate.woff b/resources/fonts/Chocolate.woff new file mode 100644 index 000000000..528be192e Binary files /dev/null and b/resources/fonts/Chocolate.woff differ diff --git a/resources/fonts/Citrica.woff b/resources/fonts/Citrica.woff new file mode 100644 index 000000000..b712dd915 Binary files /dev/null and b/resources/fonts/Citrica.woff differ diff --git a/resources/fonts/CitricaCyrillic.woff b/resources/fonts/CitricaCyrillic.woff new file mode 100644 index 000000000..c652a6394 Binary files /dev/null and b/resources/fonts/CitricaCyrillic.woff differ diff --git a/resources/fonts/ClobberinTime.woff b/resources/fonts/ClobberinTime.woff new file mode 100644 index 000000000..3bcf3b1e6 Binary files /dev/null and b/resources/fonts/ClobberinTime.woff differ diff --git a/resources/fonts/CocaCola.woff b/resources/fonts/CocaCola.woff new file mode 100644 index 000000000..04e4b607c Binary files /dev/null and b/resources/fonts/CocaCola.woff differ diff --git a/resources/fonts/ColumnSimple.woff b/resources/fonts/ColumnSimple.woff new file mode 100644 index 000000000..6bc3b4e79 Binary files /dev/null and b/resources/fonts/ColumnSimple.woff differ diff --git a/resources/fonts/Comfortaa.woff b/resources/fonts/Comfortaa.woff new file mode 100644 index 000000000..26ed0e27e Binary files /dev/null and b/resources/fonts/Comfortaa.woff differ diff --git a/resources/fonts/ComicSansMS.woff b/resources/fonts/ComicSansMS.woff new file mode 100644 index 000000000..36b609316 Binary files /dev/null and b/resources/fonts/ComicSansMS.woff differ diff --git a/resources/fonts/CompoShadow.woff b/resources/fonts/CompoShadow.woff new file mode 100644 index 000000000..2df2df999 Binary files /dev/null and b/resources/fonts/CompoShadow.woff differ diff --git a/resources/fonts/Conkordia.woff b/resources/fonts/Conkordia.woff new file mode 100644 index 000000000..76f56eac6 Binary files /dev/null and b/resources/fonts/Conkordia.woff differ diff --git a/resources/fonts/ConnieRegular.woff b/resources/fonts/ConnieRegular.woff new file mode 100644 index 000000000..556346c01 Binary files /dev/null and b/resources/fonts/ConnieRegular.woff differ diff --git a/resources/fonts/Corinthia.woff b/resources/fonts/Corinthia.woff new file mode 100644 index 000000000..54a866e78 Binary files /dev/null and b/resources/fonts/Corinthia.woff differ diff --git a/resources/fonts/CricketNormal.woff b/resources/fonts/CricketNormal.woff new file mode 100644 index 000000000..5c8aa6a35 Binary files /dev/null and b/resources/fonts/CricketNormal.woff differ diff --git a/resources/fonts/Cyberfall.woff b/resources/fonts/Cyberfall.woff new file mode 100644 index 000000000..e4697f7b6 Binary files /dev/null and b/resources/fonts/Cyberfall.woff differ diff --git a/resources/fonts/DKBlackBamboo.woff b/resources/fonts/DKBlackBamboo.woff new file mode 100644 index 000000000..0ce0231da Binary files /dev/null and b/resources/fonts/DKBlackBamboo.woff differ diff --git a/resources/fonts/DSCoptic.woff b/resources/fonts/DSCoptic.woff new file mode 100644 index 000000000..4d59e6f31 Binary files /dev/null and b/resources/fonts/DSCoptic.woff differ diff --git a/resources/fonts/DSRabbit.woff b/resources/fonts/DSRabbit.woff new file mode 100644 index 000000000..5c5f1cd51 Binary files /dev/null and b/resources/fonts/DSRabbit.woff differ diff --git a/resources/fonts/DSStamper.woff b/resources/fonts/DSStamper.woff new file mode 100644 index 000000000..44410ae5d Binary files /dev/null and b/resources/fonts/DSStamper.woff differ diff --git a/resources/fonts/DSSupervixenCyr.woff b/resources/fonts/DSSupervixenCyr.woff new file mode 100644 index 000000000..63af5458d Binary files /dev/null and b/resources/fonts/DSSupervixenCyr.woff differ diff --git a/resources/fonts/DarthEmil.woff b/resources/fonts/DarthEmil.woff new file mode 100644 index 000000000..3eded66c5 Binary files /dev/null and b/resources/fonts/DarthEmil.woff differ diff --git a/resources/fonts/DeusEx.woff b/resources/fonts/DeusEx.woff new file mode 100644 index 000000000..f2e197d14 Binary files /dev/null and b/resources/fonts/DeusEx.woff differ diff --git a/resources/fonts/Dict.woff b/resources/fonts/Dict.woff new file mode 100644 index 000000000..540ee7108 Binary files /dev/null and b/resources/fonts/Dict.woff differ diff --git a/resources/fonts/DisneyPark.woff b/resources/fonts/DisneyPark.woff new file mode 100644 index 000000000..ae35f399c Binary files /dev/null and b/resources/fonts/DisneyPark.woff differ diff --git a/resources/fonts/Dited.woff b/resources/fonts/Dited.woff new file mode 100644 index 000000000..60755b03f Binary files /dev/null and b/resources/fonts/Dited.woff differ diff --git a/resources/fonts/Drina.woff b/resources/fonts/Drina.woff new file mode 100644 index 000000000..b8bcc434f Binary files /dev/null and b/resources/fonts/Drina.woff differ diff --git a/resources/fonts/DsBrushes.woff b/resources/fonts/DsBrushes.woff new file mode 100644 index 000000000..4b0dd34ea Binary files /dev/null and b/resources/fonts/DsBrushes.woff differ diff --git a/resources/fonts/Dsjapancyr.woff b/resources/fonts/Dsjapancyr.woff new file mode 100644 index 000000000..09e0a6fe1 Binary files /dev/null and b/resources/fonts/Dsjapancyr.woff differ diff --git a/resources/fonts/DublonC.woff b/resources/fonts/DublonC.woff new file mode 100644 index 000000000..fe9c280dd Binary files /dev/null and b/resources/fonts/DublonC.woff differ diff --git a/resources/fonts/Durazky.woff b/resources/fonts/Durazky.woff new file mode 100644 index 000000000..66d8c0674 Binary files /dev/null and b/resources/fonts/Durazky.woff differ diff --git a/resources/fonts/ElevatePERSONAL.woff b/resources/fonts/ElevatePERSONAL.woff new file mode 100644 index 000000000..8f7f0f14e Binary files /dev/null and b/resources/fonts/ElevatePERSONAL.woff differ diff --git a/resources/fonts/Elzevir.woff b/resources/fonts/Elzevir.woff new file mode 100644 index 000000000..5c3908fe3 Binary files /dev/null and b/resources/fonts/Elzevir.woff differ diff --git a/resources/fonts/EnchantedLand.woff b/resources/fonts/EnchantedLand.woff new file mode 100644 index 000000000..998523403 Binary files /dev/null and b/resources/fonts/EnchantedLand.woff differ diff --git a/resources/fonts/Epsil.woff b/resources/fonts/Epsil.woff new file mode 100644 index 000000000..38e2cf3c7 Binary files /dev/null and b/resources/fonts/Epsil.woff differ diff --git a/resources/fonts/EskalFont4You.woff b/resources/fonts/EskalFont4You.woff new file mode 100644 index 000000000..6fe63297b Binary files /dev/null and b/resources/fonts/EskalFont4You.woff differ diff --git a/resources/fonts/Etude.woff b/resources/fonts/Etude.woff new file mode 100644 index 000000000..abd22f09b Binary files /dev/null and b/resources/fonts/Etude.woff differ diff --git a/resources/fonts/Euroference.woff b/resources/fonts/Euroference.woff new file mode 100644 index 000000000..a2b146c7d Binary files /dev/null and b/resources/fonts/Euroference.woff differ diff --git a/resources/fonts/Eurotype.woff b/resources/fonts/Eurotype.woff new file mode 100644 index 000000000..cd7b3d8c3 Binary files /dev/null and b/resources/fonts/Eurotype.woff differ diff --git a/resources/fonts/Eyelevation6.woff b/resources/fonts/Eyelevation6.woff new file mode 100644 index 000000000..ab9baa047 Binary files /dev/null and b/resources/fonts/Eyelevation6.woff differ diff --git a/resources/fonts/Fabryka4F.woff b/resources/fonts/Fabryka4F.woff new file mode 100644 index 000000000..5f49b6c11 Binary files /dev/null and b/resources/fonts/Fabryka4F.woff differ diff --git a/resources/fonts/Federico.woff b/resources/fonts/Federico.woff new file mode 100644 index 000000000..37b610182 Binary files /dev/null and b/resources/fonts/Federico.woff differ diff --git a/resources/fonts/Flow.woff b/resources/fonts/Flow.woff new file mode 100644 index 000000000..8ca5e9ff7 Binary files /dev/null and b/resources/fonts/Flow.woff differ diff --git a/resources/fonts/Flowerchild.woff b/resources/fonts/Flowerchild.woff new file mode 100644 index 000000000..fb6151cb8 Binary files /dev/null and b/resources/fonts/Flowerchild.woff differ diff --git a/resources/fonts/FloydianCyr.woff b/resources/fonts/FloydianCyr.woff new file mode 100644 index 000000000..2dce9cffd Binary files /dev/null and b/resources/fonts/FloydianCyr.woff differ diff --git a/resources/fonts/FreakomixbyAvdo.woff b/resources/fonts/FreakomixbyAvdo.woff new file mode 100644 index 000000000..e14a37fdd Binary files /dev/null and b/resources/fonts/FreakomixbyAvdo.woff differ diff --git a/resources/fonts/Friends.woff b/resources/fonts/Friends.woff new file mode 100644 index 000000000..cf223927f Binary files /dev/null and b/resources/fonts/Friends.woff differ diff --git a/resources/fonts/Furore.woff b/resources/fonts/Furore.woff new file mode 100644 index 000000000..d056588df Binary files /dev/null and b/resources/fonts/Furore.woff differ diff --git a/resources/fonts/FuturaRoundTi.woff b/resources/fonts/FuturaRoundTi.woff new file mode 100644 index 000000000..0ffcdcb24 Binary files /dev/null and b/resources/fonts/FuturaRoundTi.woff differ diff --git a/resources/fonts/GOSTtypeA.woff b/resources/fonts/GOSTtypeA.woff new file mode 100644 index 000000000..71bb0fe61 Binary files /dev/null and b/resources/fonts/GOSTtypeA.woff differ diff --git a/resources/fonts/GTAPricedown.woff b/resources/fonts/GTAPricedown.woff new file mode 100644 index 000000000..f35bd5ec0 Binary files /dev/null and b/resources/fonts/GTAPricedown.woff differ diff --git a/resources/fonts/Gagalin.woff b/resources/fonts/Gagalin.woff new file mode 100644 index 000000000..1e8b2295d Binary files /dev/null and b/resources/fonts/Gagalin.woff differ diff --git a/resources/fonts/GlideSketch.woff b/resources/fonts/GlideSketch.woff new file mode 100644 index 000000000..a2c38442e Binary files /dev/null and b/resources/fonts/GlideSketch.woff differ diff --git a/resources/fonts/Goose.woff b/resources/fonts/Goose.woff new file mode 100644 index 000000000..fe0794b59 Binary files /dev/null and b/resources/fonts/Goose.woff differ diff --git a/resources/fonts/Gramoclericton.woff b/resources/fonts/Gramoclericton.woff new file mode 100644 index 000000000..ba7d5d047 Binary files /dev/null and b/resources/fonts/Gramoclericton.woff differ diff --git a/resources/fonts/Grishenko.woff b/resources/fonts/Grishenko.woff new file mode 100644 index 000000000..fc044f40a Binary files /dev/null and b/resources/fonts/Grishenko.woff differ diff --git a/resources/fonts/Hardpixel.woff b/resources/fonts/Hardpixel.woff new file mode 100644 index 000000000..53be18abc Binary files /dev/null and b/resources/fonts/Hardpixel.woff differ diff --git a/resources/fonts/HarryPotter.woff b/resources/fonts/HarryPotter.woff new file mode 100644 index 000000000..5341f30f7 Binary files /dev/null and b/resources/fonts/HarryPotter.woff differ diff --git a/resources/fonts/Hauptbahnhof.woff b/resources/fonts/Hauptbahnhof.woff new file mode 100644 index 000000000..df87c49a9 Binary files /dev/null and b/resources/fonts/Hauptbahnhof.woff differ diff --git a/resources/fonts/HelveticaNeueCyr.woff b/resources/fonts/HelveticaNeueCyr.woff new file mode 100644 index 000000000..d602f21e4 Binary files /dev/null and b/resources/fonts/HelveticaNeueCyr.woff differ diff --git a/resources/fonts/HermannGotisch.woff b/resources/fonts/HermannGotisch.woff new file mode 100644 index 000000000..a5e57b735 Binary files /dev/null and b/resources/fonts/HermannGotisch.woff differ diff --git a/resources/fonts/HondaC.woff b/resources/fonts/HondaC.woff new file mode 100644 index 000000000..abc536723 Binary files /dev/null and b/resources/fonts/HondaC.woff differ diff --git a/resources/fonts/IOCONDIOS.woff b/resources/fonts/IOCONDIOS.woff new file mode 100644 index 000000000..35e556d30 Binary files /dev/null and b/resources/fonts/IOCONDIOS.woff differ diff --git a/resources/fonts/Icekingdom.woff b/resources/fonts/Icekingdom.woff new file mode 100644 index 000000000..2ee7b4e61 Binary files /dev/null and b/resources/fonts/Icekingdom.woff differ diff --git a/resources/fonts/Infinity.woff b/resources/fonts/Infinity.woff new file mode 100644 index 000000000..e5d173d9e Binary files /dev/null and b/resources/fonts/Infinity.woff differ diff --git a/resources/fonts/Inky.woff b/resources/fonts/Inky.woff new file mode 100644 index 000000000..201078bcc Binary files /dev/null and b/resources/fonts/Inky.woff differ diff --git a/resources/fonts/Intruder.woff b/resources/fonts/Intruder.woff new file mode 100644 index 000000000..b754d9ec5 Binary files /dev/null and b/resources/fonts/Intruder.woff differ diff --git a/resources/fonts/IronRussian.woff b/resources/fonts/IronRussian.woff new file mode 100644 index 000000000..dc985bf99 Binary files /dev/null and b/resources/fonts/IronRussian.woff differ diff --git a/resources/fonts/JazzBall.woff b/resources/fonts/JazzBall.woff new file mode 100644 index 000000000..3c9031c6f Binary files /dev/null and b/resources/fonts/JazzBall.woff differ diff --git a/resources/fonts/JuliaScript.woff b/resources/fonts/JuliaScript.woff new file mode 100644 index 000000000..ac6ea21e4 Binary files /dev/null and b/resources/fonts/JuliaScript.woff differ diff --git a/resources/fonts/JuraLight.woff b/resources/fonts/JuraLight.woff new file mode 100644 index 000000000..a3d157d04 Binary files /dev/null and b/resources/fonts/JuraLight.woff differ diff --git a/resources/fonts/KARDONbold.woff b/resources/fonts/KARDONbold.woff new file mode 100644 index 000000000..c25102745 Binary files /dev/null and b/resources/fonts/KARDONbold.woff differ diff --git a/resources/fonts/KBBand.woff b/resources/fonts/KBBand.woff new file mode 100644 index 000000000..075ea3165 Binary files /dev/null and b/resources/fonts/KBBand.woff differ diff --git a/resources/fonts/KBVectroid.woff b/resources/fonts/KBVectroid.woff new file mode 100644 index 000000000..22a658028 Binary files /dev/null and b/resources/fonts/KBVectroid.woff differ diff --git a/resources/fonts/Karmina.woff b/resources/fonts/Karmina.woff new file mode 100644 index 000000000..e928ba34d Binary files /dev/null and b/resources/fonts/Karmina.woff differ diff --git a/resources/fonts/KittyKat.woff b/resources/fonts/KittyKat.woff new file mode 100644 index 000000000..346d669b6 Binary files /dev/null and b/resources/fonts/KittyKat.woff differ diff --git a/resources/fonts/KobzarKS.woff b/resources/fonts/KobzarKS.woff new file mode 100644 index 000000000..f425459c1 Binary files /dev/null and b/resources/fonts/KobzarKS.woff differ diff --git a/resources/fonts/KomikaAxis.woff b/resources/fonts/KomikaAxis.woff new file mode 100644 index 000000000..d95742e40 Binary files /dev/null and b/resources/fonts/KomikaAxis.woff differ diff --git a/resources/fonts/KonkordRetro.woff b/resources/fonts/KonkordRetro.woff new file mode 100644 index 000000000..305badcce Binary files /dev/null and b/resources/fonts/KonkordRetro.woff differ diff --git a/resources/fonts/KonstruktoDeco.woff b/resources/fonts/KonstruktoDeco.woff new file mode 100644 index 000000000..4c1323bef Binary files /dev/null and b/resources/fonts/KonstruktoDeco.woff differ diff --git a/resources/fonts/Kramola.woff b/resources/fonts/Kramola.woff new file mode 100644 index 000000000..8fa94b2f4 Binary files /dev/null and b/resources/fonts/Kramola.woff differ diff --git a/resources/fonts/Kurale.woff b/resources/fonts/Kurale.woff new file mode 100644 index 000000000..edf9a0913 Binary files /dev/null and b/resources/fonts/Kurale.woff differ diff --git a/resources/fonts/Kursivc.woff b/resources/fonts/Kursivc.woff new file mode 100644 index 000000000..df4b8f230 Binary files /dev/null and b/resources/fonts/Kursivc.woff differ diff --git a/resources/fonts/LCBlowzy.woff b/resources/fonts/LCBlowzy.woff new file mode 100644 index 000000000..4c5314ec7 Binary files /dev/null and b/resources/fonts/LCBlowzy.woff differ diff --git a/resources/fonts/LCChalk.woff b/resources/fonts/LCChalk.woff new file mode 100644 index 000000000..d2b2253f8 Binary files /dev/null and b/resources/fonts/LCChalk.woff differ diff --git a/resources/fonts/LCDNOVA.woff b/resources/fonts/LCDNOVA.woff new file mode 100644 index 000000000..6c72330bd Binary files /dev/null and b/resources/fonts/LCDNOVA.woff differ diff --git a/resources/fonts/LDSlender.woff b/resources/fonts/LDSlender.woff new file mode 100644 index 000000000..c0653ad5b Binary files /dev/null and b/resources/fonts/LDSlender.woff differ diff --git a/resources/fonts/LarisaScript.woff b/resources/fonts/LarisaScript.woff new file mode 100644 index 000000000..747a225dd Binary files /dev/null and b/resources/fonts/LarisaScript.woff differ diff --git a/resources/fonts/LegendeC.woff b/resources/fonts/LegendeC.woff new file mode 100644 index 000000000..0058f30bb Binary files /dev/null and b/resources/fonts/LegendeC.woff differ diff --git a/resources/fonts/LeokadiaDeco.woff b/resources/fonts/LeokadiaDeco.woff new file mode 100644 index 000000000..9b2064df2 Binary files /dev/null and b/resources/fonts/LeokadiaDeco.woff differ diff --git a/resources/fonts/LirussTYGRA.woff b/resources/fonts/LirussTYGRA.woff new file mode 100644 index 000000000..8fc3b2b9e Binary files /dev/null and b/resources/fonts/LirussTYGRA.woff differ diff --git a/resources/fonts/Lobster.woff b/resources/fonts/Lobster.woff new file mode 100644 index 000000000..74d5c17e6 Binary files /dev/null and b/resources/fonts/Lobster.woff differ diff --git a/resources/fonts/MBDemonic.woff b/resources/fonts/MBDemonic.woff new file mode 100644 index 000000000..2389e7c18 Binary files /dev/null and b/resources/fonts/MBDemonic.woff differ diff --git a/resources/fonts/MBThinkTwice.woff b/resources/fonts/MBThinkTwice.woff new file mode 100644 index 000000000..b9a584826 Binary files /dev/null and b/resources/fonts/MBThinkTwice.woff differ diff --git a/resources/fonts/MLikes.woff b/resources/fonts/MLikes.woff new file mode 100644 index 000000000..6101e0122 Binary files /dev/null and b/resources/fonts/MLikes.woff differ diff --git a/resources/fonts/MachinaNovaBrk.woff b/resources/fonts/MachinaNovaBrk.woff new file mode 100644 index 000000000..d750b6f35 Binary files /dev/null and b/resources/fonts/MachinaNovaBrk.woff differ diff --git a/resources/fonts/ManPro.woff b/resources/fonts/ManPro.woff new file mode 100644 index 000000000..5e08e13cd Binary files /dev/null and b/resources/fonts/ManPro.woff differ diff --git a/resources/fonts/MarkerFeltWide.woff b/resources/fonts/MarkerFeltWide.woff new file mode 100644 index 000000000..a7626b621 Binary files /dev/null and b/resources/fonts/MarkerFeltWide.woff differ diff --git a/resources/fonts/MarmeladRegular.woff b/resources/fonts/MarmeladRegular.woff new file mode 100644 index 000000000..d45c3fe95 Binary files /dev/null and b/resources/fonts/MarmeladRegular.woff differ diff --git a/resources/fonts/MarshStencil.woff b/resources/fonts/MarshStencil.woff new file mode 100644 index 000000000..2a6ffee98 Binary files /dev/null and b/resources/fonts/MarshStencil.woff differ diff --git a/resources/fonts/MartAWX.woff b/resources/fonts/MartAWX.woff new file mode 100644 index 000000000..92e6c501b Binary files /dev/null and b/resources/fonts/MartAWX.woff differ diff --git a/resources/fonts/Martadecorone.woff b/resources/fonts/Martadecorone.woff new file mode 100644 index 000000000..1d63ab90d Binary files /dev/null and b/resources/fonts/Martadecorone.woff differ diff --git a/resources/fonts/Mason.woff b/resources/fonts/Mason.woff new file mode 100644 index 000000000..b577b8d06 Binary files /dev/null and b/resources/fonts/Mason.woff differ diff --git a/resources/fonts/Matreshka.woff b/resources/fonts/Matreshka.woff new file mode 100644 index 000000000..446c3063f Binary files /dev/null and b/resources/fonts/Matreshka.woff differ diff --git a/resources/fonts/Matterhornctt.woff b/resources/fonts/Matterhornctt.woff new file mode 100644 index 000000000..78f64e135 Binary files /dev/null and b/resources/fonts/Matterhornctt.woff differ diff --git a/resources/fonts/Maya.woff b/resources/fonts/Maya.woff new file mode 100644 index 000000000..53c6850d5 Binary files /dev/null and b/resources/fonts/Maya.woff differ diff --git a/resources/fonts/MedievalEnglish.woff b/resources/fonts/MedievalEnglish.woff new file mode 100644 index 000000000..af1cf66f4 Binary files /dev/null and b/resources/fonts/MedievalEnglish.woff differ diff --git a/resources/fonts/Merkur.woff b/resources/fonts/Merkur.woff new file mode 100644 index 000000000..94a3805a2 Binary files /dev/null and b/resources/fonts/Merkur.woff differ diff --git a/resources/fonts/MetroModern.woff b/resources/fonts/MetroModern.woff new file mode 100644 index 000000000..7d5269449 Binary files /dev/null and b/resources/fonts/MetroModern.woff differ diff --git a/resources/fonts/Metrolox.woff b/resources/fonts/Metrolox.woff new file mode 100644 index 000000000..ffe848053 Binary files /dev/null and b/resources/fonts/Metrolox.woff differ diff --git a/resources/fonts/Minecraft.woff b/resources/fonts/Minecraft.woff new file mode 100644 index 000000000..56084ed94 Binary files /dev/null and b/resources/fonts/Minecraft.woff differ diff --git a/resources/fonts/Molot.woff b/resources/fonts/Molot.woff new file mode 100644 index 000000000..8bf2a8710 Binary files /dev/null and b/resources/fonts/Molot.woff differ diff --git a/resources/fonts/Monplesir.woff b/resources/fonts/Monplesir.woff new file mode 100644 index 000000000..b8dc60ee5 Binary files /dev/null and b/resources/fonts/Monplesir.woff differ diff --git a/resources/fonts/MonsterHigh.woff b/resources/fonts/MonsterHigh.woff new file mode 100644 index 000000000..14dbd3be6 Binary files /dev/null and b/resources/fonts/MonsterHigh.woff differ diff --git a/resources/fonts/Montblanc.woff b/resources/fonts/Montblanc.woff new file mode 100644 index 000000000..28ec91a99 Binary files /dev/null and b/resources/fonts/Montblanc.woff differ diff --git a/resources/fonts/Moonlight.woff b/resources/fonts/Moonlight.woff new file mode 100644 index 000000000..f9d5f8d48 Binary files /dev/null and b/resources/fonts/Moonlight.woff differ diff --git a/resources/fonts/MorningGlory.woff b/resources/fonts/MorningGlory.woff new file mode 100644 index 000000000..9c08315e1 Binary files /dev/null and b/resources/fonts/MorningGlory.woff differ diff --git a/resources/fonts/MovieLetters.woff b/resources/fonts/MovieLetters.woff new file mode 100644 index 000000000..ec22dca93 Binary files /dev/null and b/resources/fonts/MovieLetters.woff differ diff --git a/resources/fonts/Moyenage.woff b/resources/fonts/Moyenage.woff new file mode 100644 index 000000000..5c981f5e0 Binary files /dev/null and b/resources/fonts/Moyenage.woff differ diff --git a/resources/fonts/MullerThin.woff b/resources/fonts/MullerThin.woff new file mode 100644 index 000000000..1f32047c0 Binary files /dev/null and b/resources/fonts/MullerThin.woff differ diff --git a/resources/fonts/MunchkinCyr.woff b/resources/fonts/MunchkinCyr.woff new file mode 100644 index 000000000..926061ad6 Binary files /dev/null and b/resources/fonts/MunchkinCyr.woff differ diff --git a/resources/fonts/NEON1.woff b/resources/fonts/NEON1.woff new file mode 100644 index 000000000..6d08634ed Binary files /dev/null and b/resources/fonts/NEON1.woff differ diff --git a/resources/fonts/NEXTART-Light.woff b/resources/fonts/NEXTART-Light.woff new file mode 100644 index 000000000..748943177 Binary files /dev/null and b/resources/fonts/NEXTART-Light.woff differ diff --git a/resources/fonts/NFSJLtv.woff b/resources/fonts/NFSJLtv.woff new file mode 100644 index 000000000..08ba074d4 Binary files /dev/null and b/resources/fonts/NFSJLtv.woff differ diff --git a/resources/fonts/NeonDL.woff b/resources/fonts/NeonDL.woff new file mode 100644 index 000000000..a529ca164 Binary files /dev/null and b/resources/fonts/NeonDL.woff differ diff --git a/resources/fonts/NeonOL.woff b/resources/fonts/NeonOL.woff new file mode 100644 index 000000000..6ac8d4314 Binary files /dev/null and b/resources/fonts/NeonOL.woff differ diff --git a/resources/fonts/Neucha.woff b/resources/fonts/Neucha.woff new file mode 100644 index 000000000..71388d539 Binary files /dev/null and b/resources/fonts/Neucha.woff differ diff --git a/resources/fonts/Neuropol.woff b/resources/fonts/Neuropol.woff new file mode 100644 index 000000000..0b2bcb173 Binary files /dev/null and b/resources/fonts/Neuropol.woff differ diff --git a/resources/fonts/NewRecord.woff b/resources/fonts/NewRecord.woff new file mode 100644 index 000000000..583e3a6fe Binary files /dev/null and b/resources/fonts/NewRecord.woff differ diff --git a/resources/fonts/Nickainley.woff b/resources/fonts/Nickainley.woff new file mode 100644 index 000000000..a1dbb15df Binary files /dev/null and b/resources/fonts/Nickainley.woff differ diff --git a/resources/fonts/Nickname.woff b/resources/fonts/Nickname.woff new file mode 100644 index 000000000..72c18c6c5 Binary files /dev/null and b/resources/fonts/Nickname.woff differ diff --git a/resources/fonts/NiseSega.woff b/resources/fonts/NiseSega.woff new file mode 100644 index 000000000..a79fdf5d9 Binary files /dev/null and b/resources/fonts/NiseSega.woff differ diff --git a/resources/fonts/OLGAC.woff b/resources/fonts/OLGAC.woff new file mode 100644 index 000000000..d84b2639b Binary files /dev/null and b/resources/fonts/OLGAC.woff differ diff --git a/resources/fonts/OOSTROV.woff b/resources/fonts/OOSTROV.woff new file mode 100644 index 000000000..1a34fafa7 Binary files /dev/null and b/resources/fonts/OOSTROV.woff differ diff --git a/resources/fonts/ObelixPro.woff b/resources/fonts/ObelixPro.woff new file mode 100644 index 000000000..fc82e630b Binary files /dev/null and b/resources/fonts/ObelixPro.woff differ diff --git a/resources/fonts/OldComedy.woff b/resources/fonts/OldComedy.woff new file mode 100644 index 000000000..6dfc180cb Binary files /dev/null and b/resources/fonts/OldComedy.woff differ diff --git a/resources/fonts/OldKingC-Bold.woff b/resources/fonts/OldKingC-Bold.woff new file mode 100644 index 000000000..8b271aa6e Binary files /dev/null and b/resources/fonts/OldKingC-Bold.woff differ diff --git a/resources/fonts/OldRosaNormal.woff b/resources/fonts/OldRosaNormal.woff new file mode 100644 index 000000000..023dadbc8 Binary files /dev/null and b/resources/fonts/OldRosaNormal.woff differ diff --git a/resources/fonts/OlympiaDeco.woff b/resources/fonts/OlympiaDeco.woff new file mode 100644 index 000000000..f572c4c0a Binary files /dev/null and b/resources/fonts/OlympiaDeco.woff differ diff --git a/resources/fonts/Orbitron.woff b/resources/fonts/Orbitron.woff new file mode 100644 index 000000000..fc486e53c Binary files /dev/null and b/resources/fonts/Orbitron.woff differ diff --git a/resources/fonts/OwnHand.woff b/resources/fonts/OwnHand.woff new file mode 100644 index 000000000..a1295b996 Binary files /dev/null and b/resources/fonts/OwnHand.woff differ diff --git a/resources/fonts/PFHandbookProThin.woff b/resources/fonts/PFHandbookProThin.woff new file mode 100644 index 000000000..ca39e3278 Binary files /dev/null and b/resources/fonts/PFHandbookProThin.woff differ diff --git a/resources/fonts/PFHellenicaSerifPro.woff b/resources/fonts/PFHellenicaSerifPro.woff new file mode 100644 index 000000000..dc9539b54 Binary files /dev/null and b/resources/fonts/PFHellenicaSerifPro.woff differ diff --git a/resources/fonts/PH100CondCaps.woff b/resources/fonts/PH100CondCaps.woff new file mode 100644 index 000000000..111cd8d98 Binary files /dev/null and b/resources/fonts/PH100CondCaps.woff differ diff --git a/resources/fonts/Pacmania.woff b/resources/fonts/Pacmania.woff new file mode 100644 index 000000000..a77952ab0 Binary files /dev/null and b/resources/fonts/Pacmania.woff differ diff --git a/resources/fonts/PaintItDark.woff b/resources/fonts/PaintItDark.woff new file mode 100644 index 000000000..6209e543b Binary files /dev/null and b/resources/fonts/PaintItDark.woff differ diff --git a/resources/fonts/PanfortePro.woff b/resources/fonts/PanfortePro.woff new file mode 100644 index 000000000..6a95e45ee Binary files /dev/null and b/resources/fonts/PanfortePro.woff differ diff --git a/resources/fonts/Paranoia.woff b/resources/fonts/Paranoia.woff new file mode 100644 index 000000000..68428fb1a Binary files /dev/null and b/resources/fonts/Paranoia.woff differ diff --git a/resources/fonts/Parizhel.woff b/resources/fonts/Parizhel.woff new file mode 100644 index 000000000..161185e12 Binary files /dev/null and b/resources/fonts/Parizhel.woff differ diff --git a/resources/fonts/Parsek.woff b/resources/fonts/Parsek.woff new file mode 100644 index 000000000..852b7eee6 Binary files /dev/null and b/resources/fonts/Parsek.woff differ diff --git a/resources/fonts/PasadenaDeco.woff b/resources/fonts/PasadenaDeco.woff new file mode 100644 index 000000000..4ff68215d Binary files /dev/null and b/resources/fonts/PasadenaDeco.woff differ diff --git a/resources/fonts/PeaceSans.woff b/resources/fonts/PeaceSans.woff new file mode 100644 index 000000000..c4da4edf8 Binary files /dev/null and b/resources/fonts/PeaceSans.woff differ diff --git a/resources/fonts/Phenomena.woff b/resources/fonts/Phenomena.woff new file mode 100644 index 000000000..4df8a2b3f Binary files /dev/null and b/resources/fonts/Phenomena.woff differ diff --git a/resources/fonts/PirouCyrillic.woff b/resources/fonts/PirouCyrillic.woff new file mode 100644 index 000000000..df13af458 Binary files /dev/null and b/resources/fonts/PirouCyrillic.woff differ diff --git a/resources/fonts/PixelDigivolve.ttf b/resources/fonts/PixelDigivolve.ttf new file mode 100644 index 000000000..ae985c66b Binary files /dev/null and b/resources/fonts/PixelDigivolve.ttf differ diff --git a/resources/fonts/Plainot.woff b/resources/fonts/Plainot.woff new file mode 100644 index 000000000..460987f86 Binary files /dev/null and b/resources/fonts/Plainot.woff differ diff --git a/resources/fonts/PlanetN2.woff b/resources/fonts/PlanetN2.woff new file mode 100644 index 000000000..477ea4f73 Binary files /dev/null and b/resources/fonts/PlanetN2.woff differ diff --git a/resources/fonts/Play.woff b/resources/fonts/Play.woff new file mode 100644 index 000000000..533181787 Binary files /dev/null and b/resources/fonts/Play.woff differ diff --git a/resources/fonts/PoddCyr.woff b/resources/fonts/PoddCyr.woff new file mode 100644 index 000000000..fbf494013 Binary files /dev/null and b/resources/fonts/PoddCyr.woff differ diff --git a/resources/fonts/PoiretOneRegular.woff b/resources/fonts/PoiretOneRegular.woff new file mode 100644 index 000000000..835b2745c Binary files /dev/null and b/resources/fonts/PoiretOneRegular.woff differ diff --git a/resources/fonts/Pompadur.woff b/resources/fonts/Pompadur.woff new file mode 100644 index 000000000..ab20fd004 Binary files /dev/null and b/resources/fonts/Pompadur.woff differ diff --git a/resources/fonts/ProbaNav2Regular.woff b/resources/fonts/ProbaNav2Regular.woff new file mode 100644 index 000000000..b522180c2 Binary files /dev/null and b/resources/fonts/ProbaNav2Regular.woff differ diff --git a/resources/fonts/Proletariat.woff b/resources/fonts/Proletariat.woff new file mode 100644 index 000000000..20ac0c7f3 Binary files /dev/null and b/resources/fonts/Proletariat.woff differ diff --git a/resources/fonts/ProtoSans.woff b/resources/fonts/ProtoSans.woff new file mode 100644 index 000000000..38c48d51c Binary files /dev/null and b/resources/fonts/ProtoSans.woff differ diff --git a/resources/fonts/ProunNormal.woff b/resources/fonts/ProunNormal.woff new file mode 100644 index 000000000..25df0f0ad Binary files /dev/null and b/resources/fonts/ProunNormal.woff differ diff --git a/resources/fonts/Prounx.woff b/resources/fonts/Prounx.woff new file mode 100644 index 000000000..be9115cf5 Binary files /dev/null and b/resources/fonts/Prounx.woff differ diff --git a/resources/fonts/Pteroque.woff b/resources/fonts/Pteroque.woff new file mode 100644 index 000000000..e0c52884f Binary files /dev/null and b/resources/fonts/Pteroque.woff differ diff --git a/resources/fonts/Pudelina.woff b/resources/fonts/Pudelina.woff new file mode 100644 index 000000000..143512ce9 Binary files /dev/null and b/resources/fonts/Pudelina.woff differ diff --git a/resources/fonts/RUSCHEAPSTE.woff b/resources/fonts/RUSCHEAPSTE.woff new file mode 100644 index 000000000..654a64e09 Binary files /dev/null and b/resources/fonts/RUSCHEAPSTE.woff differ diff --git a/resources/fonts/RUSwolfenstein.woff b/resources/fonts/RUSwolfenstein.woff new file mode 100644 index 000000000..b2dd6a78f Binary files /dev/null and b/resources/fonts/RUSwolfenstein.woff differ diff --git a/resources/fonts/RealizeMyPassion.woff b/resources/fonts/RealizeMyPassion.woff new file mode 100644 index 000000000..97ce37c52 Binary files /dev/null and b/resources/fonts/RealizeMyPassion.woff differ diff --git a/resources/fonts/RedisTYGRA.woff b/resources/fonts/RedisTYGRA.woff new file mode 100644 index 000000000..3947b53fe Binary files /dev/null and b/resources/fonts/RedisTYGRA.woff differ diff --git a/resources/fonts/ReginaKursiv.woff b/resources/fonts/ReginaKursiv.woff new file mode 100644 index 000000000..d2e39f773 Binary files /dev/null and b/resources/fonts/ReginaKursiv.woff differ diff --git a/resources/fonts/ReginaKursivItalic.woff b/resources/fonts/ReginaKursivItalic.woff new file mode 100644 index 000000000..7a40834cc Binary files /dev/null and b/resources/fonts/ReginaKursivItalic.woff differ diff --git a/resources/fonts/Repivmanusc.woff b/resources/fonts/Repivmanusc.woff new file mode 100644 index 000000000..3474db01a Binary files /dev/null and b/resources/fonts/Repivmanusc.woff differ diff --git a/resources/fonts/Resagokr.woff b/resources/fonts/Resagokr.woff new file mode 100644 index 000000000..64ef53a77 Binary files /dev/null and b/resources/fonts/Resagokr.woff differ diff --git a/resources/fonts/RibbonHeart.woff b/resources/fonts/RibbonHeart.woff new file mode 100644 index 000000000..58758b206 Binary files /dev/null and b/resources/fonts/RibbonHeart.woff differ diff --git a/resources/fonts/Roddenberry.woff b/resources/fonts/Roddenberry.woff new file mode 100644 index 000000000..2f8280b28 Binary files /dev/null and b/resources/fonts/Roddenberry.woff differ diff --git a/resources/fonts/RomanaScript.woff b/resources/fonts/RomanaScript.woff new file mode 100644 index 000000000..0c90d08bf Binary files /dev/null and b/resources/fonts/RomanaScript.woff differ diff --git a/resources/fonts/RomeoRUS.woff b/resources/fonts/RomeoRUS.woff new file mode 100644 index 000000000..e33c33c8e Binary files /dev/null and b/resources/fonts/RomeoRUS.woff differ diff --git a/resources/fonts/RosaMarena.woff b/resources/fonts/RosaMarena.woff new file mode 100644 index 000000000..27f14c960 Binary files /dev/null and b/resources/fonts/RosaMarena.woff differ diff --git a/resources/fonts/Rotonda.woff b/resources/fonts/Rotonda.woff new file mode 100644 index 000000000..19f30603d Binary files /dev/null and b/resources/fonts/Rotonda.woff differ diff --git a/resources/fonts/RoundScript.woff b/resources/fonts/RoundScript.woff new file mode 100644 index 000000000..710bcafeb Binary files /dev/null and b/resources/fonts/RoundScript.woff differ diff --git a/resources/fonts/Runic.woff b/resources/fonts/Runic.woff new file mode 100644 index 000000000..c33d07a29 Binary files /dev/null and b/resources/fonts/Runic.woff differ diff --git a/resources/fonts/RupsterScript.woff b/resources/fonts/RupsterScript.woff new file mode 100644 index 000000000..90e723ff8 Binary files /dev/null and b/resources/fonts/RupsterScript.woff differ diff --git a/resources/fonts/SKPorsche.woff b/resources/fonts/SKPorsche.woff new file mode 100644 index 000000000..aaf8ae747 Binary files /dev/null and b/resources/fonts/SKPorsche.woff differ diff --git a/resources/fonts/STALKER.woff b/resources/fonts/STALKER.woff new file mode 100644 index 000000000..f1604d783 Binary files /dev/null and b/resources/fonts/STALKER.woff differ diff --git a/resources/fonts/STRT.woff b/resources/fonts/STRT.woff new file mode 100644 index 000000000..03235cb0a Binary files /dev/null and b/resources/fonts/STRT.woff differ diff --git a/resources/fonts/SangBleu.woff b/resources/fonts/SangBleu.woff new file mode 100644 index 000000000..e5ad36595 Binary files /dev/null and b/resources/fonts/SangBleu.woff differ diff --git a/resources/fonts/ScriptS.woff b/resources/fonts/ScriptS.woff new file mode 100644 index 000000000..380c5b8b3 Binary files /dev/null and b/resources/fonts/ScriptS.woff differ diff --git a/resources/fonts/Scriptorama.woff b/resources/fonts/Scriptorama.woff new file mode 100644 index 000000000..39529ded9 Binary files /dev/null and b/resources/fonts/Scriptorama.woff differ diff --git a/resources/fonts/SeedsCyrMedium.woff b/resources/fonts/SeedsCyrMedium.woff new file mode 100644 index 000000000..dfe0a0b88 Binary files /dev/null and b/resources/fonts/SeedsCyrMedium.woff differ diff --git a/resources/fonts/Seminaria.woff b/resources/fonts/Seminaria.woff new file mode 100644 index 000000000..6c4bbf111 Binary files /dev/null and b/resources/fonts/Seminaria.woff differ diff --git a/resources/fonts/SevillaDecor.woff b/resources/fonts/SevillaDecor.woff new file mode 100644 index 000000000..120082bbc Binary files /dev/null and b/resources/fonts/SevillaDecor.woff differ diff --git a/resources/fonts/SirClive.woff b/resources/fonts/SirClive.woff new file mode 100644 index 000000000..f0e882a0b Binary files /dev/null and b/resources/fonts/SirClive.woff differ diff --git a/resources/fonts/Sladkoeshka.woff b/resources/fonts/Sladkoeshka.woff new file mode 100644 index 000000000..de360e8fc Binary files /dev/null and b/resources/fonts/Sladkoeshka.woff differ diff --git a/resources/fonts/SlotCyrillic.woff b/resources/fonts/SlotCyrillic.woff new file mode 100644 index 000000000..35ab929c6 Binary files /dev/null and b/resources/fonts/SlotCyrillic.woff differ diff --git a/resources/fonts/Smeshariki.woff b/resources/fonts/Smeshariki.woff new file mode 100644 index 000000000..34dc0f6f8 Binary files /dev/null and b/resources/fonts/Smeshariki.woff differ diff --git a/resources/fonts/SnowForSanta.woff b/resources/fonts/SnowForSanta.woff new file mode 100644 index 000000000..e8de26f15 Binary files /dev/null and b/resources/fonts/SnowForSanta.woff differ diff --git a/resources/fonts/Snowstorm.woff b/resources/fonts/Snowstorm.woff new file mode 100644 index 000000000..961a67b57 Binary files /dev/null and b/resources/fonts/Snowstorm.woff differ diff --git a/resources/fonts/SnowstormInline.woff b/resources/fonts/SnowstormInline.woff new file mode 100644 index 000000000..2c37e541b Binary files /dev/null and b/resources/fonts/SnowstormInline.woff differ diff --git a/resources/fonts/Sochi2014Regular.woff b/resources/fonts/Sochi2014Regular.woff new file mode 100644 index 000000000..42556d063 Binary files /dev/null and b/resources/fonts/Sochi2014Regular.woff differ diff --git a/resources/fonts/SporedomRUS.woff b/resources/fonts/SporedomRUS.woff new file mode 100644 index 000000000..7703aea59 Binary files /dev/null and b/resources/fonts/SporedomRUS.woff differ diff --git a/resources/fonts/Stradivari.woff b/resources/fonts/Stradivari.woff new file mode 100644 index 000000000..3977b360c Binary files /dev/null and b/resources/fonts/Stradivari.woff differ diff --git a/resources/fonts/StudioScriptCTT.woff b/resources/fonts/StudioScriptCTT.woff new file mode 100644 index 000000000..ad253e80d Binary files /dev/null and b/resources/fonts/StudioScriptCTT.woff differ diff --git a/resources/fonts/SumkinTypeface.woff b/resources/fonts/SumkinTypeface.woff new file mode 100644 index 000000000..ecd159d5b Binary files /dev/null and b/resources/fonts/SumkinTypeface.woff differ diff --git a/resources/fonts/TECHD.woff b/resources/fonts/TECHD.woff new file mode 100644 index 000000000..eb6c04ba1 Binary files /dev/null and b/resources/fonts/TECHD.woff differ diff --git a/resources/fonts/TagirCTTNormal.woff b/resources/fonts/TagirCTTNormal.woff new file mode 100644 index 000000000..68ba7cc4b Binary files /dev/null and b/resources/fonts/TagirCTTNormal.woff differ diff --git a/resources/fonts/Tamila.woff b/resources/fonts/Tamila.woff new file mode 100644 index 000000000..c797a3285 Binary files /dev/null and b/resources/fonts/Tamila.woff differ diff --git a/resources/fonts/TangoDi.woff b/resources/fonts/TangoDi.woff new file mode 100644 index 000000000..82a64e683 Binary files /dev/null and b/resources/fonts/TangoDi.woff differ diff --git a/resources/fonts/Taurus.woff b/resources/fonts/Taurus.woff new file mode 100644 index 000000000..9009be552 Binary files /dev/null and b/resources/fonts/Taurus.woff differ diff --git a/resources/fonts/Techno28.woff b/resources/fonts/Techno28.woff new file mode 100644 index 000000000..fae8b7693 Binary files /dev/null and b/resources/fonts/Techno28.woff differ diff --git a/resources/fonts/TeddyBear.woff b/resources/fonts/TeddyBear.woff new file mode 100644 index 000000000..f2f10c35c Binary files /dev/null and b/resources/fonts/TeddyBear.woff differ diff --git a/resources/fonts/Tetraclericton.woff b/resources/fonts/Tetraclericton.woff new file mode 100644 index 000000000..f2b027f34 Binary files /dev/null and b/resources/fonts/Tetraclericton.woff differ diff --git a/resources/fonts/TexgyreAdventor.woff b/resources/fonts/TexgyreAdventor.woff new file mode 100644 index 000000000..40a1c432c Binary files /dev/null and b/resources/fonts/TexgyreAdventor.woff differ diff --git a/resources/fonts/Tokio.woff b/resources/fonts/Tokio.woff new file mode 100644 index 000000000..b484af62a Binary files /dev/null and b/resources/fonts/Tokio.woff differ diff --git a/resources/fonts/Topaz.woff b/resources/fonts/Topaz.woff new file mode 100644 index 000000000..69adfa847 Binary files /dev/null and b/resources/fonts/Topaz.woff differ diff --git a/resources/fonts/Toscania.woff b/resources/fonts/Toscania.woff new file mode 100644 index 000000000..3b13e6dbb Binary files /dev/null and b/resources/fonts/Toscania.woff differ diff --git a/resources/fonts/Underdog.woff b/resources/fonts/Underdog.woff new file mode 100644 index 000000000..35cf6ecaa Binary files /dev/null and b/resources/fonts/Underdog.woff differ diff --git a/resources/fonts/UndergradUltrathin.woff b/resources/fonts/UndergradUltrathin.woff new file mode 100644 index 000000000..62ddfbf10 Binary files /dev/null and b/resources/fonts/UndergradUltrathin.woff differ diff --git a/resources/fonts/UpheavalPro.woff b/resources/fonts/UpheavalPro.woff new file mode 100644 index 000000000..a26f2a4b2 Binary files /dev/null and b/resources/fonts/UpheavalPro.woff differ diff --git a/resources/fonts/VAGWorldBold.woff b/resources/fonts/VAGWorldBold.woff new file mode 100644 index 000000000..7bc2c44ff Binary files /dev/null and b/resources/fonts/VAGWorldBold.woff differ diff --git a/resources/fonts/VALStencilcyr.woff b/resources/fonts/VALStencilcyr.woff new file mode 100644 index 000000000..22990d906 Binary files /dev/null and b/resources/fonts/VALStencilcyr.woff differ diff --git a/resources/fonts/VEGeorgianBrush.woff b/resources/fonts/VEGeorgianBrush.woff new file mode 100644 index 000000000..33819cb82 Binary files /dev/null and b/resources/fonts/VEGeorgianBrush.woff differ diff --git a/resources/fonts/Variete.woff b/resources/fonts/Variete.woff new file mode 100644 index 000000000..a943ebb8b Binary files /dev/null and b/resources/fonts/Variete.woff differ diff --git a/resources/fonts/VelesR.woff b/resources/fonts/VelesR.woff new file mode 100644 index 000000000..ec3327ac8 Binary files /dev/null and b/resources/fonts/VelesR.woff differ diff --git a/resources/fonts/Videopac.woff b/resources/fonts/Videopac.woff new file mode 100644 index 000000000..bdf310798 Binary files /dev/null and b/resources/fonts/Videopac.woff differ diff --git a/resources/fonts/VogueCyr.woff b/resources/fonts/VogueCyr.woff new file mode 100644 index 000000000..40e4aeea2 Binary files /dev/null and b/resources/fonts/VogueCyr.woff differ diff --git a/resources/fonts/VoxRegular.woff b/resources/fonts/VoxRegular.woff new file mode 100644 index 000000000..16036c9d7 Binary files /dev/null and b/resources/fonts/VoxRegular.woff differ diff --git a/resources/fonts/Warface.woff b/resources/fonts/Warface.woff new file mode 100644 index 000000000..55471a4ab Binary files /dev/null and b/resources/fonts/Warface.woff differ diff --git a/resources/fonts/Wenatchee.woff b/resources/fonts/Wenatchee.woff new file mode 100644 index 000000000..92d37b8a3 Binary files /dev/null and b/resources/fonts/Wenatchee.woff differ diff --git a/resources/fonts/Werfus.woff b/resources/fonts/Werfus.woff new file mode 100644 index 000000000..c4103096d Binary files /dev/null and b/resources/fonts/Werfus.woff differ diff --git a/resources/fonts/WidefaceAWX.woff b/resources/fonts/WidefaceAWX.woff new file mode 100644 index 000000000..9530b026f Binary files /dev/null and b/resources/fonts/WidefaceAWX.woff differ diff --git a/resources/fonts/WoWSlFKG.woff b/resources/fonts/WoWSlFKG.woff new file mode 100644 index 000000000..3c03b7a47 Binary files /dev/null and b/resources/fonts/WoWSlFKG.woff differ diff --git a/resources/fonts/WolgastTwo.woff b/resources/fonts/WolgastTwo.woff new file mode 100644 index 000000000..1b9e5eed8 Binary files /dev/null and b/resources/fonts/WolgastTwo.woff differ diff --git a/resources/fonts/Xiomara.woff b/resources/fonts/Xiomara.woff new file mode 100644 index 000000000..c3daaaf1b Binary files /dev/null and b/resources/fonts/Xiomara.woff differ diff --git a/resources/fonts/ZettaPapyrus.woff b/resources/fonts/ZettaPapyrus.woff new file mode 100644 index 000000000..82c42ca09 Binary files /dev/null and b/resources/fonts/ZettaPapyrus.woff differ diff --git a/resources/fonts/Zhizn.woff b/resources/fonts/Zhizn.woff new file mode 100644 index 000000000..2a6aab12e Binary files /dev/null and b/resources/fonts/Zhizn.woff differ diff --git a/resources/fonts/ZionTrain.woff b/resources/fonts/ZionTrain.woff new file mode 100644 index 000000000..e06090ffb Binary files /dev/null and b/resources/fonts/ZionTrain.woff differ diff --git a/resources/fonts/ZnikomitNo24.woff b/resources/fonts/ZnikomitNo24.woff new file mode 100644 index 000000000..021f07344 Binary files /dev/null and b/resources/fonts/ZnikomitNo24.woff differ diff --git a/resources/fonts/ZnikomitNo24Thin.woff b/resources/fonts/ZnikomitNo24Thin.woff new file mode 100644 index 000000000..cd21c6cfe Binary files /dev/null and b/resources/fonts/ZnikomitNo24Thin.woff differ diff --git a/resources/fonts/aMavickFont.woff b/resources/fonts/aMavickFont.woff new file mode 100644 index 000000000..87d7e2eeb Binary files /dev/null and b/resources/fonts/aMavickFont.woff differ diff --git a/resources/fonts/inform.woff b/resources/fonts/inform.woff new file mode 100644 index 000000000..2917ccc95 Binary files /dev/null and b/resources/fonts/inform.woff differ diff --git a/resources/fonts/krestik.woff b/resources/fonts/krestik.woff new file mode 100644 index 000000000..b565e24d1 Binary files /dev/null and b/resources/fonts/krestik.woff differ diff --git a/resources/fonts/sovietfont.woff b/resources/fonts/sovietfont.woff new file mode 100644 index 000000000..c2ef53efa Binary files /dev/null and b/resources/fonts/sovietfont.woff differ diff --git a/resources/fonts/ssdrebeden.woff b/resources/fonts/ssdrebeden.woff new file mode 100644 index 000000000..dd869f412 Binary files /dev/null and b/resources/fonts/ssdrebeden.woff differ diff --git a/resources/fonts/zopa.woff b/resources/fonts/zopa.woff new file mode 100644 index 000000000..fb3e4c17d Binary files /dev/null and b/resources/fonts/zopa.woff differ diff --git a/shared/Protocol.h b/shared/Protocol.h index c60b24ce0..2763fe275 100644 --- a/shared/Protocol.h +++ b/shared/Protocol.h @@ -42,14 +42,15 @@ CyberspaceProtocolVersion 46: Added UserMovedNearToAvatar, UserMovedAwayFromAvatar messages. 47: Added UserGestureSettingsChanged message. 48: Added ping+pong messages. -49: Added AvatarSatOnSeat, AvatarGotUpFromSeat messages. -*/ -namespace Protocol -{ +49: Added AvatarSatOnSeat, AvatarGotUpFromSeat messages. +50: Added optional trailing text_font in WorldObject network serialisation. +*/ +namespace Protocol +{ const uint32 CyberspaceHello = 1357924680; -const uint32 CyberspaceProtocolVersion = 49; +const uint32 CyberspaceProtocolVersion = 50; const uint32 ClientProtocolOK = 10000; const uint32 ClientProtocolTooOld = 10001; diff --git a/shared/WorldObject.cpp b/shared/WorldObject.cpp index edd4c9d97..478591648 100644 --- a/shared/WorldObject.cpp +++ b/shared/WorldObject.cpp @@ -113,10 +113,11 @@ WorldObject::WorldObject() noexcept max_model_lod_level = 0; - mass = 50.f; - friction = 0.5f; - restitution = 0.2f; - centre_of_mass_offset_os = Vec3f(0.f); + mass = 50.f; + friction = 0.5f; + restitution = 0.2f; + centre_of_mass_offset_os = Vec3f(0.f); + text_font = "Default"; audio_volume = 1; @@ -544,7 +545,7 @@ WorldObject::ObjectType WorldObject::objectTypeForString(const std::string& ob_t } -static const uint32 WORLD_OBJECT_SERIALISATION_VERSION = 22; +static const uint32 WORLD_OBJECT_SERIALISATION_VERSION = 23; /* Version history: 9: introduced voxels @@ -560,8 +561,9 @@ Version history: 19: Added last_modified_time 20: Added centre_of_mass_offset_os 21: Added chunk_batch0_start etc. -22: Added per-type data (length-prefixed) -*/ +22: Added per-type data (length-prefixed) +23: Added text_font to disk serialisation. +*/ static_assert(sizeof(Voxel) == sizeof(int)*4, "sizeof(Voxel) == sizeof(int)*4"); @@ -660,13 +662,14 @@ void WorldObject::writeToStream(RandomAccessOutStream& stream) const for(size_t i=0; i= 6) - ob.content = stream.readStringLengthFirst(WorldObject::MAX_CONTENT_SIZE); - - if(v >= 8) - ob.target_url = stream.readStringLengthFirst(WorldObject::MAX_URL_SIZE); + if(v >= 6) + ob.content = stream.readStringLengthFirst(WorldObject::MAX_CONTENT_SIZE); + if(v >= 23) + ob.text_font = stream.readStringLengthFirst(WorldObject::MAX_FONT_NAME_SIZE); + else + ob.text_font = "Default"; + + if(v >= 8) + ob.target_url = stream.readStringLengthFirst(WorldObject::MAX_URL_SIZE); if(v >= 16) { @@ -978,9 +985,12 @@ void WorldObject::writeToNetworkStream(RandomAccessOutStream& stream) const // W stream.writeUInt32(chunk_batch1_start); stream.writeUInt32(chunk_batch1_end); - // New in v22: - writeWorldObjectPerTypeData(stream, *this); -} + // New in v22: + writeWorldObjectPerTypeData(stream, *this); + + if(object_type == WorldObject::ObjectType_Text) + stream.writeStringLengthFirst(text_font); +} void WorldObject::copyNetworkStateFrom(const WorldObject& other) @@ -992,9 +1002,10 @@ void WorldObject::copyNetworkStateFrom(const WorldObject& other) lightmap_url = other.lightmap_url; - script = other.script; - content = other.content; - target_url = other.target_url; + script = other.script; + content = other.content; + text_font = other.text_font; + target_url = other.target_url; audio_source_url = other.audio_source_url; audio_volume = other.audio_volume; @@ -1058,9 +1069,10 @@ std::string WorldObject::serialiseToXML(int tab_depth) const XMLWriteUtils::writeStringElemToXML(s, "lightmap_url", lightmap_url, tab_depth + 1); - XMLWriteUtils::writeStringElemToXML(s, "script", script, tab_depth + 1); - XMLWriteUtils::writeStringElemToXML(s, "content", content, tab_depth + 1); - XMLWriteUtils::writeStringElemToXML(s, "target_url", target_url, tab_depth + 1); + XMLWriteUtils::writeStringElemToXML(s, "script", script, tab_depth + 1); + XMLWriteUtils::writeStringElemToXML(s, "content", content, tab_depth + 1); + XMLWriteUtils::writeStringElemToXML(s, "text_font", text_font, tab_depth + 1); + XMLWriteUtils::writeStringElemToXML(s, "target_url", target_url, tab_depth + 1); XMLWriteUtils::writeStringElemToXML(s, "audio_source_url", audio_source_url, tab_depth + 1); XMLWriteUtils::writeFloatToXML(s, "audio_volume", audio_volume, tab_depth + 1); @@ -1124,11 +1136,12 @@ Reference WorldObject::loadFromXMLElem(const std::string& object_fi } } - ob->lightmap_url = XMLParseUtils::parseStringWithDefault(elem, "lightmap_url", ""); - - ob->script = XMLParseUtils::parseStringWithDefault(elem, "script", ""); - ob->content = XMLParseUtils::parseStringWithDefault(elem, "content", ""); - ob->target_url = XMLParseUtils::parseStringWithDefault(elem, "target_url", ""); + ob->lightmap_url = XMLParseUtils::parseStringWithDefault(elem, "lightmap_url", ""); + + ob->script = XMLParseUtils::parseStringWithDefault(elem, "script", ""); + ob->content = XMLParseUtils::parseStringWithDefault(elem, "content", ""); + ob->text_font = XMLParseUtils::parseStringWithDefault(elem, "text_font", "Default"); + ob->target_url = XMLParseUtils::parseStringWithDefault(elem, "target_url", ""); ob->audio_source_url = XMLParseUtils::parseStringWithDefault(elem, "audio_source_url", ""); ob->audio_volume = XMLParseUtils::parseFloatWithDefault(elem, "audio_volume", 1.f); @@ -1312,13 +1325,27 @@ void readWorldObjectFromNetworkStreamGivenUID(RandomAccessInStream& stream, Worl ob.chunk_batch1_end = stream.readUInt32(); } - if(!stream.endOfStream()) - readWorldObjectPerTypeData(stream, ob); - else - setWorldObjectPerTypeDataDefaults(ob); - - // Set ephemeral state - //ob.state = WorldObject::State_Alive; + if(!stream.endOfStream()) + readWorldObjectPerTypeData(stream, ob); + else + setWorldObjectPerTypeDataDefaults(ob); + + if((ob.object_type == WorldObject::ObjectType_Text) && !stream.endOfStream()) + { + const std::string new_text_font = stream.readStringLengthFirst(WorldObject::MAX_FONT_NAME_SIZE); + if(ob.text_font != new_text_font) + ob.changed_flags |= WorldObject::TEXT_FONT_CHANGED; + ob.text_font = new_text_font; + } + else + { + if(ob.text_font != "Default") + ob.changed_flags |= WorldObject::TEXT_FONT_CHANGED; + ob.text_font = "Default"; + } + + // Set ephemeral state + //ob.state = WorldObject::State_Alive; ob.exclude_from_lod_chunk_mesh = BitUtils::isBitSet(ob.flags, WorldObject::EXCLUDE_FROM_LOD_CHUNK_MESH); } @@ -1751,13 +1778,17 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) #endif -static void testObjectsEqual(WorldObject& ob1, WorldObject& ob2) -{ - testAssert(ob1.getCompressedVoxels().nonNull() == ob2.getCompressedVoxels().nonNull()); - if(ob1.getCompressedVoxels().nonNull()) - testAssert(*ob1.getCompressedVoxels() == *ob2.getCompressedVoxels()); - - testAssert(ob1.materials.size() == ob2.materials.size()); +static void testObjectsEqual(WorldObject& ob1, WorldObject& ob2) +{ + testAssert(ob1.getCompressedVoxels().nonNull() == ob2.getCompressedVoxels().nonNull()); + if(ob1.getCompressedVoxels().nonNull()) + testAssert(*ob1.getCompressedVoxels() == *ob2.getCompressedVoxels()); + + testAssert(ob1.object_type == ob2.object_type); + testAssert(ob1.content == ob2.content); + testAssert(ob1.text_font == ob2.text_font); + + testAssert(ob1.materials.size() == ob2.materials.size()); for(size_t i=0; i(buf.buf.data(), buf.buf.size())); + WorldObject ob2; + readWorldObjectFromStream(instream, ob2); + testObjectsEqual(ob, ob2); + + const std::string xml = ob.serialiseToXML(/*tab depth=*/0); + IndigoXMLDoc doc(xml.c_str(), xml.size()); + WorldObjectRef ob3 = WorldObject::loadFromXMLElem(/*object_file_path=*/".", /*convert_rel_paths_to_abs_disk_paths=*/false, doc.getRootElement()); + testObjectsEqual(ob, *ob3); + + BufferOutStream network_buf; + ob.writeToNetworkStream(network_buf); + + BufferInStream network_instream(ArrayRef(network_buf.buf.data(), network_buf.buf.size())); + WorldObject ob4; + ob4.uid = readUIDFromStream(network_instream); + readWorldObjectFromNetworkStreamGivenUID(network_instream, ob4); + testAssert(ob4.content == ob.content); + testAssert(ob4.text_font == ob.text_font); + testAssert(ob4.target_url == ob.target_url); + } // Test with some large materials { diff --git a/shared/WorldObject.h b/shared/WorldObject.h index 2bca97759..e9c17f0e2 100644 --- a/shared/WorldObject.h +++ b/shared/WorldObject.h @@ -236,8 +236,8 @@ class WorldObject // : public ThreadSafeRefCounted void setCompressedVoxels(Reference > v); - void writeToStream(RandomAccessOutStream& stream) const; - void writeToNetworkStream(RandomAccessOutStream& stream) const; // Write without version + void writeToStream(RandomAccessOutStream& stream) const; + void writeToNetworkStream(RandomAccessOutStream& stream) const; // Write without version void copyNetworkStateFrom(const WorldObject& other); @@ -305,17 +305,19 @@ class WorldObject // : public ThreadSafeRefCounted UID uid; ObjectType object_type; - static const size_t MAX_URL_SIZE = 1000; - static const size_t MAX_SCRIPT_SIZE = 10000; - static const size_t MAX_CONTENT_SIZE = 10000; - - - URLString model_url; - std::vector materials; - URLString lightmap_url; - std::string script; - std::string content; // For ObjectType_Hypercard, ObjectType_Text - std::string target_url; + static const size_t MAX_URL_SIZE = 1000; + static const size_t MAX_SCRIPT_SIZE = 10000; + static const size_t MAX_CONTENT_SIZE = 10000; + static const size_t MAX_FONT_NAME_SIZE = 256; + + + URLString model_url; + std::vector materials; + URLString lightmap_url; + std::string script; + std::string content; // For ObjectType_Hypercard, ObjectType_Text + std::string text_font; // Font name for ObjectType_Text objects + std::string target_url; Vec3d pos; Vec3f axis; float angle; @@ -421,10 +423,11 @@ class WorldObject // : public ThreadSafeRefCounted static const uint32 SCRIPT_CHANGED = 2; // Set when script is changed static const uint32 CONTENT_CHANGED = 4; // Set when script is changed static const uint32 MODEL_URL_CHANGED = 8; - static const uint32 DYNAMIC_CHANGED = 16; - static const uint32 PHYSICS_VALUE_CHANGED = 32; - static const uint32 PHYSICS_OWNER_CHANGED = 64; - uint32 changed_flags; + static const uint32 DYNAMIC_CHANGED = 16; + static const uint32 PHYSICS_VALUE_CHANGED = 32; + static const uint32 PHYSICS_OWNER_CHANGED = 64; + static const uint32 TEXT_FONT_CHANGED = 128; + uint32 changed_flags; bool using_placeholder_model; diff --git a/webserver/WebServerRequestHandler.cpp b/webserver/WebServerRequestHandler.cpp index a556ea808..7703c564d 100644 --- a/webserver/WebServerRequestHandler.cpp +++ b/webserver/WebServerRequestHandler.cpp @@ -793,21 +793,22 @@ void WebServerRequestHandler::handleRequest(const web::RequestInfo& request, web store_file = lookup_res->second; } - if(store_file.nonNull()) - { - const std::string& content_type = store_file->content_type; - - // We are using cache-busting hashes in webclient.html, so can set a very long max age and use 'immutable' when caching. - const char* cache_control_val = cache ? "max-age=1000000000, immutable" : "max-age=0"; - - if(request.zstd_accept_encoding && !store_file->zstd_compressed_data.empty()) - { - web::ResponseUtils::writeHTTPOKHeaderWithCacheControlAndContentEncoding(reply_info, store_file->zstd_compressed_data.data(), store_file->zstd_compressed_data.size(), content_type, cache_control_val, "zstd"); - } - else if(request.deflate_accept_encoding && !store_file->deflate_compressed_data.empty()) - { - web::ResponseUtils::writeHTTPOKHeaderWithCacheControlAndContentEncoding(reply_info, store_file->deflate_compressed_data.data(), store_file->deflate_compressed_data.size(), content_type, cache_control_val, "deflate"); - } + if(store_file.nonNull()) + { + const std::string& content_type = store_file->content_type; + const bool allow_content_encoding = (path != "gui_client.data"); + + // We are using cache-busting hashes in webclient.html, so can set a very long max age and use 'immutable' when caching. + const char* cache_control_val = cache ? "max-age=1000000000, immutable" : "max-age=0"; + + if(allow_content_encoding && request.zstd_accept_encoding && !store_file->zstd_compressed_data.empty()) + { + web::ResponseUtils::writeHTTPOKHeaderWithCacheControlAndContentEncoding(reply_info, store_file->zstd_compressed_data.data(), store_file->zstd_compressed_data.size(), content_type, cache_control_val, "zstd"); + } + else if(allow_content_encoding && request.deflate_accept_encoding && !store_file->deflate_compressed_data.empty()) + { + web::ResponseUtils::writeHTTPOKHeaderWithCacheControlAndContentEncoding(reply_info, store_file->deflate_compressed_data.data(), store_file->deflate_compressed_data.size(), content_type, cache_control_val, "deflate"); + } else { web::ResponseUtils::writeHTTPOKHeaderAndDataWithCacheControl(reply_info, store_file->uncompressed_data.data(), store_file->uncompressed_data.size(), content_type, cache_control_val);