<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>nek0's blog</title>
        <link>https://nek0.eu</link>
        <description><![CDATA[Random things]]></description>
        <atom:link href="https://nek0.eu/rss.xml" rel="self"
                   type="application/rss+xml" />
        <lastBuildDate>Sat, 14 Apr 2018 00:00:00 UT</lastBuildDate>
        <item>
    <title>Devlog: Progress with "Tracer"</title>
    <link>https://nek0.eu/posts/2018-04-14-Devlog%3A-Progress-with-%22Tracer%22.html</link>
    <description><![CDATA[<p>Hi. This is the second post in my ongoing devlog for my game “Tracer”. About a month ago I posted my initial breakthrough, where I could build a floor of the building the player will be infiltrating. A lot changed since then.</p>
<p>The floors still exist, but are not as colourful as they used to be. The floor is now uniformly white, because I have no proper texture for the floor, but I added some furniture. For now it’s just tables and some cardboard boxes, but there will be more. There is also sanity checking when placing furniture. Everything that needs to be accessed is reachable.</p>
<p>I reworked the collision system, which used to be tile based. This was good for the beginning and easy to implement, but I soon realized, that I needed something more complex. So instead of checking if a tile can be walked upon, there are now boundaries within a tile, based upon the object existing on that tile, where the player can’t walk. This took me a whole lot of time getting it to work properly. I had several instances, where the player could glitch through walls under certain circumstances.</p>
<p>My biggest breakthrough though I finished just today. I have laid the foundation for NPCs. For now they don’t have any real appearance, they are just displayed as red dots (the player is also just a cyan coloured dot). For now they just walk around randomly between tables, where they stay some random time. Again I fell, that the Entity Component System is a very powerful tool here. I suspect that my former game projects failed partly because of the lack of this tool.</p>
<p>This is how it looks now:</p>
<p><img src="/images/2018-04-14_preview.png" /></p>
<p>Unfortunately you don’t get to see the dots moving on a still image, but you can get an impression.</p>
<p>seeya!</p>]]></description>
    <pubDate>Sat, 14 Apr 2018 00:00:00 UT</pubDate>
    <guid>https://nek0.eu/posts/2018-04-14-Devlog%3A-Progress-with-%22Tracer%22.html</guid>
    <dc:creator>nek0</dc:creator>
</item>
<item>
    <title>Transition to NixOS</title>
    <link>https://nek0.eu/posts/2018-03-30-Transition-to-NixOS.html</link>
    <description><![CDATA[<p>Just recently I made a transition, I was thinking of for quite some time. What I’m speaking of is my transition to <a href="https://nixos.org">NixOS</a>.</p>
<p>Two days ago I just installed NixOS on my laptop out of the blue. Now I’m trying to get my programming projects to build and work again. On may way to accomplish this, I learned a lot about the system and its configuration.</p>
<p>Overall I must say, that I am quite pleased with the outcome. It is a fairly usable system, which holds some cool advantages for me as a Haskell developer over my old Debian system setup. Te biggest one is, That I can scrap all cabal sandboxes from all my projects and hand the management of the right dependency versions over to Nix.</p>
<p>What I want to share is a small snippet of a nix expression, that lets you include local dependencies to your Haskell project’s nix shell (like you would do with <code>cabal sandbox add-source</code>.</p>
<p>First you need to create a nix shell configuration. There is a handy tool called <code>cabal2nix</code> which you can install simply by invoking <code>nix-env -iA nixos.cabal2nix</code>. This is the main work horse for converting any Haskell package to nix and it does its job very well.</p>
<p>To build your Nix shell configuration you call <code>cabal2nix --shell . &gt; shell.nix</code> from your project directory. This generates the file <code>shell.nix</code> for you. Check it for any errors. If you want to use a local package, you can add its definition to the <code>shell.nix</code> file. To get the definition of that package, you can again use <code>cabal2nix</code>. Simply invoke <code>cabal2nix file://&lt;path to Package&gt;</code> and copy the resulting block into the <code>let</code> block of your existing <code>shell.nix</code> like this:</p>
<pre><code>&lt;packageName&gt; = with haskellPackages; callPackage (
  &lt;packageDefinition&gt;
  ) {};</code></pre>
<p>Where <code>&lt;packageName&gt;</code> is the variable name for the package inside this Nix expression. <code>&lt;packagDefinition&gt;</code> is the package definition of the local package we just obtained from <code>cabal2nix</code>. Then delete the original package name form the arguments of the <code>f</code> function in the let block of the Nix expression. Finally align everything to look nicely, and save the file. To see an example of that, you can look at the <a href="https://github.com/nek0/tracer/blob/master/shell.nix">Nix expression of my latest game project</a>.</p>
<p>To test your setup, just invoke <code>nix-shell shell.nix</code> and watch the system build a temporary environment for your project and give you a shell to it, if everything went well. Now all dependencies of your project, including your local ones are installed in this environment, so you only need to invoke <code>cabal build</code>.</p>
<p>I hope You find this snippet of my Nix experience helpful, it sure took me some time to find out.</p>]]></description>
    <pubDate>Fri, 30 Mar 2018 00:00:00 UT</pubDate>
    <guid>https://nek0.eu/posts/2018-03-30-Transition-to-NixOS.html</guid>
    <dc:creator>nek0</dc:creator>
</item>
<item>
    <title>Devlog: Making a game</title>
    <link>https://nek0.eu/posts/2018-02-27-Devlog%3A-Making-a-game.html</link>
    <description><![CDATA[<p>Hi folks. I have good news. I am making a game.</p>
<p>After tinkering a lot on my game engine i thought it would be nice to have some “real result”, to be able to present the product of my endeavours. I plan to make a talk at our local hacker symposium “<a href="https://datenspuren.de">Datenspuren</a>” and maybe even at 35C3. As a showcase I want to present a game that is more than just a simple clone of an existing game. I already have that. No. I want an original game.</p>
<p>What I came up with is a game, where you play as an intruder infiltrating a company with your main task being getting a copy of their database. But you have to path your way through their multi-floor building seeking clues and data traces how to access the next floor and ultimately the server room.</p>
<p>For this I am starting a devlog, to show my progress as I keep on developing the game.</p>
<p>So far I have my engine <a href="https://github.com/nek0/affection">affection</a> as my foundation, for drawing I use <a href="https://github.com/cocreature/nanovg-hs">NanoVG-bindings</a> and as something new to me, I am using an entity-component-system called <a href="https://github.com/isovector/ecstasy">ecstasy</a>. For now I have spent the last month or so figuring out, how to procedurally generate sane floors for the building and how to use the entity-component-system. So far, the whole thing looks like this:</p>
<p><img src="/images/2018-02-27_preview.png" /></p>
<p>Pretty neat, isn’t it?</p>
<p>That’s all for now. See you soon!</p>
<p>PS:</p>
<p>I totally forgot to tell you, where you can find the code for my game. It is hosted on my <a href="https://github.com/nek0/tracer">Github profile</a>. Have fun reading it.</p>]]></description>
    <pubDate>Tue, 27 Feb 2018 00:00:00 UT</pubDate>
    <guid>https://nek0.eu/posts/2018-02-27-Devlog%3A-Making-a-game.html</guid>
    <dc:creator>nek0</dc:creator>
</item>
<item>
    <title>Recent Outage</title>
    <link>https://nek0.eu/posts/2018-01-30-Recent-Outage.html</link>
    <description><![CDATA[<p>I’m sorry for the recent outage in my services. I was foolish enough to think, that I can restart a LXC Container after an update without any hassle.</p>
<p>The whole problem boils down to an incompatibility between unprivileged LXC Containers and systemd. Thanks a lot for breaking our stuff.</p>
<p>But now everything is fine, my site is runnning again and so is <a href="https://eidolon.nek0.eu">eidolon</a>.</p>]]></description>
    <pubDate>Tue, 30 Jan 2018 00:00:00 UT</pubDate>
    <guid>https://nek0.eu/posts/2018-01-30-Recent-Outage.html</guid>
    <dc:creator>nek0</dc:creator>
</item>
<item>
    <title>Escapism</title>
    <link>https://nek0.eu/posts/2018-01-06-Escapism.html</link>
    <description><![CDATA[<p>Hi again. First off all, I wish you a happy new year. Between finishing one part of my rehab, holidays and the Chaos Communication Congress I attended I forgot to write a new post here. I am deeply sorry.</p>
<p>During that time I was also programming a lot, especially on my game engine and example games, or technical demos, for said engine. I do game development in Haskell. For fun.</p>
<p>Why game development? Why in Haskell? These are questions I regularly hear from people, when they get to know me and what I do. Somehow There seems to be a notion, that game development is not real development and that Haskell is either an unfit or even impossible choice for that. Both notions are not true. Game development is a very complex matter (You’re doing real time Simulations of a world) and Haskell is very fit for the Job. I could be seeing results faster in different languages, but that’s not the languages fault. I have to write a lot of the tooling myself, which slows me down. But it’s a great learning experience.</p>
<p>But why do I do that? Well, I like creating and developing worlds. You can see that in my <a href="https://nek0.eu/tags/writing.html">writing</a> section. But writing sometimes is limited when it comes to interaction with the world. In games the player usually can explore the world to a deeper level. The immersion is different.</p>
<p>That’s what I always liked about the games I played. They let me escape to a different world and go on my own adventures. In RPGs I could take on the role of a brave adventurer, in RTS games I could lead a faction to victory on the battlefield. Those are the game genres I mostly played.</p>
<p>Nowadays I play less and less, but I do more game development. At the current stage my knowledge and tooling do not suffice for the kind of game I have in my mind for quite some time, so I try to take smaller steps. But ultimately I bring my escapism of past days to a new level. Now I don’t escape into virtual worlds created by others, but I am in the process of creating them myself. Sometimes it’s a frustrating experience, but sometimes it’s awesome.</p>
<p>For those of you interested in my games, I can show you at this point only <a href="https://github.com/nek0/haskelloids">haskelloids</a>. Not the most original name, but It’s the first real game that runs on my own engine, which you can find <a href="https://github.com/nek0/affection">in its own Github repo</a>, together with some small example programs.</p>]]></description>
    <pubDate>Sat, 06 Jan 2018 00:00:00 UT</pubDate>
    <guid>https://nek0.eu/posts/2018-01-06-Escapism.html</guid>
    <dc:creator>nek0</dc:creator>
</item>
<item>
    <title>Phantasie auf Knopfdruck</title>
    <link>https://nek0.eu/posts/2017-11-30-Phantasie-auf-Kommando.html</link>
    <description><![CDATA[<h2 id="oder-das-unmögliche-möglich-machen-und-zwar-von-heute-auf-gestern.">Oder: Das Unmögliche möglich machen und zwar von heute auf gestern.</h2>
<p>Ich weiß, ich habe mir fest vorgenommen mindestens einmal im Monat etwas sinnvolles hier zu schreiben, aber es fällt mir zunehmend schwer. Ich weiß nicht so recht, worüber oder was ich schreiben soll. Gleichzeitig will ich mich nicht zu sehr unter Druck setzen, da dann erst recht nichts bei rauskommt. Und so sitze ich da im Zwiespalt zwischen schreiben wollen und nicht können.</p>
<p>Entschuldigend könnte man sagen, dass ich in den letzten zwei Monaten mit Reha ziemlich viel um die Ohren hatte und das darunter meine Freizeitprojekte etwas leiden. Aber da ich schon länger nichts mehr kreativ geschrieben habe, vermute ich etwas anderes dahinter.</p>
<p>Ich bin ratlos, was ich machen soll und weiß nicht einmal, an wen ich mich in solchen Situationen wenden kann. Es fühlt sich falsch an jetzt einfach alles hinzuschmeißen, weil ich nicht weiterkomme. Dazu habe ich mich viel zu lange schon mit dem Thema beschäftigt und auch langfristige Projekte angefangen.</p>
<p>Ich könnte wirklich etwas Rat gebrauchen.</p>]]></description>
    <pubDate>Thu, 30 Nov 2017 00:00:00 UT</pubDate>
    <guid>https://nek0.eu/posts/2017-11-30-Phantasie-auf-Kommando.html</guid>
    <dc:creator>nek0</dc:creator>
</item>
<item>
    <title>Up, down, to and fro</title>
    <link>https://nek0.eu/posts/2017-10-09-Up-down-to-and-fro.html</link>
    <description><![CDATA[<p>Some time went by, since I last wrote and quite a lot happened.</p>
<p>First of all I had a relapse. One of the ugly kind, but I somehow managed to get out of it, thanks to the people around me. But from what these people tell me I seem to get better at handling these situations, which is kind of nice. I took a small vacation staying with some friends in the countryside for a week. There I took a step forward in a project of mine. Some of you might know, that I want to build my own tent for various purposes. One is, to finally have a tent (yay!), the second is to have a tent to take with me on hacker camps and the third and most difficult task is to have a tent fit for LARPing. I have a plan, so I could buy some pure cotton canvas very cheaply directly from a weaving mill. Now I have to come up with a way to build the struts, before I can get to sewing. But don’t get the impression I was in any way productive during the vacation. I was mostly lazily lying around.</p>
<p>After that vacation and spending some time at home again more or less successfully managing to keep up my daily schedule I got a call from my vocational rehab I applied for. They wanted to take me in prematurely, because someone else somehow didn’t show up. Because I had nothing better to do I agreed to take the opening one month before my scheduled start. So now I’m in my third week of attending this rehab. I was pretty overwhelmed in the beginning because of all the testing they ran on me, like another IQ-Test and some testing of my motor skills. Now I’m getting accustomed to the new schedule and to being pretty exhausted at the end of the day from doing menial tasks aimed for testing my capacities in certain fields. For now I have been doing tasks in administration and economy, which is not really the most interesting field and definitely not the field I want to work in the future, but the more interesting fields like design or electronics and computer science will follow. I am looking forward to these. But because of this I had to tone down on my other activities like coding or writing. I am simply too exhausted when I come home. But I managed to get my piano up and running again, which I haven’t touched for at least a year, so I can relax with playing a little music.</p>
<p>Progress feels good.</p>]]></description>
    <pubDate>Mon, 09 Oct 2017 00:00:00 UT</pubDate>
    <guid>https://nek0.eu/posts/2017-10-09-Up-down-to-and-fro.html</guid>
    <dc:creator>nek0</dc:creator>
</item>
<item>
    <title>Countdown</title>
    <link>https://nek0.eu/posts/2017-08-07-Countdown.html</link>
    <description><![CDATA[<p>Ich habe in den letzten Tagen es ieder geschafft eine Kurzgeschichte zu schreiben. Diesmal auch tatsächlich auf Deutsch.</p>
<div class="scripture with-initial">
<p>Zehn</p>
<p>Ich haste durch die Bahnhofshalle und verzweifelt halte ich Ausschau nach einem freien Fahrkartenautomaten. Hinter mir zerre ich meine beiden schweren Koffer her, in einem meine Kleidung und Reiseutensilien, in dem anderen das Paket. Vor allen anderen Automaten stehen Menschen, zumeist Touristen, in langen Schlangen an. Viel Zeit bleibt mir nicht mehr. Ich hätte gerne mehr Vorbereitung gehabt, aber der Anruf meiner Mutter kam überraschend. Ich verlasse die Bahnhofshalle und begebe mich in die verschlungenen Gänge des Bahnhofs. Erst als ich an den Schränken der Gepäckaufbewahrung vorüber gehe, sehe ich in einer dunklen Ecke einen einsamen Fahrkartenautomaten stehen. Die Ecke ist dunkel, die Leuchtstoffröhre, die für Licht sorgen sollte, flackert nur in unregelmäßigen Abständen mal auf und der Automat ist mit diversen Lackstiften und Permanentmarkern verunstaltet worden, sodass ich mich eigentlich nicht traue ihn zu bedienen, aber eine kurze Erinnerung an die übervolle Bahnhofshalle lässt mein Zögern dahinschmelzen. Derjenige, der den Fahrkartenautomaten verunstaltet hatte, muss wohl ein ziemlicher Kartenspiel-Narr gewesen sein, denn überall auf dem Automaten sind Spielkarten aufgemalt, doch alle sind sie von der Farbe Pik. Ich bin gerade dabei an dem verkrusteten Automaten meine Fahrkarte zu Ziehen, da krächzt eine weibliche Stimme aus dem schief hängenden Lautsprecher.<br />
“Der IC nach Berlin fährt heute außerplanmäßig von Gleis Neun.”</p>
<p>Flehentlich schaue ich auf das glimmende Licht des Ausgabeschachtes am Automaten, dass er doch endlich meine Fahrkarte ausspucken möge. Ich muss zum Gleis 9, am anderen Ende des Bahnhofs, und habe nur noch wenig Zeit. Innerlich verfluche ich mich selbst, dass ich mich in die Machenschaften meiner Mutter habe mit hineinziehen lassen. Ich weiß noch nicht mal, was ich in meinem Koffer habe, aber ich weiß, dass es die Polizei auch nicht wissen sollte. Endlich flattert die Fahrkarte auf den Boden des Ausgabeschachtes. Ohne zu zögern greife ich danach und verlasse die unheimliche Ecke des Bahnhofs, noch bevor mir der Automat eine gute Reise wünschen kann. Ich haste durch den langen Gang unterhalb der Gleise und durch die Bahnhofshalle, bis ich mein Gleis erreiche. Ohne zu zögern springe ich in den Zug und kurz nachdem sich die Türen hinter mir schließen, geht ein Ruck durch den Wagen und langsam setzt er sich in Bewegung. Langsam manövriere ich mich im Zug vorwärts um an einen Sitzplatz zu kommen, aber sobald ich in das Innere des Wagens trete, zerfallen meine Hoffnungen. Alle Sitzplätze sind besetzt und im Gang stehen schon Leute, die, wie ich, keinen Sitzplatz gefunden haben. Umständlich drehe ich mich mit meinem schweren Gepäck um, wobei ich meinen Koffer einem besonders breitbeinig dasitzenden jungen Mann unabsichtlich ins Knie ramme. Dieser entrüstet sich<br />
“Mensch, geben sie mal Acht!”.</p>
<p>Ich entschuldige mich hastig und verlasse so schnell es geht den Ort des Geschehens. Ich irre weiter durch den Zug bis ich erst nach einiger Zeit einen freien Sitzplatz finde, der auch nicht reserviert ist. Bevor ich mich erschöpft auf den Sitzplatz fallen lasse, verstaue ich meine Sieben Sachen in der Gepäckablage. Der Wagen ist etwas leerer als die anderen, dafür aber lauter. Familien fahren mit ihren Kindern wohl in den Urlaub und es wird gelacht, gespielt und im Gang hin und her gerannt. Dabei bleibt ein kleines Mädchen unvermittelt an meinem Platz stehen und kräht mir mit lauter Stimme “Sieben!” entgegen, bevor sie weiter ihren Spielkameraden lachend hinterherläuft.</p>
<p>Ich versuche es mir so gut es geht auf meinem Sitzplatz gemütlich zu machen. Ich ziehe die Jacke aus und rolle sie zu einem behelfsmäßigen Kopfkissen zusammen. Viel anderes als schlafen bleibt mir nicht übrig, denn mich erwarten sechs Stunden Fahrt und in meiner Eile habe ich vergessen mir eine passende Beschäftigung, wie ein Buch, einzupacken. Ich lehne an der Wand des Wagens und lausche dem monotonen Rattern des Zuges und betrachtete abwesend die Schrauben, die den Klapptisch am Sitz vor mir halten. Es sind sechs.</p>
<p>Während ich dasitze und meine Augenlider immer schwerer werden höre ich ein Flattern wie vom Schlagen vieler Flügel. Draußen vor dem Fenster wird es schlagartig dunkel, der Lärm im Zugwagen verstummt und auch der Zug scheint auf wundersame Art angehalten zu haben. Ich stehe auf, und schaue mich im Wagen um. Er ist Leer. Wo eben noch spielende Kinder waren, ist nun niemand. Ich gehe fünf Sitzreihen vor und versuche irgendjemanden zu finden, doch es ist niemand da. Der Wagen bleibt leer, geradezu klinisch rein. Plötzlich öffnen sich die Türen und fünf Raben fliegen laut krächzend herein und kreisen über meinem Kopf. Doch ihr krächzen ist sonderbar. Jedes einzelne klingt wie ein verzerrtes “Fünf!”</p>
<p>Ich versuche wegzurennen, doch meine Füße stecken fest. Ich bin mittlerweile bis zu meinen Knöcheln im Boden eingesunken und sinke rasch weiter ein. Schon stecke ich bis zu den Knien im Boden, da schaue ich auf zu den Raben, welche weiter hämisch krächzen. Sie kreisen zu viert über meinem Kopf, während der Fünfte in der Mitte des Kreises flattert und sich mit dem Schnabel vier Federn ausreißt und zu Boden fallen lässt. Doch noch bevor Sie den Boden erreichen verwandeln sie sich Spielkarten. Vier Pik-Asse liegen vor mir auf dem Boden, in welchen ich weiter einsinke. Ich bäume mich weiter auf, doch ich versinke weiter im Boden, Ich bin schon bis zur Brust eingesunken und habe Schwierigkeiten beim Atmen.</p>
<p>Ein Finger bohrt sich dreimal unsanft in meine Schulter. Ich schrecke hoch. Ich war eingeschlafen und hatte alles nur geträumt. “Zum dritten Mal: Die Fahrkarte bitte” sagt der Schaffner ungeduldig, welcher mit gezückter Stempelzange neben meinem Sitzplatz steht. Ich nestele in meinem Jackett nach der Fahrkarte und reiche sie ihm. Misstrauisch kontrolliert er sie und obwohl ich mir sicher bin, dass alles mit ihr in Ordnung ist, verspüre ich Erleichterung, als der Schaffner sie schließlich abstempelt.</p>
<p>Die restlichen zwei Stunden der Fahrt vergehen ereignislos, doch wage ich es nicht wieder einzuschlafen aus Angst vor weiteren Albträumen. Ich komme am Berliner Hauptbahnhof auf dem zweiten Gleis an. Ich steige aus mit meinem schweren Gepäck und gehe zum Ausgang. Während ich gehe, fühle ich mein Handy vibrieren. Ich halte an und schaue aufs Display. Zwei verpasste Anrufe. Beide von meiner Mutter. Mich überkommt Übelkeit, während ich ihre Nummer wähle. Mit zuckersüßer Stimme begrüßt sie mich am Telefon, doch ohne lange Umschweife kommt sie auf ihr eigentliches Begehr. “Hast du die beiden Pakete, um die ich dich gebeten habe?” fragt sie weiter mit zuckersüßer Stimme. Mutters Pakete. Dinge die sie bei mir deponiert, damit sie das Amt nicht mitbekommt. “Ich habe nur eines mit. Ich wusste nicht, dass ich beide mitbringen sollte.” Sage ich wahrheitsgemäß während ich den Bahnhof verlasse.</p>
<p>“Nie kannst du ein einziges Mal eine Sache richtig machen!” schreit mich meine Mutter aufgebracht vom anderen Ende der Telefonleitung an, während ich die Straße überquere, “Ich bitte dich nur im eine Sache und du musst es ja vergessen. Du hast deinen Kopf nur, damit es dir nicht in den Hals hineinregnet!” führt sie weiter aus. Es folgen weitere wüste Beschimpfungen, doch ich höre gar nicht mehr hin. Ein Kratzen innerhalb meines linken Ärmels lenkt mich plötzlich ab. Aus dem Augenwinkel sehe ich, wie eine einzelne Spielkarte aus meinem Ärmel fällt, zu Boden flattert und mit der Rückseite nach oben liegen bleibt. Abwesend bücke ich mich, hebe die Karte auf und drehe sie um. Ein einzelnes Symbol prangt mir entgegen. Es ist ein Pik-Ass. Ich nehme nur noch ein lautes Hupen wahr und ein Paar heller Scheinwerfer, die auf mich zurasen.</p>
<p>Null</p>
</div>]]></description>
    <pubDate>Mon, 07 Aug 2017 00:00:00 UT</pubDate>
    <guid>https://nek0.eu/posts/2017-08-07-Countdown.html</guid>
    <dc:creator>nek0</dc:creator>
</item>
<item>
    <title>How to use OTF fonts with pdflatex</title>
    <link>https://nek0.eu/posts/2017-07-21-How-to-use-OTF-fonts-with-pdflatex.html</link>
    <description><![CDATA[<p>In the last days I had an interesting Problem to solve, which involved LaTeX, OTF font files and a special set of requirements. I needed to import and use the OTF fonts in a LaTeX document and this document needed to be compiled through pdflatex.</p>
<p>First off: If you need to use OTF fonts in LaTeX documents, you can simply switch to XeLaTeX or LuaLaTeX, like I did in the first place. Both of these environments support the package <code>fontspec</code>, which makes using fonts installed in your system extremely easy. So if you can, switch the environment.</p>
<p>If you can’t switch the environment, don’t want to, feel a little adventurous or even want to feel some of the innards of LaTeX you can choose the path I am about to show.</p>
<p>Before you can start, you need to install the <a href="http://www.lcdf.org/type/#typetools">LCDF typetools</a>, which is a set of tools for manipulating the font definitions of LaTeX. Most GNU/Linux distributions have them in their repositories, Mac users can install them through homebrew and even Windows binaries are available on the website. Additionally make sure, that you use <code>updmap</code> in system mode and have root privileges.</p>
<p>To create the font mappings from the OTF, you simply run</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="fu">sudo</span> otftotfm -a <span class="op">&lt;</span>fontfile<span class="op">&gt;</span> --vendor <span class="op">&lt;</span>vendor<span class="op">&gt;</span> --typeface <span class="op">&lt;</span>typeface<span class="op">&gt;</span> -e texnansx</a></code></pre></div>
<p>Where you replace the items in the angle brackets. This not only produces the mappings, but also places them in the right directory. (If <code>otftotfm</code> complains because of <code>updmap</code>, run the <code>updmap</code> commands in the error messages as <code>updmap-sys</code>.)</p>
<p>Before you can actually use the Font, you have to write your own font definition. A small template for this follows, which should be saved as <code>T1&lt;typeface&gt;.df</code></p>
<div class="sourceCode" id="cb2"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="fu">\ProvidesFile</span>{T1&lt;fontname&gt;.fd}</a>
<a class="sourceLine" id="cb2-2" data-line-number="2">[YYYY/mm/dd foobar]</a>
<a class="sourceLine" id="cb2-3" data-line-number="3"><span class="fu">\DeclareFontFamily</span>{T1}{&lt;fontname&gt;}{}</a>
<a class="sourceLine" id="cb2-4" data-line-number="4"><span class="fu">\DeclareFontShape</span>{T1}{&lt;fontname&gt;}{m}{n} {&lt;-&gt; &lt;fontface&gt; } {}</a>
<a class="sourceLine" id="cb2-5" data-line-number="5"><span class="fu">\endinput</span></a></code></pre></div>
<p>Here you can define <code>&lt;fontname&gt;</code> as you wish, the other elements in angle brackets correspond to the box above.</p>
<p>To actually use it, you can call</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="fu">\renewcommand*</span>{<span class="ex">\familydefault</span>}{&lt;fontname&gt;}</a></code></pre></div>
<p>from your document to change the font in the whole document, assuming the <code>T1&lt;fontname&gt;.fd</code> is in your project folder, or call</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode latex"><code class="sourceCode latex"><a class="sourceLine" id="cb4-1" data-line-number="1">Lorem ipsum {<span class="fu">\fontfamily</span>{&lt;fontname&gt;}<span class="fu">\fontseries</span>{m}<span class="fu">\fontshape</span>{n}</a>
<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="fu">\selectfont</span> dolor sit} amet</a></code></pre></div>
<p>to change the font only for “dolor sit” in this example.</p>
<p>There are tons of other options how to handle fonts in LaTeX, but this is the most convenient one I found.</p>]]></description>
    <pubDate>Fri, 21 Jul 2017 00:00:00 UT</pubDate>
    <guid>https://nek0.eu/posts/2017-07-21-How-to-use-OTF-fonts-with-pdflatex.html</guid>
    <dc:creator>nek0</dc:creator>
</item>
<item>
    <title>Busy doing everything</title>
    <link>https://nek0.eu/posts/2017-07-10-Busy-doing-everything.html</link>
    <description><![CDATA[<p>First of all I have to apologize for not updating my blog in the past months. I have been very busy in that time, having my internship and having it converted to a part-time job, after which I hopefully will be starting my apprenticeship.</p>
<p>In my free time I am still pursuing my projects and starting new ones. For example: My Game Engine makes progress so far, that I am now implementing physics. It’s still in testing and doesn’t work always right, but the tests look promising.</p>
<p>My book also does some progress. I actually managed to make it some kind of habit to work on it at least on sundays. I usually meet with my older brother and we discuss things related to writing, while we both work on our books. It’s cool to exchange Ideas this way and ask for an opinion, when one of us is stuck.</p>
<p>That’s about it. see you soon.</p>]]></description>
    <pubDate>Mon, 10 Jul 2017 00:00:00 UT</pubDate>
    <guid>https://nek0.eu/posts/2017-07-10-Busy-doing-everything.html</guid>
    <dc:creator>nek0</dc:creator>
</item>

    </channel>
</rss>
